From c8c35acf3ab0aa8c5c2829874a5c5fff603569c2 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 20 Jun 2015 22:12:38 +0930 Subject: [PATCH] Fixes #9785 --- code/game/objects/items/weapons/traps.dm | 25 +++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index f6af73843c..d62b89f3fa 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -20,20 +20,20 @@ /obj/item/weapon/beartrap/attack_self(mob/user as mob) ..() - if(deployed && can_use(user)) + if(!deployed && can_use(user)) user.visible_message( - "[user] starts to deploy \the [src].", - "You begin deploying \the [src]!", + "[user] starts to deploy \the [src].", + "You begin deploying \the [src]!", "You hear the slow creaking of a spring." ) - + if (do_after(user, 60)) user.visible_message( - "[user] has deployed \the [src].", + "[user] has deployed \the [src].", "You have deployed \the [src]!", "You hear a latch click loudly." ) - + deployed = 1 user.drop_from_inventory(src) update_icon() @@ -42,7 +42,7 @@ /obj/item/weapon/beartrap/attack_hand(mob/user as mob) if(buckled_mob && can_use(user)) user.visible_message( - "[user] begins freeing [buckled_mob] from \the [src].", + "[user] begins freeing [buckled_mob] from \the [src].", "You carefully begin to free [buckled_mob] from \the [src].", ) if(do_after(user, 60)) @@ -51,13 +51,13 @@ anchored = 0 else if(deployed && can_use(user)) user.visible_message( - "[user] starts to disarm \the [src].", + "[user] starts to disarm \the [src].", "You begin disarming \the [src]!", "You hear a latch click followed by the slow creaking of a spring." ) if(do_after(user, 60)) user.visible_message( - "[user] has disarmed \the [src].", + "[user] has disarmed \the [src].", "You have disarmed \the [src]!" ) deployed = 0 @@ -86,15 +86,18 @@ //trap the victim in place if(!blocked) set_dir(L.dir) + can_buckle = 1 buckle_mob(L) L << "The steel jaws of \the [src] bite into you, trapping you in place!" + deployed = 0 + can_buckle = initial(can_buckle) /obj/item/weapon/beartrap/Crossed(AM as mob|obj) - if(isliving(AM)) + if(deployed && isliving(AM)) var/mob/living/L = AM if(L.m_intent == "run") L.visible_message( - "[L] steps on \the [src].", + "[L] steps on \the [src].", "You step on \the [src]!", "You hear a loud metallic snap!" )