diff --git a/code/world.dm b/code/world.dm index 785d44c084..7bcf361ac4 100644 --- a/code/world.dm +++ b/code/world.dm @@ -423,20 +423,27 @@ var/world_topic_spam_protect_time = world.timeofday return "Database connection failed or not set up" -/world/Reboot(var/reason) +/world/Reboot(reason = 0, fast_track = FALSE) /*spawn(0) world << sound(pick('sound/AI/newroundsexy.ogg','sound/misc/apcdestroyed.ogg','sound/misc/bangindonk.ogg')) // random end sounds!! - LastyBatsy */ + if (reason || fast_track) //special reboot, do none of the normal stuff + if (usr) + log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools") + message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools") + world << "[key_name_admin(usr)] has requested an immediate world restart via client side debugging tools" + + else + world << "Rebooting world immediately due to host request" + else + processScheduler.stop() + Master.Shutdown() //run SS shutdowns + 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]") - processScheduler.stop() - Master.Shutdown() //run SS shutdowns - - 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]") - - shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss. - ..(reason) + log_world("World rebooted at [time_stamp()]") + ..() /hook/startup/proc/loadMode() world.load_mode()