From 71b36b59a01d0833afd203e3d509b20f8f4330b0 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Mon, 21 Aug 2023 14:08:24 -0400 Subject: [PATCH] Being outdoors doesn't mean you can be dark forever --- code/modules/lighting/lighting_fake_sun_vr.dm | 3 +++ code/modules/lighting/lighting_turf.dm | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/lighting/lighting_fake_sun_vr.dm b/code/modules/lighting/lighting_fake_sun_vr.dm index 55d07337620..ef1ebbc44e8 100644 --- a/code/modules/lighting/lighting_fake_sun_vr.dm +++ b/code/modules/lighting/lighting_fake_sun_vr.dm @@ -1,3 +1,5 @@ +var/static/list/fake_sunlight_zs = list() + /obj/effect/fake_sun name = "fake sun" desc = "Deletes itself, but first updates all the lighting on outdoor turfs." @@ -140,6 +142,7 @@ sun.set_alpha(round(CLAMP01(choice["brightness"])*255,1)) if(do_sun) + fake_sunlight_zs |= z for(var/turf/T as anything in turfs_to_use) sun.apply_to_turf(T) diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index 90343e5b900..8cfbe45fc84 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -97,8 +97,12 @@ ///Setter for the byond luminosity var /turf/proc/set_luminosity(new_luminosity, force) // SSplanets handles outdoor turfs - if((is_outdoors() && !force) || outdoors_adjacent) + if(force) + luminosity = new_luminosity return + if(is_outdoors() || outdoors_adjacent) + if((z in SSplanets.z_to_planet) || (z in fake_sunlight_zs)) + return luminosity = new_luminosity