From ca09f34c3a80c7c24c8d9b1e6667d83b813e4358 Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 14 Aug 2015 17:26:07 -0600 Subject: [PATCH] this was a far better solution --- .../components/binary_devices/binary_atmos_base.dm | 1 - code/ATMOSPHERICS/components/components_base.dm | 13 ++++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm index b78301584cb..b6490a986f5 100644 --- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm +++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm @@ -19,7 +19,6 @@ Iconnery */ /obj/machinery/atmospherics/components/binary/hide(intact) - showpipe = !intact update_icon() ..(intact) diff --git a/code/ATMOSPHERICS/components/components_base.dm b/code/ATMOSPHERICS/components/components_base.dm index 78b8e212885..9f63f655d34 100644 --- a/code/ATMOSPHERICS/components/components_base.dm +++ b/code/ATMOSPHERICS/components/components_base.dm @@ -20,7 +20,8 @@ On top of that, now people can add component-speciic procs/vars if they want! #define NODE3 "n3" /obj/machinery/atmospherics/components/ - var/welded //Used on pumps and scrubbers + var/welded = 0 //Used on pumps and scrubbers + var/showpipe = 0 var/device_type = 0//used for initialization stuff //UNARY = 1 @@ -56,12 +57,18 @@ Iconnery /obj/machinery/atmospherics/components/proc/update_icon_nopipes() return -/obj/machinery/atmospherics/components/update_icon() //not working +/obj/machinery/atmospherics/components/update_icon() update_icon_nopipes() underlays.Cut() - if(!(level == 2 || istype(loc, /turf/simulated/floor/plating))) //shows pipes when laid on plating, too + var/turf/T = loc + if(level == 2 || !T.intact) + showpipe = 1 + else + showpipe = 0 + + if(!showpipe) return //no need to update the pipes if they aren't showing var/connected = 0