mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Emergency shuttle panel timer (#24459)
* Emergency shuttle panel timer * oops * reasons * added another cancel button
This commit is contained in:
@@ -356,9 +356,28 @@
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
emergency_shuttle.settimeleft( input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft() ) as num )
|
||||
var/new_timeleft = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft() ) as num | null
|
||||
if(!new_timeleft)
|
||||
return
|
||||
|
||||
var/reason
|
||||
var/should_announce = alert("Do you want this to be announced?",,"Yes","No","Cancel" )
|
||||
switch(should_announce)
|
||||
if("Yes")
|
||||
if(new_timeleft < emergency_shuttle.timeleft())
|
||||
reason = pick("is arriving ahead of schedule", \
|
||||
"hit the turbo", \
|
||||
"has engaged nitro afterburners")
|
||||
captain_announce("The emergency shuttle [reason]. It will arrive in [round(new_timeleft/60)] minutes.")
|
||||
else
|
||||
reason = pick("has been delayed", \
|
||||
"decided to stop for pizza")
|
||||
captain_announce("The emergency shuttle [reason]. It will arrive in [round(new_timeleft/60)] minutes.")
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
emergency_shuttle.settimeleft( new_timeleft )
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]")
|
||||
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]</span>", 1)
|
||||
|
||||
href_list["secretsadmin"] = "emergency_shuttle_panel"
|
||||
|
||||
Reference in New Issue
Block a user