From a122e156c4eefbb62b9aa4265574ebd9c2040ec8 Mon Sep 17 00:00:00 2001 From: phil235 Date: Fri, 25 Apr 2014 00:07:28 +0200 Subject: [PATCH] Fix legcuffing when stepping on two traps. Prevents having two beartraps on your legs, which results in one of the two not appearing after resisting. --- code/defines/obj/weapon.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index db6e5178723..c400c0bb75c 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -200,13 +200,14 @@ "You trigger \the [src]!") H.apply_damage(20,BRUTE,"chest") else - H.legcuffed = src - src.loc = H - H.update_inv_legcuffed(0) H.visible_message("[H] steps on \the [src].", \ "You step on \the [src]!") H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg"))) - feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart. + if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs. + H.legcuffed = src + src.loc = H + H.update_inv_legcuffed(0) + feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart. if(isalien(AM)) armed = 0