From e1effdfb7a458de31e001a908e84790419e26df3 Mon Sep 17 00:00:00 2001 From: Taran Date: Fri, 28 Apr 2023 02:52:05 -0600 Subject: [PATCH] Prevents sec bots from cuffing when turned off (#20951) * prevents sec bot cuffing while off By adding a check for if a sec bot is on when actually applying cuffs, sec bots can be stopped mid cuff by turning them off * makes src implicit Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/modules/mob/living/simple_animal/bot/secbot.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 1b354290d6d..ea58c47d8dc 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -247,7 +247,7 @@ /mob/living/simple_animal/bot/secbot/proc/cuff_callback(mob/living/carbon/C) if(do_after(src, 60, target = C)) - if(!C.handcuffed) + if(!C.handcuffed && on) C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C) C.update_handcuffed() playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)