diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
index 6a21d08245b..5ee5d4add96 100644
--- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
@@ -10,6 +10,8 @@
level = 1
+ connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes
+
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
@@ -69,8 +71,14 @@
if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
return
else
- add_underlay(T, node1, turn(dir, -180))
- add_underlay(T, node2, dir)
+ if (node1)
+ add_underlay(T, node1, turn(dir, -180), node1.icon_connect_type)
+ else
+ add_underlay(T, node1, turn(dir, -180))
+ if (node2)
+ add_underlay(T, node2, dir, node2.icon_connect_type)
+ else
+ add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/dp_vent_pump/hide(var/i)
update_icon()
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 24c771f94da..ab97a6f2fd8 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -182,9 +182,11 @@
if(!istype(T))
return
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
- pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
+ //pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
+ pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else
- pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
+ //pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
+ pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 51aca738187..b62139cf508 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -15,6 +15,8 @@
var/on = 0
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
+ var/scrub_O2 = 0
+ var/scrub_N2 = 0
var/scrub_CO2 = 1
var/scrub_Toxins = 0
var/scrub_N2O = 0
@@ -96,6 +98,8 @@
"power" = on,
"scrubbing" = scrubbing,
"panic" = panic,
+ "filter_o2" = scrub_O2,
+ "filter_n2" = scrub_N2,
"filter_co2" = scrub_CO2,
"filter_toxins" = scrub_Toxins,
"filter_n2o" = scrub_N2O,
@@ -142,6 +146,12 @@
//Filter it
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
+ if(scrub_O2)
+ filtered_out.oxygen = removed.oxygen
+ removed.oxygen = 0
+ if(scrub_N2)
+ filtered_out.nitrogen = removed.nitrogen
+ removed.nitrogen = 0
if(scrub_Toxins)
filtered_out.toxins = removed.toxins
removed.toxins = 0
@@ -219,6 +229,16 @@
scrubbing = text2num(signal.data["scrubbing"])
if(signal.data["toggle_scrubbing"])
scrubbing = !scrubbing
+
+ if(signal.data["o2_scrub"] != null)
+ scrub_O2 = text2num(signal.data["o2_scrub"])
+ if(signal.data["toggle_o2_scrub"])
+ scrub_O2 = !scrub_O2
+
+ if(signal.data["n2_scrub"] != null)
+ scrub_N2 = text2num(signal.data["n2_scrub"])
+ if(signal.data["toggle_n2_scrub"])
+ scrub_N2 = !scrub_N2
if(signal.data["co2_scrub"] != null)
scrub_CO2 = text2num(signal.data["co2_scrub"])
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 23f3c638f06..cc939c35dfe 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -7,16 +7,15 @@
var/frozen = 0 // used by the pipe freezer
force = 20
- //layer = 2.4 //under wires with their 2.44
+ layer = 2.4 //under wires with their 2.44
use_power = 0
var/alert_pressure = 80*ONE_ATMOSPHERE
//minimum pressure before check_pressure(...) should be called
-
/obj/machinery/atmospherics/pipe/New()
..()
//so pipes under walls are hidden
- if(!istype(get_turf(src), /turf/simulated/floor))
+ if(istype(get_turf(src), /turf/simulated/wall) || istype(get_turf(src), /turf/simulated/shuttle/wall) || istype(get_turf(src), /turf/unsimulated/wall))
level = 1
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
@@ -1031,7 +1030,7 @@
/obj/machinery/atmospherics/pipe/cap
name = "pipe endcap"
desc = "An endcap for pipes"
- icon = 'icons/obj/pipes.dmi'
+ icon = 'icons/atmos/pipes.dmi'
icon_state = "cap"
level = 2
layer = 2.4 //under wires with their 2.44
@@ -1039,21 +1038,13 @@
volume = 35
dir = SOUTH
- initialize_directions = NORTH
+ initialize_directions = SOUTH
var/obj/machinery/atmospherics/node
/obj/machinery/atmospherics/pipe/cap/New()
..()
- switch(dir)
- if(SOUTH)
- initialize_directions = NORTH
- if(NORTH)
- initialize_directions = SOUTH
- if(WEST)
- initialize_directions = EAST
- if(EAST)
- initialize_directions = WEST
+ initialize_directions = dir
/obj/machinery/atmospherics/pipe/cap/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
@@ -1084,11 +1075,20 @@
..()
-/obj/machinery/atmospherics/pipe/cap/update_icon()
- overlays = new()
+/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color)
+ ..()
+ //for updating connected atmos device pipes (i.e. vents, manifolds, etc)
+ if(node)
+ node.update_underlays()
- icon_state = "cap[invisibility ? "-f" : ""]"
- return
+/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
+ if(!check_icon_cache())
+ return
+
+ alpha = 255
+
+ overlays.Cut()
+ overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap")
/obj/machinery/atmospherics/pipe/cap/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
@@ -1108,10 +1108,46 @@
level = 2
icon_state = "cap"
+/obj/machinery/atmospherics/pipe/cap/visible/scrubbers
+ name = "scrubbers pipe endcap"
+ desc = "An endcap for scrubbers pipes"
+ icon_state = "cap-scrubbers"
+ connect_types = list(3)
+ layer = 2.38
+ icon_connect_type = "-scrubbers"
+ color = PIPE_COLOR_RED
+
+/obj/machinery/atmospherics/pipe/cap/visible/supply
+ name = "supply pipe endcap"
+ desc = "An endcap for supply pipes"
+ icon_state = "cap-supply"
+ connect_types = list(2)
+ layer = 2.39
+ icon_connect_type = "-supply"
+ color = PIPE_COLOR_BLUE
+
/obj/machinery/atmospherics/pipe/cap/hidden
level = 1
- icon_state = "cap-f"
+ icon_state = "cap"
+ alpha = 128
+/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers
+ name = "scrubbers pipe endcap"
+ desc = "An endcap for scrubbers pipes"
+ icon_state = "cap-f-scrubbers"
+ connect_types = list(3)
+ layer = 2.38
+ icon_connect_type = "-scrubbers"
+ color = PIPE_COLOR_RED
+
+/obj/machinery/atmospherics/pipe/cap/hidden/supply
+ name = "supply pipe endcap"
+ desc = "An endcap for supply pipes"
+ icon_state = "cap-f-supply"
+ connect_types = list(2)
+ layer = 2.39
+ icon_connect_type = "-supply"
+ color = PIPE_COLOR_BLUE
/obj/machinery/atmospherics/pipe/tank
icon = 'icons/atmos/tank.dmi'
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 0ab30e69690..b2fcd154036 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -756,6 +756,7 @@
"co2_scrub",
"tox_scrub",
"n2o_scrub",
+ "n2_scrub",
"o2_scrub",
"panic_siphon",
"scrubbing",
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index 0a29da013ab..c1cbc65c297 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -42,6 +42,8 @@ Buildable meters
#define PIPE_SCRUBBERS_MANIFOLD 34
#define PIPE_SUPPLY_MANIFOLD4W 35
#define PIPE_SCRUBBERS_MANIFOLD4W 36
+#define PIPE_SUPPLY_CAP 37
+#define PIPE_SCRUBBERS_CAP 38
/obj/item/pipe
name = "pipe"
@@ -136,6 +138,14 @@ Buildable meters
src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w))
src.pipe_type = PIPE_MANIFOLD4W
+ else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/cap/hidden/supply))
+ src.pipe_type = PIPE_SUPPLY_CAP
+ connect_types = list(2)
+ src.color = PIPE_COLOR_BLUE
+ else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/cap/hidden/scrubbers))
+ src.pipe_type = PIPE_SCRUBBERS_CAP
+ connect_types = list(3)
+ src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
src.pipe_type = PIPE_CAP
else if(istype(make_from, /obj/machinery/atmospherics/omni/mixer))
@@ -151,10 +161,10 @@ Buildable meters
else
src.pipe_type = pipe_type
src.dir = dir
- if (pipe_type == 29 || pipe_type == 30 || pipe_type == 33 || pipe_type == 35)
+ if (pipe_type == 29 || pipe_type == 30 || pipe_type == 33 || pipe_type == 35 || pipe_type == 37)
connect_types = list(2)
src.color = PIPE_COLOR_BLUE
- else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36)
+ else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38)
connect_types = list(3)
src.color = PIPE_COLOR_RED
else if (pipe_type == 28)
@@ -208,6 +218,8 @@ Buildable meters
"scrubbers manifold", \
"supply 4-way manifold", \
"scrubbers 4-way manifold", \
+ "supply pipe cap", \
+ "scrubbers pipe cap", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -251,6 +263,12 @@ Buildable meters
"manifold", \
"manifold4w", \
"manifold4w", \
+ "cap", \
+ "cap", \
+ "cap", \
+ "cap", \
+ "cap", \
+ "cap", \
)
icon_state = islist[pipe_type + 1]
@@ -328,8 +346,8 @@ Buildable meters
return dir|flip|acw
if(PIPE_GAS_MIXER_T)
return dir|cw|acw
- if(PIPE_CAP)
- return flip
+ if(PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP)
+ return dir
///// Z-Level stuff
if(PIPE_UP,PIPE_DOWN)
return dir
@@ -886,6 +904,26 @@ Buildable meters
if(C.node)
C.node.initialize()
C.node.build_network()
+
+ if(PIPE_SUPPLY_CAP)
+ var/obj/machinery/atmospherics/pipe/cap/hidden/supply/C = new(src.loc)
+ C.dir = dir
+ C.initialize_directions = pipe_dir
+ C.initialize()
+ C.build_network()
+ if(C.node)
+ C.node.initialize()
+ C.node.build_network()
+
+ if(PIPE_SCRUBBERS_CAP)
+ var/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers/C = new(src.loc)
+ C.dir = dir
+ C.initialize_directions = pipe_dir
+ C.initialize()
+ C.build_network()
+ if(C.node)
+ C.node.initialize()
+ C.node.build_network()
if(PIPE_PASSIVE_GATE) //passive gate
var/obj/machinery/atmospherics/binary/passive_gate/P = new(src.loc)
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index a5f12adfd98..e52737efd8f 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -26,11 +26,13 @@
Pipe
Bent Pipe
Manifold
+Pipe Cap
4-Way Manifold
Scrubbers pipes:
Pipe
Bent Pipe
Manifold
+Pipe Cap
4-Way Manifold
Devices:
Universal Pipe Adapter
diff --git a/icons/obj/pipes.dmi b/icons/obj/pipes.dmi
index 7a99757c0dd..eb005aaf313 100644
Binary files a/icons/obj/pipes.dmi and b/icons/obj/pipes.dmi differ
diff --git a/nano/templates/air_alarm.tmpl b/nano/templates/air_alarm.tmpl
index 5d5437390f5..9c850641e01 100644
--- a/nano/templates/air_alarm.tmpl
+++ b/nano/templates/air_alarm.tmpl
@@ -191,6 +191,7 @@ Used In File(s): /code/game/machinery/alarm.dm
{{:helper.link('Plasma', null,{'id_tag':value.id_tag,'command':'tox_scrub','val':(value.filter_toxins==0?1:0)},null,(value.filter_toxins?'linkOn':''))}}
{{:helper.link('N2O',null,{'id_tag':value.id_tag,'command':'n2o_scrub','val':(value.filter_n2o==0?1:0)},null,(value.filter_n2o?'linkOn':''))}}
{{:helper.link('O2', null,{'id_tag':value.id_tag,'command':'o2_scrub', 'val':(value.filter_o2 ==0?1:0)},null,(value.filter_o2 ?'linkOn':''))}}
+ {{:helper.link('N2', null,{'id_tag':value.id_tag,'command':'n2_scrub', 'val':(value.filter_n2 ==0?1:0)},null,(value.filter_n2 ?'linkOn':''))}}
{{/if}}