mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 06:22:26 +01:00
Starlight Fix (#22929)
* Fix starlight not working on overmap and overship maps.
This commit is contained in:
@@ -244,6 +244,7 @@
|
||||
for (var/obj/structure/machinery/machine as anything in machines)
|
||||
machine.power_change()
|
||||
|
||||
var/list/space_turfs_to_update
|
||||
for (var/turf/T as anything in turfs)
|
||||
T.post_change(FALSE)
|
||||
if(template_flags & TEMPLATE_FLAG_NO_RUINS)
|
||||
@@ -252,6 +253,11 @@
|
||||
if(istype(T,/turf/simulated))
|
||||
var/turf/simulated/sim = T
|
||||
sim.update_air_properties()
|
||||
if(GLOB.config.starlight)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/neighbor = get_step(sim, direction)
|
||||
if(istype(neighbor, /turf/space))
|
||||
LAZYSET(space_turfs_to_update, neighbor, TRUE)
|
||||
|
||||
if(SSlighting.initialized) //don't generate lighting overlays before SSlighting in case these templates are loaded before
|
||||
var/area/A = T.loc
|
||||
@@ -259,6 +265,10 @@
|
||||
continue
|
||||
T.static_lighting_build_overlay()
|
||||
|
||||
// New z-level space initializes before its template is placed, so refresh each affected space turf once.
|
||||
for(var/turf/space/space_turf as anything in space_turfs_to_update)
|
||||
space_turf.update_starlight(TRUE)
|
||||
|
||||
/datum/map_template/proc/load(turf/T, centered = FALSE)
|
||||
last_load_error = null
|
||||
if(centered)
|
||||
|
||||
Reference in New Issue
Block a user