From dde5f1c04c9874f6c5f8410db595d2fdd69a27d7 Mon Sep 17 00:00:00 2001 From: Mark van Alphen Date: Sun, 7 Apr 2019 18:48:34 +0200 Subject: [PATCH] Code review fixes --- code/game/objects/structures/safe.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 9e5116a2a98..67965390472 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -59,6 +59,8 @@ GLOBAL_LIST_EMPTY(safes) /obj/structure/safe/Destroy() GLOB.safes -= src drill?.soundloop?.stop() + drill?.forceMove(loc) + drill = null return ..() /obj/structure/safe/process() @@ -102,7 +104,7 @@ GLOBAL_LIST_EMPTY(safes) looped++ combination += "[tumbler]" - if (looped < LAZYLEN(tumblers)) + if(looped < LAZYLEN(tumblers)) combination += ", " return combination @@ -190,13 +192,13 @@ GLOBAL_LIST_EMPTY(safes) return data /obj/structure/safe/proc/notify_user(user, canhear, sounds, total_ticks, current_tick) - if (!canhear) + if(!canhear) return - if (current_tick == 2) + if(current_tick == 2) to_chat(user, "The sounds from [src] are too fast and blend together.") - if (total_ticks == 1 || prob(10)) + if(total_ticks == 1 || prob(10)) to_chat(user, "You hear a [pick(sounds)] from [src].") /obj/structure/safe/Topic(href, href_list) @@ -204,7 +206,7 @@ GLOBAL_LIST_EMPTY(safes) return TRUE var/mob/user = usr - if (!user.IsAdvancedToolUser() && !isobserver(user)) + if(!user.IsAdvancedToolUser() && !isobserver(user)) to_chat(user, "You're not able to operate the safe.") return