From babe7325625c336b9e6cfc4ea98be4b9dd91ed15 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Tue, 23 May 2017 09:55:43 -0400 Subject: [PATCH] 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 cd501432237..e48157b3eda 100644 --- a/code/modules/shuttle/arrivals.dm +++ b/code/modules/shuttle/arrivals.dm @@ -94,7 +94,7 @@ SendToStation() return - var/found_awake = PersonCheck() + var/found_awake = PersonCheck() || NukeDiskCheck() if(mode == SHUTTLE_CALL) if(found_awake) SendToStation() @@ -123,6 +123,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) @@ -135,11 +141,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)