Files
Bubberstation/code/modules/lighting/lighting_setup.dm
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

20 lines
460 B
Plaintext

/proc/create_all_lighting_objects()
for (var/zlevel = 1 to world.maxz)
create_lighting_objects_zlevel(zlevel)
/proc/create_lighting_objects_zlevel(zlevel)
ASSERT(zlevel)
var/turf/T
var/thing
for (thing in block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)))
T = thing
if (!IS_DYNAMIC_LIGHTING(T))
continue
var/area/A = T.loc
if (!IS_DYNAMIC_LIGHTING(A))
continue
new/atom/movable/lighting_object(T, TRUE)
CHECK_TICK