From 920624a8f126c86c021aae94cc2f7cf0330ffe19 Mon Sep 17 00:00:00 2001 From: Firecage Date: Thu, 1 Jan 2015 00:41:54 +0200 Subject: [PATCH] Statue code cleanup --- code/game/objects/structures/statues.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index aedfbc485d0..c0b8434e9c1 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -27,6 +27,7 @@ "You are loosening the [name]'s bolts...") if(do_after(user,40)) if(!src) return + if(!anchored) return user.visible_message("[user] loosened the [name]'s bolts!", \ "You loosened the [name]'s bolts!") anchored = 0 @@ -39,6 +40,7 @@ "You are securing the [name]'s bolts...") if(do_after(user, 40)) if(!src) return + if(anchored) return user.visible_message("[user] has secured the [name]'s bolts!", \ "You have secured the [name]'s bolts!") anchored = 1 @@ -47,7 +49,7 @@ user.visible_message("[user] is slicing apart the [name]...", \ "You are slicing apart the [name]...") if(do_after(user,30)) - if(!src) return + if(!src.loc) return user.visible_message("[user] slices apart the [name]!", \ "You slice apart the [name]!") Dismantle(1) @@ -56,7 +58,7 @@ user.visible_message("[user] begins to drill apart the [name]!", \ "You begin to drill apart the [name]!") if(do_after(user,5)) - if(!src) return + if(!src.loc) return user.visible_message("[user] destroys the [name]!", \ "You destroy the [name]!") qdel(src) @@ -66,19 +68,17 @@ user.visible_message("[user] is slicing apart the [name]...", \ "You are slicing apart the [name]...") if(do_after(user, 40)) - if(!src) return + if(!src.loc) return user.visible_message("[user] slices apart the [name]!", \ "You slice apart the [name]!") Dismantle(1) else hardness -= W.force/100 - user.visible_message("[user] hits the [name] with their [W.name]!", \ - "You hit the [name] with your [W.name]!") CheckHardness() + ..() /obj/structure/statue/attack_hand(mob/living/user as mob) - user.do_attack_animation(src) user.changeNext_move(CLICK_CD_MELEE) add_fingerprint(user) user.visible_message("[user] rubs some dust off from the [name]'s surface.", \