From 799ef678e4fbee8aa00a8fbfd0b10d9a3067cb44 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:33:27 +0100 Subject: [PATCH] fix a light issue (#9886) --- code/game/turfs/turf_changing.dm | 2 +- code/modules/lighting/sunlight_handler_ch.dm | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index d51fddedb0..81dca41144 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -182,7 +182,7 @@ propogate_sunlight_changes(oldtype, old_density, new_turf) var/turf/simulated/cur_turf = src - if(is_open != was_open) + if(istype(cur_turf) && is_open != was_open) do cur_turf = GetBelow(cur_turf) if(is_open) diff --git a/code/modules/lighting/sunlight_handler_ch.dm b/code/modules/lighting/sunlight_handler_ch.dm index 6f371d6dcd..ce286143e5 100644 --- a/code/modules/lighting/sunlight_handler_ch.dm +++ b/code/modules/lighting/sunlight_handler_ch.dm @@ -25,6 +25,11 @@ shandler = new(src) shandler.manualInit() +/turf/simulated/lighting_build_overlay() + ..() + if(shandler) + shandler.only_sun_object = lighting_object + /datum/sunlight_handler var/datum/simple_sun/sun var/turf/simulated/holder