Files
Aurora.3/code/modules/lighting/lighting_area.dm
Lohikar bc441ab9d6 Miscellaneous Tweaks (#1720)
changes:

Refactored footstep sounds to use less operations & only calculate for human-types.
Improved the logging detail of the lighting profiler.
Fixed some shuttle corners that weren't correctly working with parallax space.
Converted get_turf() into a compiler macro.
Solars are now dynamically lit.
Silenced warning from lighting overlays pooling themselves when updated on a space tile.
Fixed a bug where securing a girder was instant when it was supposed to have a delay.
2017-02-07 18:46:39 +02:00

30 lines
549 B
Plaintext

/area
luminosity = TRUE
var/dynamic_lighting = TRUE
/area/New()
. = ..()
if (dynamic_lighting)
luminosity = FALSE
/area/proc/set_dynamic_lighting(var/new_dynamic_lighting = TRUE)
L_PROF(src, "area_sdl")
if (new_dynamic_lighting == dynamic_lighting)
return FALSE
dynamic_lighting = new_dynamic_lighting
if (new_dynamic_lighting)
for (var/turf/T in turfs)
if (T.dynamic_lighting)
T.lighting_build_overlay()
else
for (var/turf/T in turfs)
if (T.lighting_overlay)
T.lighting_clear_overlay()
return TRUE