diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 2b2d80bb8bb..ce582670027 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -103,25 +103,9 @@ var/datum/subsystem/ticker/ticker
declare_completion()
spawn(50)
if(mode.station_was_nuked)
- feedback_set_details("end_proper","nuke")
- if(!delay_end)
- world << "\blue Rebooting due to destruction of station in [restart_timeout/10] seconds"
+ world.Reboot("Station destroyed by Nuclear Device.", "end_proper", "nuke")
else
- feedback_set_details("end_proper","proper completion")
- if(!delay_end)
- world << "\blue Restarting in [restart_timeout/10] seconds"
-
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
-
- if(delay_end)
- world << "\blue An admin has delayed the round end"
- else
- sleep(restart_timeout)
- kick_clients_in_lobby("\red The round came to an end with you in the lobby.", 1) //second parameter ensures only afk clients are kicked
- world.Reboot()
-
+ world.Reboot("Round ended.", "end_proper", "proper completion")
/datum/subsystem/ticker/proc/setup()
//Create and announce mode
diff --git a/code/controllers/subsystem/voting.dm b/code/controllers/subsystem/voting.dm
index 9fb28c1f174..7988d4ab99e 100644
--- a/code/controllers/subsystem/voting.dm
+++ b/code/controllers/subsystem/voting.dm
@@ -115,14 +115,8 @@ var/datum/subsystem/vote/SSvote
restart = 1
else
master_mode = .
-
if(restart)
- world << "World restarting due to vote..."
- feedback_set_details("end_error","restart vote")
- if(blackbox) blackbox.save_all_data_to_sql()
- sleep(50)
- log_game("Rebooting due to restart vote")
- world.Reboot()
+ world.Reboot("Restart vote successful.", "end_error", "restart vote")
return .
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 538020a4414..f08f4e58d4e 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -57,33 +57,16 @@
/datum/game_mode/malfunction/post_setup()
for(var/datum/mind/AI_mind in malf_ai)
if(malf_ai.len < 1)
- world << "Uh oh, its malfunction and there is no AI! Please report this."
- world << "Rebooting world in 5 seconds."
-
- feedback_set_details("end_error","malf - no AI")
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
- sleep(50)
- world.Reboot()
+ world.Reboot("No AI during Malfunction.", "end_error", "malf - no AI", 50)
return
AI_mind.current.verbs += /mob/living/silicon/ai/proc/choose_modules
AI_mind.current:laws = new /datum/ai_laws/malfunction
AI_mind.current:malf_picker = new /datum/module_picker
AI_mind.current:show_laws()
-
greet_malf(AI_mind)
-
AI_mind.special_role = "malfunction"
-
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
AI_mind.current.verbs += /mob/living/silicon/ai/proc/ai_cancel_call
-
-/* AI_mind.current.icon_state = "ai-malf"
- spawn(10)
- if(alert(AI_mind.current,"Do you want to use an alternative sprite for your real core?",,"Yes","No")=="Yes")
- AI_mind.current.icon_state = "ai-malf2"
-*/
SSshuttle.emergencyNoEscape = 1
..()
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 0473e0a7cc5..2629d2bfce2 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -208,21 +208,10 @@ var/bomb_set
ticker.mode:nukes_left --
else
world << "The station was destoyed by the nuclear blast!"
-
ticker.mode.station_was_nuked = (off_station<2) //offstation==1 is a draw. the station becomes irradiated and needs to be evacuated.
//kinda shit but I couldn't get permission to do what I wanted to do.
-
if(!ticker.mode.check_finished())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is
- world << "Resetting in 30 seconds!"
-
- feedback_set_details("end_error","nuke - unhandled ending")
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
- sleep(300)
- log_game("Rebooting due to nuclear detonation")
- kick_clients_in_lobby("The round came to an end with you in the lobby.", 1) //second parameter ensures only afk clients are kicked
- world.Reboot()
+ world.Reboot("Station destroyed by Nuclear Device.", "end_error", "nuke - unhandled ending")
return
return
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 069df2c14b8..986a46fab05 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -491,24 +491,16 @@ var/global/floorIsLava = 0
/datum/admins/proc/restart()
set category = "Server"
set name = "Restart"
- set desc="Restarts the world"
+ 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")
- world << "Restarting world! Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
- log_admin("[key_name(usr)] initiated a reboot.")
-
- feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
+ ticker.delay_end = 0
feedback_add_details("admin_verb","R") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
-
- sleep(50)
- world.Reboot()
+ world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", 10)
/datum/admins/proc/announce()
@@ -650,24 +642,6 @@ var/global/floorIsLava = 0
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/datum/admins/proc/immreboot()
- set category = "Server"
- set desc="Reboots the server post haste"
- set name="Immediate Reboot"
- if(!usr.client.holder) return
- if( alert("Reboot server?",,"Yes","No") == "No")
- return
- world << "Rebooting world! Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
- log_admin("[key_name(usr)] initiated an immediate reboot.")
-
- feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
- feedback_add_details("admin_verb","IR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
- if(blackbox)
- blackbox.save_all_data_to_sql()
-
- world.Reboot()
-
/datum/admins/proc/unprison(var/mob/M in mob_list)
set category = "Admin"
set name = "Unprison"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 46660a55909..740ec63b06e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -97,7 +97,6 @@ var/list/admin_verbs_server = list(
/datum/admins/proc/delay,
/datum/admins/proc/toggleaban,
/client/proc/toggle_log_hrefs,
- /datum/admins/proc/immreboot,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
@@ -178,7 +177,6 @@ var/list/admin_verbs_hideable = list(
/datum/admins/proc/delay,
/datum/admins/proc/toggleaban,
/client/proc/toggle_log_hrefs,
- /datum/admins/proc/immreboot,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
/client/proc/restart_controller,
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 778ee03b109..334190fbd20 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1716,28 +1716,13 @@
dirty_paths = href_list["object_list"]
var/paths = list()
- var/removed_paths = list()
for(var/dirty_path in dirty_paths)
var/path = text2path(dirty_path)
if(!path)
- removed_paths += dirty_path
continue
else if(!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
- removed_paths += dirty_path
continue
- else if(ispath(path, /obj/item/weapon/gun/energy/pulse))
- if(!check_rights(R_FUN,0))
- removed_paths += dirty_path
- continue
- else if(ispath(path, /obj/item/weapon/melee/energy/blade))//Not an item one should be able to spawn./N
- if(!check_rights(R_FUN,0))
- removed_paths += dirty_path
- continue
- else if(ispath(path, /obj/effect/anomaly/bhole))
- if(!check_rights(R_FUN,0))
- removed_paths += dirty_path
- continue
paths += path
if(!paths)
@@ -1746,8 +1731,6 @@
if(length(paths) > 5)
alert("Select fewer object types, (max 5)")
return
- else if(length(removed_paths))
- alert("Removed:\n" + list2text(removed_paths, "\n"))
var/list/offset = text2list(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
diff --git a/code/world.dm b/code/world.dm
index 1668266c1c4..2eefe8ed0b7 100644
--- a/code/world.dm
+++ b/code/world.dm
@@ -134,8 +134,26 @@
C << "PR: [input["announce"]]"
#undef CHAT_PULLR
-/world/Reboot(var/reason)
-#ifdef dellogging
+/world/Reboot(var/reason, var/feedback_c, var/feedback_r, var/time)
+ var/delay
+ if(time)
+ delay = time
+ else
+ delay = ticker.restart_timeout
+ if(ticker.delay_end)
+ world << "An admin has delayed the round end."
+ return
+ world << "Rebooting World in [delay/10] [delay > 10 ? "seconds" : "second"]. [reason]"
+ sleep(delay)
+ if(blackbox)
+ blackbox.save_all_data_to_sql()
+ if(ticker.delay_end)
+ world << "Reboot was cancelled by an admin."
+ return
+ feedback_set_details("[feedback_c]","[feedback_r]")
+ log_game("Rebooting World. [reason]")
+ kick_clients_in_lobby("The round came to an end with you in the lobby.", 1) //second parameter ensures only afk clients are kicked
+ #ifdef dellogging
var/log = file("data/logs/del.log")
log << time2text(world.realtime)
//mergeSort(del_counter, /proc/cmp_descending_associative) //still testing the sorting procs. Use notepad++ to sort the resultant logfile for now.
@@ -149,14 +167,11 @@
world << sound(ticker.round_end_sound)
else
world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg','sound/misc/leavingtg.ogg')) // random end sounds!! - LastyBatsy
-
for(var/client/C in clients)
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
C << link("byond://[config.server]")
-
// Note: all clients automatically connect to the world after it restarts
-
- ..(reason)
+ ..(0)
/world/proc/load_mode()
diff --git a/html/changelogs/jordie restart.yml b/html/changelogs/jordie restart.yml
new file mode 100644
index 00000000000..4c581575db8
--- /dev/null
+++ b/html/changelogs/jordie restart.yml
@@ -0,0 +1,6 @@
+author: Jordie0608
+
+delete-after: True
+
+changes:
+ - rscadd: "Admin-delaying the round now works once it has finished."
\ No newline at end of file