From 8bc56189dcbba2b87d7477ef6e92cb29d470c70b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 24 Feb 2023 10:20:15 +0100 Subject: [PATCH] [MIRROR] Fixes lava not drawing light up on multiz [MDB IGNORE] (#19511) * Fixes lava not drawing light up on multiz (#73591) ## About The Pull Request Whooooooops This isn't the best way to do this, but it'd require messing with openspace code, and I don't want to make this overcomplex, so we'll just spend extra on multiz then. * Fixes lava not drawing light up on multiz --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/game/turfs/open/lava.dm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/open/lava.dm b/code/game/turfs/open/lava.dm index 4bc2c47fb7f..55863fc9f7e 100644 --- a/code/game/turfs/open/lava.dm +++ b/code/game/turfs/open/lava.dm @@ -65,7 +65,16 @@ /// Refreshes this lava turf's lighting /turf/open/lava/proc/refresh_light() var/border_turf = FALSE - for(var/turf/around as anything in RANGE_TURFS(1, src)) + var/list/turfs_to_check = RANGE_TURFS(1, src) + if(GET_LOWEST_STACK_OFFSET(z)) + var/turf/above = SSmapping.get_turf_above(src) + if(above) + turfs_to_check += RANGE_TURFS(1, above) + var/turf/below = SSmapping.get_turf_below(src) + if(below) + turfs_to_check += RANGE_TURFS(1, below) + + for(var/turf/around as anything in turfs_to_check) if(islava(around)) continue border_turf = TRUE @@ -81,7 +90,15 @@ if(result && !islava(result)) // We have gone from a lava turf to a non lava turf, time to let them know - for(var/turf/open/lava/inform in RANGE_TURFS(1, result)) + var/list/turfs_to_check = RANGE_TURFS(1, result) + if(GET_LOWEST_STACK_OFFSET(z)) + var/turf/above = SSmapping.get_turf_above(result) + if(above) + turfs_to_check += RANGE_TURFS(1, above) + var/turf/below = SSmapping.get_turf_below(result) + if(below) + turfs_to_check += RANGE_TURFS(1, below) + for(var/turf/open/lava/inform in turfs_to_check) inform.set_light(l_on = TRUE) return result