mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-27 10:02:12 +00:00
* 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
20 lines
460 B
Plaintext
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
|