From 4127da9ee1eb0ad4ed7b5b77ebe2751641e3a408 Mon Sep 17 00:00:00 2001 From: mikomyazaki <47489928+mikomyazaki@users.noreply.github.com> Date: Wed, 19 Feb 2020 04:25:47 +0000 Subject: [PATCH] Crowbars can't open robots when not Adjacent (#8307) * Crowbars can't open robots when not Adjacent * Adds some messages to the user when they are too far away. --- code/modules/mob/living/silicon/robot/robot.dm | 6 ++++++ html/changelogs/no_long_crowbars.yml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 html/changelogs/no_long_crowbars.yml diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3b65c5edf27..604f6f82fb2 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -616,6 +616,9 @@ if(cell) user.visible_message("\The [user] begins clasping shut \the [src]'s maintenance hatch.", "You begin closing up \the [src].") if(do_after(user, 50/W.toolspeed, src)) + if(!Adjacent(user)) + to_chat(user, SPAN_NOTICE("You are too far from \the [src]'s to open its hatch.")) + return to_chat(user, "You close \the [src]'s maintenance hatch.") opened = 0 updateicon() @@ -667,6 +670,9 @@ else user.visible_message("\The [user] begins prying open \the [src]'s maintenance hatch.", "You start opening \the [src]'s maintenance hatch.") if(do_after(user, 50/W.toolspeed, src)) + if(!Adjacent(user)) + to_chat(user, SPAN_NOTICE("You are too far from \the [src]'s to close its hatch.")) + return to_chat(user, "You open \the [src]'s maintenance hatch.") opened = 1 updateicon() diff --git a/html/changelogs/no_long_crowbars.yml b/html/changelogs/no_long_crowbars.yml new file mode 100644 index 00000000000..18625f72a7e --- /dev/null +++ b/html/changelogs/no_long_crowbars.yml @@ -0,0 +1,6 @@ +author: mikomyazaki + +delete-after: True + +changes: + - bugfix: "Robots moving away while someone tries to crowbar them open/closed will now properly cancel the opening/closing." \ No newline at end of file