From 1b6b13b6b432f4321f91cb4d680ecc03654ce508 Mon Sep 17 00:00:00 2001 From: "elly1989@rocketmail.com" Date: Fri, 15 Jun 2012 06:10:35 +0000 Subject: [PATCH] Quick fix for resisting out of cuffs git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3827 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/items.dm | 2 ++ code/modules/mob/screen.dm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index ea0f2660286..8b4da89c38b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -23,8 +23,10 @@ for(var/mob/O in viewers(user, null)) O.show_message("\red [user] is trying to put handcuffs on [M]!", 1) spawn(30) + if(!M) return if(p_loc == user.loc && p_loc_m == M.loc) M.handcuffed = new /obj/item/weapon/handcuffs(M) + M.update_inv_handcuffed() else if ((CLUMSY in usr.mutations) && prob(50)) diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index ea4ce34e7f7..ccd2800512f 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -592,6 +592,7 @@ usr << "\green You successfully break your handcuffs." del(usr:handcuffed) usr:handcuffed = null + usr.update_inv_handcuffed() else var/obj/item/weapon/handcuffs/HC = usr:handcuffed var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type @@ -611,6 +612,7 @@ usr << "\blue You successfully remove \the [usr:handcuffed]." usr:handcuffed.loc = usr.loc usr:handcuffed = null + usr.update_inv_handcuffed() //unbuckling yourself else if(usr:handcuffed && (usr.last_special <= world.time) && usr:buckled)