World.dm Refactor (#27268)

* Cleanup world/New

* Moves some things from OnReboot SS Shutdowns

* Move mode handling procs to ticker

* Moves delayed reboot to ticker
Cleans up round end sound setting
Splits round end animation between SStitle and SSticker

* Moves PR announcement to where it can use the define

* Clean this bit up

* Move out datacore Initialization

* Fix some stuff

* Fix this for

* Different PR

* Gives admins reboot options

* Make it smaller
This commit is contained in:
Cyberboss
2017-05-18 07:53:46 -04:00
committed by Jordie
parent 83e90cca22
commit ee404b2170
14 changed files with 151 additions and 125 deletions

View File

@@ -421,13 +421,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"