Fixes ERT shuttle not announcing a cancelled...

...launch if the launch is cancelled after the countdown is completed.
This commit is contained in:
mwerezak
2014-06-26 17:21:45 -04:00
committed by ZomgPonies
parent f5f4682b8e
commit d2837379d4
+23 -14
View File
@@ -35,19 +35,22 @@
if(announcer)
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
/datum/shuttle/ferry/multidock/specops/launch(var/obj/machinery/computer/shuttle_control/user)
/datum/shuttle/ferry/multidock/specops/launch(var/user)
if (!can_launch())
return
if(world.time <= reset_time)
user.visible_message("\blue Central Command will not allow the Special Operations shuttle to launch yet.")
if (((world.time - reset_time)/10) > 60)
user.visible_message("\blue [-((world.time - reset_time)/10)/60] minutes remain!")
else
user.visible_message("\blue [-(world.time - reset_time)/10] seconds remain!")
return
if (istype(user, /obj/machinery/computer))
var/obj/machinery/computer/C = user
if(world.time <= reset_time)
C.visible_message("\blue Central Command will not allow the Special Operations shuttle to launch yet.")
if (((world.time - reset_time)/10) > 60)
C.visible_message("\blue [-((world.time - reset_time)/10)/60] minutes remain!")
else
C.visible_message("\blue [-(world.time - reset_time)/10] seconds remain!")
return
user.visible_message("\blue The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.")
C.visible_message("\blue The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.")
if (location) //returning
radio_announce("THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN")
@@ -55,10 +58,6 @@
radio_announce("THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH")
sleep_until_launch()
if (cancel_countdown)
radio_announce("ALERT: LAUNCH SEQUENCE ABORTED")
user.visible_message("\red Launch sequence aborted.")
return
//launch
radio_announce("ALERT: INITIATING LAUNCH SEQUENCE")
@@ -79,8 +78,17 @@
reset_time = world.time + specops_return_delay //set the timeout
/datum/shuttle/ferry/multidock/specops/cancel_launch()
..()
if (!can_cancel())
return
cancel_countdown = 1
radio_announce("ALERT: LAUNCH SEQUENCE ABORTED")
if (istype(in_use, /obj/machinery/computer))
var/obj/machinery/computer/C = in_use
C.visible_message("\red Launch sequence aborted.")
..()
/datum/shuttle/ferry/multidock/specops/can_launch()
@@ -120,6 +128,7 @@
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
sleep(5)
launch_prep = 0