Monkey AI Fixes (#31504)

* Fixes monkeys breaking from grabs, fixes monkeys not stopping on stamcrit

* istype checks
This commit is contained in:
PollardTheDragon
2026-02-05 06:08:50 +00:00
committed by GitHub
parent f88dfca492
commit ec7005b7c5
5 changed files with 14 additions and 7 deletions
@@ -8,6 +8,9 @@
return
if(!IsWeakened())
to_chat(src, SPAN_NOTICE("You're too exhausted to keep going..."))
if(istype(ai_controller))
ai_controller.cancel_actions()
GLOB.move_manager.stop_looping(src)
SEND_SIGNAL(src, COMSIG_CARBON_ENTER_STAMINACRIT)
stam_regen_start_time = world.time + (STAMINA_REGEN_BLOCK_TIME * stamina_regen_block_modifier)
var/prev = stam_paralyzed
@@ -407,6 +407,8 @@
. += ((health_deficiency / 25) - 1.1) //Once damage is over 40, you get the harsh formula
else
. += 0.5 //Otherwise, slowdown (from pain) is capped to 0.5 until you hit 40 damage. This only effects people with fractional slowdowns, and prevents some harshness from the lowered threshold
if(istype(H.ai_controller))
H.ai_controller.movement_delay = .
#undef ADD_SLOWDOWN
#undef SLOWDOWN_INCREMENT