mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
[MIRROR] localizes create_all_lighting_objects (#29110)
* 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 /🆑 * localizes create_all_lighting_objects --------- Co-authored-by: Jackriip <97582790+Jackriip@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
/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
|
||||
@@ -4563,7 +4563,6 @@
|
||||
#include "code\modules\lighting\lighting_atom.dm"
|
||||
#include "code\modules\lighting\lighting_corner.dm"
|
||||
#include "code\modules\lighting\lighting_object.dm"
|
||||
#include "code\modules\lighting\lighting_setup.dm"
|
||||
#include "code\modules\lighting\lighting_source.dm"
|
||||
#include "code\modules\lighting\lighting_turf.dm"
|
||||
#include "code\modules\lighting\static_lighting_area.dm"
|
||||
|
||||
Reference in New Issue
Block a user