From 2676f2a6fca71208aaaea425c64a2c9d080d3a2e Mon Sep 17 00:00:00 2001 From: deathride58 Date: Fri, 9 Nov 2018 22:11:30 -0500 Subject: [PATCH] makes it impossible to resist/move out of grabs while resting (though disarming your way out of the grab still works) (#7688) * makes it impossible to resist out of grabs while resting (partially emulates grab rework's restraining) * actually wait, *now* you can disarm your way out of grabs * logging and sounds too --- code/modules/mob/living/carbon/human/species.dm | 6 ++++++ code/modules/mob/living/living.dm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 6bc3220722..aee1daa449 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1419,6 +1419,12 @@ GLOBAL_LIST_EMPTY(roundstart_races) target.w_uniform.add_fingerprint(user) //var/randomized_zone = ran_zone(user.zone_selected) CIT CHANGE - comments out to prevent compiling errors SEND_SIGNAL(target, COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected) + if(target.pulling == user) + target.visible_message("[user] wrestles out of [target]'s grip!") + target.stop_pulling() + playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + log_combat(user, target, "disarmed out of grab from") + return //var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone) CIT CHANGE - comments this out to prevent compile errors due to the below commented out bit var/randn = rand(1, 100) /*if(randn <= 25) CITADEL CHANGE - moves disarm push attempts to right click diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index fc3c0cb00e..0c50b7ef60 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -631,7 +631,7 @@ /mob/living/resist_grab(moving_resist) . = 1 if(pulledby.grab_state) - if(prob(30/pulledby.grab_state)) + if(!resting && prob(30/pulledby.grab_state)) visible_message("[src] has broken free of [pulledby]'s grip!") log_combat(pulledby, src, "broke grab") pulledby.stop_pulling()