From 045646547082e72a25a9aa2dbaeb8164119c35fb Mon Sep 17 00:00:00 2001 From: Kyep Date: Mon, 2 Jan 2017 03:36:12 -0800 Subject: [PATCH 1/2] Fixes #5097 --- code/ATMOSPHERICS/components/unary_devices/vent_pump.dm | 3 +++ code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm | 2 ++ 2 files changed, 5 insertions(+) diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 37ce3b19057..7d73e7d7a19 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -100,6 +100,9 @@ overlays += icon_manager.get_atmos_icon("device", , , vent_icon) + pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view) + pipe_image.plane = HUD_PLANE + /obj/machinery/atmospherics/unary/vent_pump/update_underlays() if(..()) underlays.Cut() diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 244e9c26aa3..92fc9e4d160 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -107,6 +107,8 @@ scrubber_icon = "scrubberweld" overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon) + pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view) + pipe_image.plane = HUD_PLANE /obj/machinery/atmospherics/unary/vent_scrubber/update_underlays() if(..()) From 9b008e6635e233995bb6c259f604d14f12fcdbd2 Mon Sep 17 00:00:00 2001 From: Kyep Date: Mon, 2 Jan 2017 03:40:14 -0800 Subject: [PATCH 2/2] Improvement --- code/ATMOSPHERICS/atmospherics.dm | 4 ++++ code/ATMOSPHERICS/components/unary_devices/vent_pump.dm | 3 +-- code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm | 3 +-- code/modules/mob/living/carbon/carbon.dm | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index fad455ed438..47c5689054c 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -66,6 +66,10 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/update_icon() return null +/obj/machinery/atmospherics/proc/update_pipe_image() + pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view) + pipe_image.plane = HUD_PLANE + /obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0) if(!istype(icon_manager)) if(!safety) //to prevent infinite loops diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 7d73e7d7a19..299d0c20e22 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -100,8 +100,7 @@ overlays += icon_manager.get_atmos_icon("device", , , vent_icon) - pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view) - pipe_image.plane = HUD_PLANE + update_pipe_image() /obj/machinery/atmospherics/unary/vent_pump/update_underlays() if(..()) diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 92fc9e4d160..5554723c945 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -107,8 +107,7 @@ scrubber_icon = "scrubberweld" overlays += icon_manager.get_atmos_icon("device", , , scrubber_icon) - pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view) - pipe_image.plane = HUD_PLANE + update_pipe_image() /obj/machinery/atmospherics/unary/vent_scrubber/update_underlays() if(..()) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index a26b5e967af..fed16671887 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -454,8 +454,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, totalMembers |= pipeline.other_atmosmch for(var/obj/machinery/atmospherics/A in totalMembers) if(!A.pipe_image) - A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) //the 20 puts it above Byond's darkness (not its opacity view) - A.pipe_image.plane = HUD_PLANE + A.update_pipe_image() pipes_shown += A.pipe_image client.images += A.pipe_image