mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Most hostile mobs can no longer be trapped by closets, chairs, and aggro grabs (#91652)
This commit is contained in:
@@ -33,12 +33,18 @@
|
||||
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 AI_UNABLE_TO_RUN
|
||||
if(IS_DEAD_OR_INCAP(living_pawn))
|
||||
return AI_UNABLE_TO_RUN
|
||||
if (living_pawn.stat && !(ai_traits & CAN_ACT_WHILE_DEAD))
|
||||
return AI_UNABLE_TO_RUN
|
||||
|
||||
var/ignore_incap_flags = NONE
|
||||
if((ai_traits & CAN_ACT_IN_STASIS))
|
||||
ignore_incap_flags |= INCAPABLE_STASIS
|
||||
if((ai_traits & CAN_ACT_WHILE_GRABBED))
|
||||
ignore_incap_flags |= INCAPABLE_GRAB
|
||||
|
||||
if(INCAPACITATED_IGNORING(living_pawn, ignore_incap_flags))
|
||||
return AI_UNABLE_TO_RUN
|
||||
|
||||
if(ai_traits & PAUSE_DURING_DO_AFTER && LAZYLEN(living_pawn.do_afters))
|
||||
return AI_UNABLE_TO_RUN | AI_PREVENT_CANCEL_ACTIONS //dont erase targets post a do_after
|
||||
|
||||
|
||||
Reference in New Issue
Block a user