Emergency Shuttle Toggle (#53912)

Admins now have the option to enable or disable the shuttle(located in the admin tab).
Disabling the shuttle will basically pause it where it is, regardless(unless game is over). Until the admins enable it again. It will resume exactly back to where it was and continue from there. This is great for events. You can't recall or call the shuttle while it's disabled.

Admins also now get the option when calling the shuttle to disable the recall of said shuttle unless they cancel it or select enable shuttle.
This commit is contained in:
Gandalf
2020-09-25 07:40:50 -03:00
committed by GitHub
parent 9b1a6530c7
commit 95d25ec33b
7 changed files with 85 additions and 13 deletions
+5 -2
View File
@@ -57,6 +57,8 @@
return
if(!IS_DOCKED) // shuttle computer only has uses when onstation
return
if(SSshuttle.emergency.mode == SHUTTLE_DISABLED) // admins have disabled the shuttle.
return
var/mob/user = usr
. = FALSE
@@ -243,7 +245,7 @@
else
SSshuttle.emergencyLastCallLoc = null
priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]", null, 'sound/ai/shuttlecalled.ogg', "Priority")
priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ][SSshuttle.adminEmergencyNoRecall ? "\n\nWarning: Shuttle recall subroutines disabled; Recall not possible." : ""]", null, 'sound/ai/shuttlecalled.ogg', "Priority")
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
if(mode != SHUTTLE_CALL)
@@ -387,9 +389,10 @@
INVOKE_ASYNC(SSticker, /datum/controller/subsystem/ticker.proc/poll_hearts)
SSmapping.mapvote() //If no map vote has been run yet, start one.
if(SHUTTLE_STRANDED)
if(SHUTTLE_STRANDED, SHUTTLE_DISABLED)
SSshuttle.checkHostileEnvironment()
if(SHUTTLE_ESCAPE)
if(sound_played && time_left <= HYPERSPACE_END_TIME)
var/list/areas = list()
+3 -1
View File
@@ -707,11 +707,13 @@
return "RCH"
if(SHUTTLE_PREARRIVAL)
return "LDN"
if(SHUTTLE_DISABLED)
return "DIS"
return ""
// returns 5-letter timer string, used by status screens and mob status panel
/obj/docking_port/mobile/proc/getTimerStr()
if(mode == SHUTTLE_STRANDED)
if(mode == SHUTTLE_STRANDED || mode == SHUTTLE_DISABLED)
return "--:--"
var/timeleft = timeLeft()