mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Make ZAS setup and init delays work
They didn't work due to bay differences in UNIT_TESTING activation defines
This commit is contained in:
@@ -87,6 +87,12 @@ Class Procs:
|
|||||||
|
|
||||||
/datum/controller/air_system/var/next_id = 1 //Used to keep track of zone UIDs.
|
/datum/controller/air_system/var/next_id = 1 //Used to keep track of zone UIDs.
|
||||||
|
|
||||||
|
|
||||||
|
#if UNIT_TEST
|
||||||
|
#define CHECK_SLEEP_ZAS_SETUP // For unit tests we don't care about a smooth lobby screen experience. We care about speed.
|
||||||
|
#else
|
||||||
|
#define CHECK_SLEEP_ZAS_SETUP if(++done_turfs > 10000) { done_turfs=0;sleep(world.tick_lag); }
|
||||||
|
#endif
|
||||||
/datum/controller/air_system/proc/Setup()
|
/datum/controller/air_system/proc/Setup()
|
||||||
//Purpose: Call this at the start to setup air groups geometry
|
//Purpose: Call this at the start to setup air groups geometry
|
||||||
// (Warning: Very processor intensive but only must be done once per round)
|
// (Warning: Very processor intensive but only must be done once per round)
|
||||||
@@ -94,6 +100,9 @@ Class Procs:
|
|||||||
//Inputs: None.
|
//Inputs: None.
|
||||||
//Outputs: None.
|
//Outputs: None.
|
||||||
|
|
||||||
|
#if !UNIT_TEST
|
||||||
|
var/done_turfs = 0
|
||||||
|
#endif
|
||||||
#ifndef ZASDBG
|
#ifndef ZASDBG
|
||||||
set background = 1
|
set background = 1
|
||||||
#endif
|
#endif
|
||||||
@@ -108,6 +117,7 @@ Class Procs:
|
|||||||
for(var/turf/simulated/S in world)
|
for(var/turf/simulated/S in world)
|
||||||
simulated_turf_count++
|
simulated_turf_count++
|
||||||
S.update_air_properties()
|
S.update_air_properties()
|
||||||
|
CHECK_SLEEP_ZAS_SETUP
|
||||||
|
|
||||||
admin_notice({"<span class='danger'>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>
|
admin_notice({"<span class='danger'>Geometry initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.</span>
|
||||||
<span class='info'>
|
<span class='info'>
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ var/global/last_tick_duration = 0
|
|||||||
var/global/air_processing_killed = 0
|
var/global/air_processing_killed = 0
|
||||||
var/global/pipe_processing_killed = 0
|
var/global/pipe_processing_killed = 0
|
||||||
|
|
||||||
var/global/initialization_stage = 0
|
|
||||||
|
|
||||||
datum/controller/game_controller
|
datum/controller/game_controller
|
||||||
var/list/shuttle_list // For debugging and VV
|
var/list/shuttle_list // For debugging and VV
|
||||||
|
|
||||||
@@ -40,18 +38,18 @@ datum/controller/game_controller/proc/setup()
|
|||||||
SetupXenoarch()
|
SetupXenoarch()
|
||||||
|
|
||||||
transfer_controller = new
|
transfer_controller = new
|
||||||
|
admin_notice("<span class='danger'>Initializations complete.</span>", R_DEBUG)
|
||||||
|
|
||||||
|
#if UNIT_TEST
|
||||||
#ifdef UNIT_TEST
|
|
||||||
#define CHECK_SLEEP_MASTER // For unit tests we don't care about a smooth lobby screen experience. We care about speed.
|
#define CHECK_SLEEP_MASTER // For unit tests we don't care about a smooth lobby screen experience. We care about speed.
|
||||||
#else
|
#else
|
||||||
#define CHECK_SLEEP_MASTER if(!(initialization_stage & INITIALIZATION_NOW) && ++initialized_objects > 500) { initialized_objects=0;sleep(world.tick_lag); }
|
#define CHECK_SLEEP_MASTER if(++initialized_objects > 500) { initialized_objects=0;sleep(world.tick_lag); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
datum/controller/game_controller/proc/setup_objects()
|
datum/controller/game_controller/proc/setup_objects()
|
||||||
#ifndef UNIT_TEST
|
#if !UNIT_TEST
|
||||||
var/initialized_objects = 0
|
var/initialized_objects = 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Set up antagonists.
|
// Set up antagonists.
|
||||||
populate_antag_type_list()
|
populate_antag_type_list()
|
||||||
@@ -91,5 +89,3 @@ datum/controller/game_controller/proc/setup_objects()
|
|||||||
var/obj/turbolift_map_holder/lift = thing
|
var/obj/turbolift_map_holder/lift = thing
|
||||||
lift.initialize()
|
lift.initialize()
|
||||||
CHECK_SLEEP_MASTER
|
CHECK_SLEEP_MASTER
|
||||||
|
|
||||||
admin_notice("<span class='danger'>Initializations complete.</span>", R_DEBUG)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user