From 96c1dbc9320e4b44c8d98fe4f3e6e4557f8fcfd3 Mon Sep 17 00:00:00 2001 From: harryob Date: Mon, 26 Feb 2024 12:48:05 +0000 Subject: [PATCH] speeds up ci runs by 3 minutes (#5803) closes #5679 --- code/controllers/subsystem/ticker.dm | 8 ++++++++ code/game/world.dm | 1 + 2 files changed, 9 insertions(+) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 20691a1a7723..f265315460e3 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -8,6 +8,10 @@ SUBSYSTEM_DEF(ticker) var/current_state = GAME_STATE_STARTUP //State of current round used by process() var/force_ending = FALSE //Round was ended by admin intervention + + /// If TRUE, there is no lobby phase, the game starts immediately. + var/start_immediately = FALSE + var/bypass_checks = FALSE //Bypass mode init checks var/setup_failed = FALSE //If the setup has failed at any point var/setup_started = FALSE @@ -80,6 +84,10 @@ SUBSYSTEM_DEF(ticker) var/mob/new_player/player = i if(player.ready) // TODO: port this == PLAYER_READY_TO_PLAY) ++totalPlayersReady + + if(start_immediately) + time_left = 0 + if(time_left < 0 || delay_start) return diff --git a/code/game/world.dm b/code/game/world.dm index 958278042ea5..e55741ca71e5 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -374,6 +374,7 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt")) /world/proc/HandleTestRun() // Wait for the game ticker to initialize Master.sleep_offline_after_initializations = FALSE + SSticker.start_immediately = TRUE UNTIL(SSticker.initialized) //trigger things to run the whole process