Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into pr/35
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 30, 2023
2 parents 8b2c165 + a504dfa commit 84c7084
Show file tree
Hide file tree
Showing 16 changed files with 447 additions and 206 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystem/pathfinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SUBSYSTEM_DEF(xeno_pathfinding)
if(length(L))
for(var/i in L)
var/atom/A = i
distance_between += A.xeno_ai_obstacle(X, direction)
distance_between += A.xeno_ai_obstacle(X, direction, target)

if(distance_between < distances[neighbor])
distances[neighbor] = distance_between
Expand Down
8 changes: 4 additions & 4 deletions code/datums/ammo/bullet/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@
headshot_state = HEADSHOT_OVERLAY_MEDIUM
debilitate = list(0,0,0,0,0,0,0,2)

accuracy = HIT_ACCURACY_TIER_4
damage = 45
penetration= ARMOR_PENETRATION_TIER_6
accuracy = HIT_ACCURACY_TIER_2
damage = 50
penetration = ARMOR_PENETRATION_TIER_4
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2
damage_falloff = DAMAGE_FALLOFF_TIER_6 //"VP78 - the only pistol viable as a primary."-Vampmare, probably.
damage_falloff = DAMAGE_FALLOFF_TIER_3 //"VP78 - the only pistol viable as a primary."-Vampmare, probably.

/datum/ammo/bullet/pistol/squash/toxin
name = "toxic squash-head pistol bullet"
Expand Down
12 changes: 9 additions & 3 deletions code/datums/ammo/bullet/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
name = "revolver bullet"
headshot_state = HEADSHOT_OVERLAY_MEDIUM

damage = 55
penetration = ARMOR_PENETRATION_TIER_1
accuracy = HIT_ACCURACY_TIER_1
damage = 70
penetration = ARMOR_PENETRATION_TIER_3
accuracy = HIT_ACCURACY_TIER_2

/datum/ammo/bullet/revolver/on_hit_mob(mob/entity, obj/projectile/bullet)
. = ..()

slowdown(entity, bullet)
pushback(entity, bullet, 4)

/datum/ammo/bullet/revolver/marksman
name = "marksman revolver bullet"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/phone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone)
return COMPONENT_OVERRIDE_DEAD_SPEAK

/datum/component/phone/virtual/get_user()
return virtual_user
return virtual_user.mob

// TGUI section

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

/datum/component/ai_behavior_override/attack

/datum/component/ai_behavior_override/attack/check_behavior_validity(mob/living/carbon/xenomorph/checked_xeno, distance)
. = ..()

if(distance > 10)
return FALSE

return TRUE


/datum/component/ai_behavior_override/attack/process_override_behavior(mob/living/carbon/xenomorph/processing_xeno, delta_time)
. = ..()

if(processing_xeno.current_target == parent)
return FALSE

processing_xeno.current_target = parent
processing_xeno.resting = FALSE
if(prob(5))
processing_xeno.emote("hiss")

return FALSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
GLOBAL_LIST_EMPTY(all_ai_behavior_overrides)

/datum/component/ai_behavior_override

/// Icon file for the behavior attached to parent as game masters will see it
var/behavior_icon = 'icons/landmarks.dmi'

/// Specific icon state for the behavior attached to parent as game masters will see it
var/behavior_icon_state = "x2"

/// The actual image holder that sits on parent for game masters
var/image/behavior_image

/datum/component/ai_behavior_override/Initialize(...)
. = ..()

GLOB.all_ai_behavior_overrides += src

behavior_image = new(behavior_icon, parent, behavior_icon_state, layer = ABOVE_FLY_LAYER)

for(var/client/game_master in GLOB.game_masters)
game_master.images += behavior_image

/datum/component/ai_behavior_override/Destroy(force, silent, ...)
GLOB.all_ai_behavior_overrides -= src

for(var/client/game_master in GLOB.game_masters)
game_master.images -= behavior_image

QDEL_NULL(behavior_image)

. = ..()

/// Override this to check if we want our behavior to be valid for the checked_xeno, passes the common factor of "distance" which is the distance between the checked_xeno and src parent
/datum/component/ai_behavior_override/proc/check_behavior_validity(mob/living/carbon/xenomorph/checked_xeno, distance)
return FALSE

/// Processes what we want this behavior to do, return FALSE if we want to continue in the process_ai() proc or TRUE if we want to handle everything and have process_ai() return
/datum/component/ai_behavior_override/proc/process_override_behavior(mob/living/carbon/xenomorph/processing_xeno, delta_time)
SHOULD_NOT_SLEEP(TRUE)

return FALSE
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,19 @@
list("88 Mod 4 Combat Pistol", round(scale * 2), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR),
list("M44 Combat Revolver", round(scale * 2), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR),
list("M4A3 Service Pistol", round(scale * 2), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR),
list("VP78 pistol", round(scale * 2), /obj/item/weapon/gun/pistol/vp78, VENDOR_ITEM_REGULAR),
list("M82F Flare Gun", round(scale * 1), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR),

list("SIDEARM AMMUNITION", -1, null, null),
list("88M4 AP Magazine (9mm)", round(scale * 10), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR),
list("M44 Speedloader (.44)", round(scale * 10), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR),
list("M4A3 Magazine (9mm)", round(scale * 10), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR),
list("88M4 AP Magazine (9mm)", round(scale * 20), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR),
list("M44 Speedloader (.44)", round(scale * 20), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR),
list("M4A3 Magazine (9mm)", round(scale * 20), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR),
list("VP78 magazine (9mm)", round(scale * 20), /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR),

list("MISCELLANEOUS", -1, null, null),
list("Extinguisher", round(scale * 5), /obj/item/tool/extinguisher, VENDOR_ITEM_REGULAR),
list("Fire Extinguisher (Portable)", round(scale * 1), /obj/item/tool/extinguisher/mini, VENDOR_ITEM_REGULAR),
list("Roller Bed", round(scale * 1), /obj/item/roller, VENDOR_ITEM_REGULAR),
list("Roller Bed", round(scale * 2), /obj/item/roller, VENDOR_ITEM_REGULAR),
list("Machete Scabbard (Full)", round(scale * 5), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR),
list("Binoculars", round(scale * 1), /obj/item/device/binoculars, VENDOR_ITEM_REGULAR),
list("Spare PDT/L Battle Buddy Kit", round(scale * 3), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR),
Expand Down
Loading

0 comments on commit 84c7084

Please sign in to comment.