diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index c96c310f5251..4a39d1c66a6f 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -34,6 +34,8 @@ SUBSYSTEM_DEF(ticker) var/delay_end = 0 //if set true, the round will not restart on it's own + var/admin_delay_notice = "" //a message to display to anyone who tries to restart the world after a delay + var/triai = 0 //Global holder for Triumvirate var/tipped = 0 //Did we broadcast the tip of the day yet? var/selected_tip // What will be the tip of the day? diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 9d8f687c2a27..4bc6bd679458 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -425,19 +425,27 @@ var/list/options = list("Regular Restart", "Hard Restart (No Delay/Feeback Reason)", "Hardest Restart (No actions, just reboot)") if(world.RunningService()) options += "Service Restart (Force restart DD)"; - 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! - switch(result) - if("Regular Restart") - SSticker.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "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) - if("Service Restart (Force restart DD)") - GLOB.reboot_mode = REBOOT_MODE_HARD - world.ServiceReboot() + + var/rebootconfirm + if(SSticker.admin_delay_notice) + if(alert(usr, "Are you sure? An admin has already delayed the round end for the following reason: [SSticker.admin_delay_notice]", "Confirmation", "Yes", "No") == "Yes") + rebootconfirm = TRUE + else + rebootconfirm = TRUE + if(rebootconfirm) + 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! + switch(result) + if("Regular Restart") + SSticker.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "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) + if("Service Restart (Force restart DD)") + GLOB.reboot_mode = REBOOT_MODE_HARD + world.ServiceReboot() /datum/admins/proc/end_round() set category = "Server" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index e81c46497b9a..66b17af462d2 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -349,9 +349,15 @@ if(!check_rights(R_SERVER)) return + if(!SSticker.delay_end) + SSticker.admin_delay_notice = input(usr, "Enter a reason for delaying the round end", "Round Delay Reason") as null|text + if(!SSticker.admin_delay_notice) + return SSticker.delay_end = !SSticker.delay_end - log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].") - message_admins("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].") + var/reason = SSticker.delay_end ? "for reason: [SSticker.admin_delay_notice]" : "."//laziness + var/msg = "[SSticker.delay_end ? "delayed" : "undelayed"] the round end [reason]" + log_admin("[key_name(usr)] [msg]") + message_admins("[key_name_admin(usr)] [msg]") href_list["secrets"] = "check_antagonist" else if(href_list["end_round"])