From cf9fe8de766c68a60ff304af33e2303a6129e091 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 3 Aug 2014 11:49:37 -0400 Subject: [PATCH] Fixes some handcuff oversights You now don't need to be grabbing to put handcuffs on yourself, and you can now put hancuffs on if your grab state is higher than aggressive. --- code/game/objects/items/weapons/handcuffs.dm | 6 +++++- code/modules/mob/living/carbon/human/inventory.dm | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 4089a586ca..e7e2ed1a96 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -25,9 +25,13 @@ place_handcuffs(user, user) return if(!C.handcuffed) + if (C == user) + place_handcuffs(user, user) + return + //check for an aggressive grab for (var/obj/item/weapon/grab/G in C.grabbed_by) - if (G.loc == user && G.state == GRAB_AGGRESSIVE) + if (G.loc == user && G.state >= GRAB_AGGRESSIVE) place_handcuffs(C, user) return user << "\red You need to have a firm grip on [C] before you can put \the [src] on!" diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 124aec89e3..6bbfce36de 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -675,11 +675,11 @@ It can still be worn/put on as normal. slot_to_process = slot_handcuffed if (target.handcuffed) strip_item = target.handcuffed - else + else if (source != target && ishuman(source)) //check that we are still grabbing them var/grabbing = 0 for (var/obj/item/weapon/grab/G in target.grabbed_by) - if (G.loc == source && G.state == GRAB_AGGRESSIVE) + if (G.loc == source && G.state >= GRAB_AGGRESSIVE) grabbing = 1 if (!grabbing) slot_to_process = null