Skip to content

Commit

Permalink
Merge pull request tgstation#27582 from Cyberboss/NukeDiskFix
Browse files Browse the repository at this point in the history
[s] Fixes hiding the nuke disk on the arrivals shuttle
  • Loading branch information
lzimann authored May 25, 2017
2 parents 7443201 + babe732 commit 67d7a54
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions code/modules/shuttle/arrivals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
SendToStation()
return

var/found_awake = PersonCheck()
var/found_awake = PersonCheck() || NukeDiskCheck()
if(mode == SHUTTLE_CALL)
if(found_awake)
SendToStation()
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 67d7a54

Please sign in to comment.