Files
vgstation13/code/modules/lighting/lighting_setup.dm
Pieter-Jan Briers 1acc8a2a6f Lazy lighting init, fixes, and optimizations. (#12440)
* Lazy lighting init, fixes, and optimizations.

All corners are now made when first needed (some edge cases due to sloth)

Makes set_light accept null for the l_color parameter.

Fixes set_opacity not update has_opaque_atom on the turf.

Performance optimization to the internal lighting application code.

* NONSENSICAL_VALUE
2016-11-03 20:21:33 -05:00

17 lines
428 B
Plaintext

/proc/create_all_lighting_overlays()
for (var/zlevel = 1 to world.maxz)
create_lighting_overlays_zlevel(zlevel)
/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
getFromPool(/atom/movable/lighting_overlay, T, TRUE)