From 2bfcc9bf1eb1c41aa22c46bbeefccabecf269804 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Thu, 25 May 2017 09:43:34 -0500 Subject: [PATCH] [s] Fixes hiding the nuke disk on the arrivals shuttle --- code/modules/shuttle/arrivals.dm | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/code/modules/shuttle/arrivals.dm b/code/modules/shuttle/arrivals.dm index d60a832279..7cb347d429 100644 --- a/code/modules/shuttle/arrivals.dm +++ b/code/modules/shuttle/arrivals.dm @@ -99,7 +99,7 @@ SendToStation() return - var/found_awake = PersonCheck() + var/found_awake = PersonCheck() || NukeDiskCheck() if(mode == SHUTTLE_CALL) if(found_awake) SendToStation() @@ -128,6 +128,12 @@ return TRUE return FALSE +/obj/docking_port/mobile/arrivals/proc/NukeDiskCheck() + for (var/obj/item/weapon/disk/nuclear/N in GLOB.poi_list) + if (get_area(N) in areas) + return TRUE + return FALSE + /obj/docking_port/mobile/arrivals/proc/SendToStation() var/dockTime = config.arrivals_shuttle_dock_window if(mode == SHUTTLE_CALL && timeLeft(1) > dockTime) @@ -140,11 +146,17 @@ var/docked = S1 == assigned_transit sound_played = FALSE if(docked) //about to launch - if(!force_depart && PersonCheck()) - mode = SHUTTLE_IDLE - if(console) - console.say("Launch cancelled, lifeform dectected on board.") - return + if(!force_depart) + var/cancel_reason + if(PersonCheck()) + cancel_reason = "lifeform dectected on board" + else if(NukeDiskCheck()) + cancel_reason = "critical station device detected on board" + if(cancel_reason) + mode = SHUTTLE_IDLE + if(console) + console.say("Launch cancelled, [cancel_reason].") + return force_depart = FALSE . = ..() if(!. && !docked && !damaged)