From 0e2ced3c00ff26d427717428183cbf6fdc08bb2e Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Wed, 22 May 2024 20:57:25 -0400 Subject: [PATCH] You can no longer push people with riot shields (and other parry objects) on help intent (#25301) * You can no longer push people with riot shields (and other parry objects) on help intent * Update buffs.dm --- code/datums/status_effects/buffs.dm | 2 ++ code/modules/mob/living/living.dm | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 4e976e9e5d6..e476267e04b 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -596,12 +596,14 @@ H.physiology.brute_mod *= 0.8 H.physiology.burn_mod *= 0.8 H.physiology.stamina_mod *= 0.8 + owner.status_flags &= ~CANPUSH add_attack_logs(owner, owner, "gained chainsaw stun immunity", ATKLOG_ALL) owner.add_stun_absorption("chainsaw", INFINITY, 4) owner.playsound_local(get_turf(owner), 'sound/effects/singlebeat.ogg', 40, TRUE, use_reverb = FALSE) /datum/status_effect/chainsaw_slaying/on_remove() add_attack_logs(owner, owner, "lost chainsaw stun immunity", ATKLOG_ALL) + owner.status_flags |= CANPUSH if(islist(owner.stun_absorption) && owner.stun_absorption["chainsaw"]) owner.remove_stun_absorption("chainsaw") if(ishuman(owner)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1b6ddb47b94..803d724e524 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -118,6 +118,8 @@ if(a_intent == INTENT_HELP) // Help intent doesn't mob swap a mob pulling a structure if(isstructure(M.pulling) || isstructure(pulling)) return TRUE + //Let us check if the person has riot equipment. We should not move past them or push them, unless they are on *walk* intent. This is so officers batoning on help can't me moved past. + var/riot_equipment_used = (M.r_hand?.GetComponent(/datum/component/parry) || M.l_hand?.GetComponent(/datum/component/parry)) if(!M.buckled && !M.has_buckled_mobs()) var/mob_swap @@ -125,7 +127,7 @@ if(length(M.grabbed_by) && a_intent == INTENT_GRAB) mob_swap = TRUE //restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller - else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP)) + else if(((M.restrained() || M.a_intent == INTENT_HELP) && !(riot_equipment_used && M.m_intent == MOVE_INTENT_RUN)) && (restrained() || a_intent == INTENT_HELP)) mob_swap = TRUE if(mob_swap) //switch our position with M @@ -156,7 +158,7 @@ if(!(M.status_flags & CANPUSH)) return TRUE //anti-riot equipment is also anti-push - if(M.r_hand?.GetComponent(/datum/component/parry) || M.l_hand?.GetComponent(/datum/component/parry)) + if(riot_equipment_used) return TRUE //Called when we bump into an obj