mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 02:24:11 +01:00
fixes ai controllers resetting their targets post do_afters (#87426)
## About The Pull Request mobs would disregard you for a bit if they went through a do_after, such as goldgrub digging or medbots healing. this fixes that ## Why It's Good For The Game fixes ai controllers resetting their targets post do_afters ## Changelog 🆑 fix: fixes ai controllers resetting their targets post do_afters /🆑
This commit is contained in:
@@ -30,17 +30,17 @@
|
||||
|
||||
/datum/ai_controller/basic_controller/get_able_to_run()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(. & AI_UNABLE_TO_RUN)
|
||||
return .
|
||||
var/mob/living/living_pawn = pawn
|
||||
if(!(ai_traits & CAN_ACT_WHILE_DEAD))
|
||||
// Unroll for flags here
|
||||
if (ai_traits & CAN_ACT_IN_STASIS && (living_pawn.stat || INCAPACITATED_IGNORING(living_pawn, INCAPABLE_STASIS)))
|
||||
return FALSE
|
||||
else if(IS_DEAD_OR_INCAP(living_pawn))
|
||||
return FALSE
|
||||
return AI_UNABLE_TO_RUN
|
||||
if(IS_DEAD_OR_INCAP(living_pawn))
|
||||
return AI_UNABLE_TO_RUN
|
||||
if(ai_traits & PAUSE_DURING_DO_AFTER && LAZYLEN(living_pawn.do_afters))
|
||||
return FALSE
|
||||
return AI_UNABLE_TO_RUN | AI_PREVENT_CANCEL_ACTIONS //dont erase targets post a do_after
|
||||
|
||||
/datum/ai_controller/basic_controller/proc/update_speed(mob/living/basic/basic_mob)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
Reference in New Issue
Block a user