Merge pull request #9107 from deathride58/fixesarest

Fixes handcuffs being impossible to actually resist out of
This commit is contained in:
kevinz000
2019-08-16 16:57:36 -07:00
committed by GitHub
2 changed files with 19 additions and 17 deletions
+7 -6
View File
@@ -636,14 +636,15 @@
else if(canmove) else if(canmove)
if(on_fire) if(on_fire)
resist_fire() //stop, drop, and roll resist_fire() //stop, drop, and roll
else if(resting) //cit change - allows resisting out of resting return
if(resting) //cit change - allows resisting out of resting
resist_a_rest() // ditto resist_a_rest() // ditto
else if(iscarbon(src)) //Citadel Change for embedded removal memes return
var/mob/living/carbon/C = src if(resist_embedded()) //Citadel Change for embedded removal memes
if(!C.handcuffed && !C.legcuffed) return
return TRUE if(last_special <= world.time)
else if(last_special <= world.time)
resist_restraints() //trying to remove cuffs. resist_restraints() //trying to remove cuffs.
return
/mob/proc/resist_grab(moving_resist) /mob/proc/resist_grab(moving_resist)
@@ -13,18 +13,19 @@
/mob/living/carbon/human/species/xeno /mob/living/carbon/human/species/xeno
race = /datum/species/xeno race = /datum/species/xeno
/mob/living/carbon/human/resist() /mob/living/proc/resist_embedded()
. = ..() return
if(wear_suit && wear_suit.breakouttime)//added in human cuff breakout proc
/mob/living/carbon/human/resist_embedded()
if(handcuffed || legcuffed || (wear_suit && wear_suit.breakouttime))
return return
if(.) if(canmove && !on_fire)
if(canmove && !on_fire) for(var/obj/item/bodypart/L in bodyparts)
for(var/obj/item/bodypart/L in bodyparts) if(istype(L) && L.embedded_objects.len)
if(istype(L) && L.embedded_objects.len) for(var/obj/item/I in L.embedded_objects)
for(var/obj/item/I in L.embedded_objects) if(istype(I) && I.w_class >= WEIGHT_CLASS_NORMAL) //minimum weight class to insta-ripout via resist
if(istype(I) && I.w_class >= WEIGHT_CLASS_NORMAL) //minimum weight class to insta-ripout via resist remove_embedded_unsafe(L, I, src, 1.5) //forcefully call the remove embedded unsafe proc but with extra pain multiplier. if you want to remove it less painfully, examine and remove it carefully.
remove_embedded_unsafe(L, I, src, 1.5) //forcefully call the remove embedded unsafe proc but with extra pain multiplier. if you want to remove it less painfully, examine and remove it carefully. return TRUE //Hands are occupied
return FALSE //Hands are occupied
return return
/mob/living/carbon/human/proc/remove_embedded_unsafe(obj/item/bodypart/L, obj/item/I, mob/user, painmul = 1) /mob/living/carbon/human/proc/remove_embedded_unsafe(obj/item/bodypart/L, obj/item/I, mob/user, painmul = 1)