From 161d21f8d0b3b75693e91dc192e0abd7eb111adb Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 30 Sep 2014 12:03:19 +0930 Subject: [PATCH] Added cuff-breaking checks for can_shred(). --- code/modules/mob/living/living.dm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 8fc440c9217..5c5805bfaf3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -610,7 +610,16 @@ if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time)) CM.next_move = world.time + 100 CM.last_special = world.time + 100 - if(HULK in usr.mutations) //Don't want to do a lot of logic gating here. + + var/can_break_cuffs + if(HULK in usr.mutations) + can_break_cuffs = 1 + else if(istype(CM,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = CM + if(H.species.can_shred(H)) + can_break_cuffs = 1 + + if(can_break_cuffs) //Don't want to do a lot of logic gating here. usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)" for(var/mob/O in viewers(CM)) O.show_message(text("\red [] is trying to break the handcuffs!", CM), 1) @@ -647,7 +656,16 @@ else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time)) CM.next_move = world.time + 100 CM.last_special = world.time + 100 - if(HULK in usr.mutations) //Don't want to do a lot of logic gating here. + + var/can_break_cuffs + if(HULK in usr.mutations) + can_break_cuffs = 1 + else if(istype(CM,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = CM + if(H.species.can_shred(H)) + can_break_cuffs = 1 + + if(can_break_cuffs) //Don't want to do a lot of logic gating here. usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)" for(var/mob/O in viewers(CM)) O.show_message(text("\red [] is trying to break the legcuffs!", CM), 1)