Adds a new server restart option: regular restart with a custom delay time (#47870)

* Adds a new server restart option: soft restart with a custom delay time

* cancel returns
This commit is contained in:
SteelSlayer
2019-11-20 05:11:22 -06:00
committed by Rob Bailey
parent 48eb65633c
commit 304a196b7f

View File

@@ -451,7 +451,7 @@
if (!usr.client.holder)
return
var/list/options = list("Regular Restart", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
var/list/options = list("Regular Restart", "Regular Restart (with delay)", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
if(world.TgsAvailable())
options += "Server Restart (Kill and restart DD)";
@@ -469,6 +469,11 @@
switch(result)
if("Regular Restart")
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
if("Regular Restart (with delay)")
var/delay = input("What delay should the restart have (in seconds)?", "Restart Delay", 5) as num|null
if(!delay)
return FALSE
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay * 10)
if("Hard Restart (No Delay, No Feeback Reason)")
to_chat(world, "World reboot - [init_by]")
world.Reboot()