From 589c1ed165b0c299c96df10944f6e86668b8958a Mon Sep 17 00:00:00 2001 From: duncathan Date: Thu, 13 Aug 2015 17:53:35 -0600 Subject: [PATCH 1/3] components' pipes now show on plating --- code/ATMOSPHERICS/components/components_base.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/ATMOSPHERICS/components/components_base.dm b/code/ATMOSPHERICS/components/components_base.dm index 78bd351c9f4..78b8e212885 100644 --- a/code/ATMOSPHERICS/components/components_base.dm +++ b/code/ATMOSPHERICS/components/components_base.dm @@ -21,7 +21,6 @@ On top of that, now people can add component-speciic procs/vars if they want! /obj/machinery/atmospherics/components/ var/welded //Used on pumps and scrubbers - var/showpipe = 0 var/device_type = 0//used for initialization stuff //UNARY = 1 @@ -61,7 +60,8 @@ Iconnery update_icon_nopipes() underlays.Cut() - if(!showpipe) + + if(!(level == 2 || istype(loc, /turf/simulated/floor/plating))) //shows pipes when laid on plating, too return //no need to update the pipes if they aren't showing var/connected = 0 @@ -91,8 +91,6 @@ Pipenet stuff; housekeeping if(target.initialize_directions & get_dir(target,src)) nodes["n[I]"] = target break - if(level == 2) - showpipe = 1 update_icon() /obj/machinery/atmospherics/components/construction() From ca09f34c3a80c7c24c8d9b1e6667d83b813e4358 Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 14 Aug 2015 17:26:07 -0600 Subject: [PATCH 2/3] 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 From b58b2694da4f473042e14d4dddc75db7ec38d642 Mon Sep 17 00:00:00 2001 From: duncathan Date: Mon, 17 Aug 2015 00:13:26 -0600 Subject: [PATCH 3/3] missed something --- code/ATMOSPHERICS/components/unary_devices/unary_base.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm index 96b99f52fd1..44519b8245f 100644 --- a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm +++ b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm @@ -12,8 +12,7 @@ Iconnery */ -/obj/machinery/atmospherics/components/unary/hide(var/intact) - showpipe = !intact +/obj/machinery/atmospherics/components/unary/hide(intact) update_icon() ..(intact)