mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user