From 66cf07ff1433e37133b84e934847f80706a1be09 Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Sat, 2 Sep 2023 18:13:33 +0300 Subject: [PATCH 1/4] Open turfs handle space below --- code/game/turfs/turf_changing.dm | 2 +- code/modules/multiz/turf.dm | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index b3421ff9ca6..3bb4dfe4640 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -24,7 +24,7 @@ // This makes sure that turfs are not changed to space when one side is part of a zone if(N == /turf/space) var/turf/below = GetBelow(src) - if(istype(below) && !istype(below,/turf/space)) + if(istype(below)) N = /turf/simulated/open var/old_air = air diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index 0df38f66741..baf22928915 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -106,3 +106,19 @@ //Most things use is_plating to test if there is a cover tile on top (like regular floors) /turf/simulated/open/is_plating() return 1 + +// This is for handling light on open turfs above space turfs +/turf/simulated/open/update_mimic() + . = ..() + if(!.) + return + var/turf/T = GetBelow(src) + if(!istype(T)) + return + + if(T.dynamic_lighting) + dynamic_lighting = TRUE + lighting_build_overlay() + else + dynamic_lighting = FALSE + lighting_clear_overlay() From 1149eb49871d965d7cead44f6649da5ba6da6811 Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Sat, 2 Sep 2023 18:27:15 +0300 Subject: [PATCH 2/4] "Shadower" gets less dark when turf below has no dynamic lighting --- code/modules/multiz/turf.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index baf22928915..cbee587e930 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -118,7 +118,9 @@ if(T.dynamic_lighting) dynamic_lighting = TRUE + shadower?.alpha = initial(shadower.alpha) lighting_build_overlay() else dynamic_lighting = FALSE + shadower?.alpha = initial(shadower.alpha) * 0.5 lighting_clear_overlay() From 00a7ce09b99b3575ae8027b65ec16d4a857cc0fe Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Sat, 2 Sep 2023 18:37:23 +0300 Subject: [PATCH 3/4] Fix --- code/modules/multiz/zmimic/mimic_turf.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/multiz/zmimic/mimic_turf.dm b/code/modules/multiz/zmimic/mimic_turf.dm index 5dc53daada4..0e842560602 100644 --- a/code/modules/multiz/zmimic/mimic_turf.dm +++ b/code/modules/multiz/zmimic/mimic_turf.dm @@ -31,10 +31,11 @@ /turf/proc/update_mimic() if (!(z_flags & ZM_MIMIC_BELOW)) - return + return FALSE z_queued += 1 SSzcopy.queued_turfs += src + return TRUE /// Enables Z-mimic for a turf that didn't already have it enabled. /turf/proc/enable_zmimic(additional_flags = 0) From 7b817e76a436bcc1b7d13478bd7c79bc8b5d74ab Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Sat, 2 Sep 2023 19:16:22 +0300 Subject: [PATCH 4/4] oops --- code/modules/multiz/turf.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index cbee587e930..2716a87a7a2 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -118,9 +118,9 @@ if(T.dynamic_lighting) dynamic_lighting = TRUE - shadower?.alpha = initial(shadower.alpha) + shadower?.color = initial(shadower.color) lighting_build_overlay() else dynamic_lighting = FALSE - shadower?.alpha = initial(shadower.alpha) * 0.5 + shadower?.color = "#00000032" lighting_clear_overlay()