Files
CHOMPStation2/code/modules/lighting/lighting_setup.dm
Neerti e703d629c6 Fixes the Sun/Weather and Ports Vore's Lighting SS
New lighting system is needed to handle updating literally 14k+ tiles whenever the sun moves.  The straight port seems to have had no adverse effects from what I could see.  Don't know if it's more performant but it doesn't seem to be less.

I didn't expect the latter would be needed for the former.
2017-09-22 12:16:21 -04:00

25 lines
634 B
Plaintext

// Create lighting overlays on all turfs with dynamic lighting in areas with dynamic lighting.
/proc/create_all_lighting_overlays()
for(var/area/A in world)
if(!A.dynamic_lighting)
continue
for(var/turf/T in A)
if(!T.dynamic_lighting)
continue
new /atom/movable/lighting_overlay(T, TRUE)
CHECK_TICK
CHECK_TICK
/proc/create_lighting_overlays_zlevel(var/zlevel)
ASSERT(zlevel)
for(var/turf/T in block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)))
if(!T.dynamic_lighting)
continue
var/area/A = T.loc
if(!A.dynamic_lighting)
continue
new /atom/movable/lighting_overlay(T, TRUE)