mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Further atmos fixes
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"])
|
||||
|
||||
+55
-19
@@ -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'
|
||||
|
||||
@@ -756,6 +756,7 @@
|
||||
"co2_scrub",
|
||||
"tox_scrub",
|
||||
"n2o_scrub",
|
||||
"n2_scrub",
|
||||
"o2_scrub",
|
||||
"panic_siphon",
|
||||
"scrubbing",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
<A href='?src=\ref[src];make=29;dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=30;dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=33;dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=37;dir=1'>Pipe Cap</A><BR>
|
||||
<A href='?src=\ref[src];make=35;dir=1'>4-Way Manifold</A><BR>
|
||||
<b>Scrubbers pipes:</b><BR>
|
||||
<A href='?src=\ref[src];make=31;dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=32;dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=34;dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=38;dir=1'>Pipe Cap</A><BR>
|
||||
<A href='?src=\ref[src];make=36;dir=1'>4-Way Manifold</A><BR>
|
||||
<b>Devices:</b><BR>
|
||||
<A href='?src=\ref[src];make=28;dir=1'>Universal Pipe Adapter</A><BR>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 88 KiB |
@@ -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('N<sub>2</sub>O',null,{'id_tag':value.id_tag,'command':'n2o_scrub','val':(value.filter_n2o==0?1:0)},null,(value.filter_n2o?'linkOn':''))}}
|
||||
{{:helper.link('O<sub>2</sub>', null,{'id_tag':value.id_tag,'command':'o2_scrub', 'val':(value.filter_o2 ==0?1:0)},null,(value.filter_o2 ?'linkOn':''))}}
|
||||
{{:helper.link('N<sub>2</sub>', null,{'id_tag':value.id_tag,'command':'n2_scrub', 'val':(value.filter_n2 ==0?1:0)},null,(value.filter_n2 ?'linkOn':''))}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user