World.dm Refactor
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -1206,7 +1206,7 @@
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [GLOB.master_mode].</span>")
|
||||
to_chat(world, "<span class='adminnotice'><b>The mode is now: [GLOB.master_mode]</b></span>")
|
||||
Game() // updates the main game menu
|
||||
world.save_mode(GLOB.master_mode)
|
||||
SSticker.save_mode(GLOB.master_mode)
|
||||
.(href, list("c_mode"=1))
|
||||
|
||||
else if(href_list["f_secret2"])
|
||||
|
||||
@@ -52,10 +52,7 @@
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
if(SSticker)
|
||||
SSticker.round_end_sound = fcopy_rsc(S)
|
||||
else
|
||||
return
|
||||
SSticker.SetRoundEndSound(S)
|
||||
|
||||
log_admin("[key_name(src)] set the round end sound to [S]")
|
||||
message_admins("[key_name_admin(src)] set the round end sound to [S]")
|
||||
|
||||
Reference in New Issue
Block a user