Files
kiwistation/code/modules/lighting/lighting_area.dm
T
Kyle Spier-Swenson 99002e25a3 Fixes lighting of pixel shifted objects and reverts the hacky memleak fix + other lighting fixes (#24963)
* Revert "Lighting micro optimizations and fixes (#24939)"

This reverts commit 78bbbfe20a.

* vg refactor stage 1

* Fix runtime in get_turf_pixel

* fix lighting on turfs

* Fix certain things reading light levels wrong.

* Made SS faster/better by making it split its tick allotment up between it's 3 tasks

* istypeless loops @pjb3005

/proc/typed_loop    6.826        6.830        6.858       190761
/proc/typeless_loop 5.582        5.586        5.620       190435

* lazy init lists
2017-03-14 19:27:23 +01:00

22 lines
528 B
Plaintext

/area
luminosity = TRUE
var/dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/proc/set_dynamic_lighting(var/new_dynamic_lighting = DYNAMIC_LIGHTING_ENABLED)
if (new_dynamic_lighting == dynamic_lighting)
return FALSE
dynamic_lighting = new_dynamic_lighting
if (IS_DYNAMIC_LIGHTING(src))
for (var/turf/T in area_contents(src))
if (IS_DYNAMIC_LIGHTING(T))
T.lighting_build_overlay()
else
for (var/turf/T in area_contents(src))
if (T.lighting_object)
T.lighting_clear_overlay()
return TRUE