mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Make scheduler and Master init order predictable and make unit tests wait until init is done before starting.
This commit is contained in:
@@ -34,11 +34,11 @@ var/total_unit_tests = 0
|
||||
world.Del()
|
||||
|
||||
var/said_msg = 0
|
||||
while(ticker.pregame_timeleft && ticker.pregame_timeleft > 160) // Make sure the initial startup is complete.
|
||||
if(ticker.pregame_timeleft < 175 && !said_msg)
|
||||
while(!Master.current_runlevel) // Make sure the initial startup is complete.
|
||||
if(!said_msg)
|
||||
said_msg = 1
|
||||
log_unit_test("Pregame Count down has started, giving it 20 seconds to finish.")
|
||||
sleep(1)
|
||||
log_unit_test("Waiting for subystems initilization to finish.")
|
||||
stoplag(10)
|
||||
|
||||
world.save_mode("extended")
|
||||
|
||||
|
||||
@@ -116,10 +116,12 @@ var/global/datum/global_init/init = new ()
|
||||
|
||||
processScheduler = new
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
Master.Initialize(10, FALSE)
|
||||
spawn(1)
|
||||
|
||||
processScheduler.deferSetupFor(/datum/controller/process/ticker)
|
||||
processScheduler.setup()
|
||||
Master.Initialize(10, FALSE)
|
||||
|
||||
spawn(1)
|
||||
master_controller.setup()
|
||||
#if UNIT_TEST
|
||||
initialize_unit_tests()
|
||||
|
||||
Reference in New Issue
Block a user