Skip to content

Commit

Permalink
better prevention of multiple launch (just saw a multiple launch on l…
Browse files Browse the repository at this point in the history
…ive)
  • Loading branch information
zzzmike authored Nov 25, 2023
1 parent 4d39b8c commit 542bd74
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions code/modules/shuttle/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,25 @@
var/response = tgui_alert(user, "Launch the lifeboat?", "Confirm", list("Yes", "No", "Emergency Launch"), 10 SECONDS)
switch (response)
if ("Yes")
launch_initiated = 1
to_chat(user, "[src]'s screen blinks and says \"Launch command accepted\".")
shipwide_ai_announcement("Launch command received. " + (lifeboat.id == MOBILE_SHUTTLE_LIFEBOAT_PORT ? "Port" : "Starboard") + " Lifeboat doors will close in 10 seconds.")
addtimer(CALLBACK(lifeboat, TYPE_PROC_REF(/obj/docking_port/mobile/crashable/lifeboat, evac_launch)), 10 SECONDS)
return
if(launch_initiated == 0)
launch_initiated = 1
to_chat(user, "[src]'s screen blinks and says \"Launch command accepted\".")
shipwide_ai_announcement("Launch command received. " + (lifeboat.id == MOBILE_SHUTTLE_LIFEBOAT_PORT ? "Port" : "Starboard") + " Lifeboat doors will close in 10 seconds.")
addtimer(CALLBACK(lifeboat, TYPE_PROC_REF(/obj/docking_port/mobile/crashable/lifeboat, evac_launch)), 10 SECONDS)
return
if(launch_initiated == 1)
to_chat(user, SPAN_NOTICE("[src]'s screen blinks and says \"Launch sequence already initiated\"."))
return
if ("Emergency Launch")
to_chat(user, "[src]'s screen blinks and says \"Emergency Launch command accepted\".")
lifeboat.evac_launch()
shipwide_ai_announcement("Emergency Launch command received. Launching " + (lifeboat.id == MOBILE_SHUTTLE_LIFEBOAT_PORT ? "Port" : "Starboard") + " Lifeboat.")
return
if(launch_initiated == 0)
launch_initiated = 1
to_chat(user, "[src]'s screen blinks and says \"Emergency Launch command accepted\".")
lifeboat.evac_launch()
shipwide_ai_announcement("Emergency Launch command received. Launching " + (lifeboat.id == MOBILE_SHUTTLE_LIFEBOAT_PORT ? "Port" : "Starboard") + " Lifeboat.")
return
if(launch_initiated == 1)
to_chat(user, SPAN_NOTICE("[src]'s screen blinks and says \"Launch sequence already initiated\"."))
return

if(SHUTTLE_IGNITING)
to_chat(user, SPAN_NOTICE("[src]'s screen says \"Engines firing\"."))
Expand Down

0 comments on commit 542bd74

Please sign in to comment.