World.dm Refactor

This commit is contained in:
CitadelStationBot
2017-05-18 16:37:46 -05:00
parent 97286d25fc
commit 94b7e560ab
19 changed files with 182 additions and 33 deletions

View File

@@ -419,13 +419,18 @@
set desc="Restarts the world immediately"
if (!usr.client.holder)
return
var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Yes")
SSticker.delay_end = 0
var/list/options = list("Regular Restart", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)")
var result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
if(result)
SSblackbox.add_details("admin_verb","Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
switch(result)
if("Regular Restart")
SSticker.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
if("Hard Restart (No Delay, No Feeback Reason)")
world.Reboot()
if("Hardest Restart (No actions, just reboot)")
world.Reboot(fast_track = TRUE)
/datum/admins/proc/end_round()
set category = "Server"