From e9e80e3ce68783188cfa6393cda1dc478b5d2bf7 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 22 Sep 2017 22:36:16 -0500 Subject: [PATCH] [MIRROR] Stops restraint removal progress bar spam (#2899) * Stops restraint removal progress bar spam * Stops restraint removal progress bar spam --- code/game/objects/items.dm | 1 + code/modules/mob/living/carbon/carbon.dm | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index efa8a1db44..072896ac01 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -61,6 +61,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/equip_delay_other = 20 //In deciseconds, how long an item takes to put on another person var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person var/breakouttime = 0 + var/being_removed = FALSE var/list/materials var/origin_tech = null //Used by R&D to determine what research bonuses it grants. var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use. diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 717c5478a5..4109166ebd 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -297,6 +297,10 @@ /mob/living/carbon/proc/cuff_resist(obj/item/I, breakouttime = 600, cuff_break = 0) + if(I.being_removed) + to_chat(src, "You're already attempting to remove [I]!") + return + I.being_removed = TRUE breakouttime = I.breakouttime var/displaytime = breakouttime / 600 if(!cuff_break) @@ -318,6 +322,7 @@ else if(cuff_break == INSTANT_CUFFBREAK) clear_cuffs(I, cuff_break) + I.being_removed = FALSE /mob/living/carbon/proc/uncuff() if (handcuffed)