mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 17:11:22 +00:00
changes: ChangeTurf no longer breaks lighting when switching from statically lit turfs to dynamically lit turfs. Human-types' is_noisy value is now updated on spawn; boots should now make footstep SFX without having to take them off and put them back on. Fixed a logic error in is_noisy calculations which could have lead to false-negatives. Shells can now wear socks & undershirts. Fixed a bug where changing the dynamic lighting status on an area would attempt to build lighting overlays for the entire map. Fixes #2027. Fixes #1982.
30 lines
545 B
Plaintext
30 lines
545 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 src)
|
|
if (T.dynamic_lighting)
|
|
T.lighting_build_overlay()
|
|
|
|
else
|
|
for (var/turf/T in src)
|
|
if (T.lighting_overlay)
|
|
T.lighting_clear_overlay()
|
|
|
|
return TRUE
|