From 3560f8fceabd8d8cbed4aa897e382fd4eed0f3f5 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Tue, 17 Aug 2021 14:36:09 +0100 Subject: [PATCH] Behaviour tweak --- code/controllers/subsystem/instancing.dm | 12 ++++-------- tgui/packages/common/target/npmlist.json | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) create mode 100644 tgui/packages/common/target/npmlist.json diff --git a/code/controllers/subsystem/instancing.dm b/code/controllers/subsystem/instancing.dm index 11ee97ef93f..ffc8808e427 100644 --- a/code/controllers/subsystem/instancing.dm +++ b/code/controllers/subsystem/instancing.dm @@ -1,9 +1,7 @@ SUBSYSTEM_DEF(instancing) name = "Instancing" runlevels = RUNLEVEL_INIT | RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME - /// Have we announced startup yet - var/startup_announced = FALSE - /// Has our initial check complete? Used as part of the above + /// Has our initial check complete? Used to halt init but not lag the server var/initial_check_complete = FALSE /// Is a check currently running? var/check_running = FALSE @@ -11,15 +9,13 @@ SUBSYSTEM_DEF(instancing) /datum/controller/subsystem/instancing/Initialize(start_timeofday) // Do an initial peer check check_peers() + UNTIL(initial_check_complete) // Wait here a bit + var/startup_msg = "The server [GLOB.configuration.general.server_name] is now starting up. The map is [SSmapping.map_datum.fluff_name] ([SSmapping.map_datum.technical_name])" + message_all_peers(startup_msg) return ..() /datum/controller/subsystem/instancing/fire(resumed) check_peers() - if(initial_check_complete && !startup_announced) - startup_announced = TRUE - var/startup_msg = "The server [GLOB.configuration.general.server_name] is now starting up. The map is [SSmapping.map_datum.fluff_name] ([SSmapping.map_datum.technical_name])" - INVOKE_ASYNC(src, .proc/message_all_peers, startup_msg) // Async - /** * Refreshes all peers on the server diff --git a/tgui/packages/common/target/npmlist.json b/tgui/packages/common/target/npmlist.json new file mode 100644 index 00000000000..f9c06d0a205 --- /dev/null +++ b/tgui/packages/common/target/npmlist.json @@ -0,0 +1 @@ +{"name":"common","version":"3.0.0"} \ No newline at end of file