Fix monkeys ignoring grabs while restrained/in crit (#88041)

## About The Pull Request

Fixes #84338

When handcuffed or crit, you are unable to resist even a passive grab,
you are truly helpless

Yet monkeys ignore this

They ignore this because the code handling above is on the client:
`/client/proc/Process_Grab()`

The ideal fix for this is to move it off the client, but that carries a
bunch of order of operations shenanigans so I'll leave that for a more
in depth refactor of this kinda stuff

In the meanwhile we can simply tell AI controllers not to move if
grabbed and incapacitated (barring stasis)

## Changelog

🆑 Melbert
fix: Monkeys no longer ignore basic rules such as "you can't escape a
passive grab if you're cuffed or in crit"
/🆑
This commit is contained in:
MrMelbert
2024-11-21 11:18:47 -06:00
committed by GitHub
parent 9d2e03b35d
commit 72491a5e41
4 changed files with 13 additions and 10 deletions
@@ -35,7 +35,7 @@
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)))
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