localizes create_all_lighting_objects (#85135)

## About The Pull Request

Moves create_all_lighting_objects to the only thing that uses it - the
lighting subsystem

I saw zero difference in lighting system init time

## Why It's Good For The Game

Reduces global proc pollution and keeps everything in the same place,
improving code readability

## Changelog
🆑
refactor: moves the create_all_lighting_objects proc to the lighting
subsystem
/🆑
This commit is contained in:
Jackriip
2024-07-29 15:42:14 +01:00
committed by GitHub
parent 84fb190c43
commit 4d36dfc2ff
3 changed files with 13 additions and 13 deletions
+13
View File
@@ -26,6 +26,19 @@ SUBSYSTEM_DEF(lighting)
return SS_INIT_SUCCESS
/datum/controller/subsystem/lighting/proc/create_all_lighting_objects()
for(var/area/area as anything in GLOB.areas)
if(!area.static_lighting)
continue
for (var/list/zlevel_turfs as anything in area.get_zlevel_turf_lists())
for(var/turf/area_turf as anything in zlevel_turfs)
if(area_turf.space_lit)
continue
new /datum/lighting_object(area_turf)
CHECK_TICK
CHECK_TICK
/datum/controller/subsystem/lighting/fire(resumed, init_tick_checks)
MC_SPLIT_TICK_INIT(3)
if(!init_tick_checks)