From 9b75113631e98954cecfa3ddddba445454aec11a Mon Sep 17 00:00:00 2001 From: Emmett Gaines Date: Tue, 14 Nov 2017 18:46:34 -0500 Subject: [PATCH] [512] Makes gas mouse transparent (#32569) * Makes gas mouse transparent * readability cleanup * future proofing --- .../environmental/LINDA_turf_tile.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index 265731e96e..b90f27c372 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -97,7 +97,23 @@ /turf/open/proc/update_visuals() var/list/new_overlay_types = tile_graphic() + var/list/atmos_overlay_types = src.atmos_overlay_types // Cache for free performance + #if DM_VERSION >= 513 + #warning 512 is stable now for sure, remove the old code + #endif + + #if DM_VERSION >= 512 + if (atmos_overlay_types) + for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added + vis_contents -= overlay + + if (new_overlay_types.len) + if (atmos_overlay_types) + vis_contents += new_overlay_types - atmos_overlay_types //don't add overlays that already exist + else + vis_contents += new_overlay_types + #else if (atmos_overlay_types) for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added cut_overlay(overlay) @@ -107,6 +123,7 @@ add_overlay(new_overlay_types - atmos_overlay_types) //don't add overlays that already exist else add_overlay(new_overlay_types) + #endif UNSETEMPTY(new_overlay_types) atmos_overlay_types = new_overlay_types