Fixes ruin lighting.

This commit is contained in:
PJB3005
2016-12-26 01:24:05 +01:00
parent 1ced4344a4
commit b89ff8c36a
2 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
// Needed for changeTurf() so it doesn't screw up before lighting overlays have been made.
var/lighting_overlays_initialized = FALSE
var/datum/subsystem/lighting/SSlighting
/var/list/lighting_update_lights = list() // List of lighting sources queued for update.
@@ -29,6 +30,7 @@ var/datum/subsystem/lighting/SSlighting
A.luminosity = 0
create_all_lighting_overlays()
global.lighting_overlays_initialized = TRUE
/datum/subsystem/lighting/fire()

View File

@@ -114,7 +114,7 @@
corners[i] = new/datum/lighting_corner(src, LIGHTING_CORNER_DIAGONAL[i])
/turf/ChangeTurf(path)
if(!path || (!use_preloader && path == type)) //Sucks this is here but it would cause problems otherwise.
if(!path || (!use_preloader && path == type) || !global.lighting_overlays_initialized) //Sucks this is here but it would cause problems otherwise.
return ..()
if (!lighting_corners_initialised)