From 6ce3d4d26f8f4fe24464f7eedde07687f3f0b5bc Mon Sep 17 00:00:00 2001 From: nemvar <47324920+nemvar@users.noreply.github.com> Date: Sat, 21 Mar 2020 13:48:50 +0100 Subject: [PATCH] You no longer blugeon railings when unanchoring them. (#50090) * No bludgeon railings no more * autodoc --- code/game/objects/structures/railings.dm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm index 42e8f5dc2b1..570f26cf71d 100644 --- a/code/game/objects/structures/railings.dm +++ b/code/game/objects/structures/railings.dm @@ -29,13 +29,16 @@ to_chat(user, "[src] is already in good condition!") return - if(!(flags_1&NODECONSTRUCT_1)) - if(I.tool_behaviour == TOOL_WRENCH) - to_chat(user, "You begin to [anchored ? "unfasten the railing from":"fasten the railing to"] the floor...") - if(I.use_tool(src, user, volume = 75, extra_checks = CALLBACK(src, .proc/check_anchored, anchored))) - setAnchored(!anchored) - to_chat(user, "You [anchored ? "fasten the railing to":"unfasten the railing from"] the floor.") - return +///Implements behaviour that makes it possible to unanchor the railing. +/obj/structure/railing/wrench_act(mob/living/user, obj/item/I) + . = ..() + if(flags_1&NODECONSTRUCT_1) + return + to_chat(user, "You begin to [anchored ? "unfasten the railing from":"fasten the railing to"] the floor...") + if(I.use_tool(src, user, volume = 75, extra_checks = CALLBACK(src, .proc/check_anchored, anchored))) + setAnchored(!anchored) + to_chat(user, "You [anchored ? "fasten the railing to":"unfasten the railing from"] the floor.") + return TRUE /obj/structure/railing/proc/check_anchored(checked_anchored) if(anchored == checked_anchored)