From e53223022a724240ec502f1ca4d4a1d3ca45d3df Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 10 Jul 2021 14:08:34 +0100 Subject: [PATCH] [MIRROR] Fixes a turf signal unregistration I missed, makes the transparent turf element detach (#6813) * Fixes a turf signal unregistration I missed, makes the transparent turf element detach (#60064) * Forgot to patch this up, the transparency element both does not detach on parent destroy, and with the new signal changes leads to signals persisting, which is bad and ick. This fixes that * Fixes a turf signal unregistration I missed, makes the transparent turf element detach Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/datums/elements/turf_transparency.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/elements/turf_transparency.dm b/code/datums/elements/turf_transparency.dm index 5d608d5a823..26b604b284e 100644 --- a/code/datums/elements/turf_transparency.dm +++ b/code/datums/elements/turf_transparency.dm @@ -1,5 +1,6 @@ /datum/element/turf_z_transparency + element_flags = ELEMENT_DETACH var/show_bottom_level = FALSE ///This proc sets up the signals to handle updating viscontents when turfs above/below update. Handle plane and layer here too so that they don't cover other obs/turfs in Dream Maker @@ -26,6 +27,7 @@ . = ..() var/turf/our_turf = source our_turf.vis_contents.len = 0 + UnregisterSignal(our_turf, list(COMSIG_TURF_MULTIZ_NEW, COMSIG_TURF_MULTIZ_DEL)) REMOVE_TRAIT(our_turf, TURF_Z_TRANSPARENT_TRAIT, TURF_TRAIT) ///Updates the viscontents or underlays below this tile.