From 155b1b4bf9c01ff47643d35deb2b5755dc727307 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Wed, 1 Feb 2017 03:11:40 -0500 Subject: [PATCH] Reorganizes world/Reboot to be more sensible (#23522) --- code/world.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/world.dm b/code/world.dm index d25d8a05683..0edd4db4c9b 100644 --- a/code/world.dm +++ b/code/world.dm @@ -208,8 +208,6 @@ var/last_irc_status = 0 continue C.Export("##action=load_rsc", ticker.round_end_sound) sleep(delay) - if(blackbox) - blackbox.save_all_data_to_sql() if(ticker.delay_end) world << "Reboot was cancelled by an admin." return @@ -221,6 +219,10 @@ var/last_irc_status = 0 mapchanging = 0 //map rotation can in some cases be finished but never exit, this is a failsafe Reboot("Map change timed out", time = 10) return + OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent) + ..(0) + +/world/proc/OnReboot(reason, feedback_c, feedback_r, round_end_sound_sent) 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 @@ -245,6 +247,8 @@ var/last_irc_status = 0 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', 'sound/misc/its_only_game.ogg', 'sound/misc/yeehaw.ogg')) // random end sounds!! - LastyBatsy + if(blackbox) + blackbox.save_all_data_to_sql() sleep(soundwait) Master.Shutdown() //run SS shutdowns for(var/thing in clients) @@ -253,7 +257,6 @@ var/last_irc_status = 0 continue 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]") - ..(0) var/inerror = 0 /world/Error(var/exception/e)