From 5cee0d01a0c5a528a9ca58121dacd8dcebf7f08d Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Wed, 15 Mar 2017 18:12:56 -0400 Subject: [PATCH] Makes SSlighting fully initialize --- code/controllers/subsystem/lighting.dm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 440c0e62361..3901b1c3c64 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -31,10 +31,12 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo create_all_lighting_objects() initialized = TRUE + + fire(FALSE, TRUE) ..() -/datum/controller/subsystem/lighting/fire() +/datum/controller/subsystem/lighting/fire(resumed, init_tick_checks) var/real_tick_limit = CURRENT_TICKLIMIT CURRENT_TICKLIMIT = (real_tick_limit - world.tick_usage)/3 var/i = 0 @@ -52,8 +54,10 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo L.vis_update = FALSE L.force_update = FALSE L.needs_update = FALSE - - if (MC_TICK_CHECK) + + if(init_tick_checks) + CHECK_TICK + else if (MC_TICK_CHECK) break if (i) lighting_update_lights.Cut(1, i+1) @@ -66,7 +70,9 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo C.update_objects() C.needs_update = FALSE - if (MC_TICK_CHECK) + if(init_tick_checks) + CHECK_TICK + else if (MC_TICK_CHECK) break if (i) lighting_update_corners.Cut(1, i+1) @@ -83,7 +89,9 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo O.update() O.needs_update = FALSE - if (MC_TICK_CHECK) + if(init_tick_checks) + CHECK_TICK + else if (MC_TICK_CHECK) break if (i) lighting_update_objects.Cut(1, i+1)