mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 14:32:52 +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)
|
if (!usr.client.holder)
|
||||||
return
|
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())
|
if(world.TgsAvailable())
|
||||||
options += "Server Restart (Kill and restart DD)";
|
options += "Server Restart (Kill and restart DD)";
|
||||||
|
|
||||||
@@ -469,6 +469,11 @@
|
|||||||
switch(result)
|
switch(result)
|
||||||
if("Regular Restart")
|
if("Regular Restart")
|
||||||
SSticker.Reboot(init_by, "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
|
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)")
|
if("Hard Restart (No Delay, No Feeback Reason)")
|
||||||
to_chat(world, "World reboot - [init_by]")
|
to_chat(world, "World reboot - [init_by]")
|
||||||
world.Reboot()
|
world.Reboot()
|
||||||
|
|||||||
Reference in New Issue
Block a user