Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-01-27 23:35:35 -07:00
323 changed files with 16725 additions and 11570 deletions
@@ -8,24 +8,14 @@
/obj/machinery/atmospherics/components/binary/SetInitDirections()
switch(dir)
if(NORTH)
if(NORTH, SOUTH)
initialize_directions = NORTH|SOUTH
if(SOUTH)
initialize_directions = NORTH|SOUTH
if(EAST)
if(EAST, WEST)
initialize_directions = EAST|WEST
if(WEST)
initialize_directions = EAST|WEST
/*
Iconnery
*/
/obj/machinery/atmospherics/components/binary/hide(intact)
update_icon()
..(intact)
/*
Housekeeping and pipe network stuff
*/
..()
/obj/machinery/atmospherics/components/binary/getNodeConnects()
return list(turn(dir, 180), dir)
@@ -1,13 +1,12 @@
/*
Acts like a normal vent, but has an input AND output.
*/
//Acts like a normal vent, but has an input AND output.
#define EXT_BOUND 1
#define INPUT_MIN 2
#define OUTPUT_MAX 4
/obj/machinery/atmospherics/components/binary/dp_vent_pump
icon = 'icons/obj/atmospherics/components/unary_devices.dmi' //We reuse the normal vent icons!
icon_state = "dpvent_map"
icon_state = "dpvent_map-2"
//node2 is output port
//node1 is input port
@@ -27,97 +26,25 @@ Acts like a normal vent, but has an input AND output.
var/output_pressure_max = 0
var/pressure_checks = EXT_BOUND
//EXT_BOUND: Do not pass external_pressure_bound
//INPUT_MIN: Do not pass input_pressure_min
//OUTPUT_MAX: Do not pass output_pressure_max
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on
on = TRUE
icon_state = "dpvent_map_on"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy()
SSradio.remove_object(src, frequency)
return ..()
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
name = "large dual-port air vent"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_toxmix
id = INCINERATOR_TOXMIX_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_atmos
id = INCINERATOR_ATMOS_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_syndicatelava
id = INCINERATOR_SYNDICATELAVA_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on
on = TRUE
icon_state = "dpvent_map_on"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
air1.volume = 1000
air2.volume = 1000
/obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes()
cut_overlays()
if(showpipe)
add_overlay(getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "dpvent_cap"))
var/image/cap = getpipeimage(icon, "dpvent_cap", dir, piping_layer = piping_layer)
add_overlay(cap)
if(!on || !is_operational())
icon_state = "vent_off"
return
if(pump_direction)
icon_state = "vent_out"
else
icon_state = "vent_in"
icon_state = pump_direction ? "vent_out" : "vent_in"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/process_atmos()
..()
@@ -248,6 +175,70 @@ Acts like a normal vent, but has an input AND output.
broadcast_status()
update_icon()
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
name = "large dual-port air vent"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
air1.volume = 1000
air2.volume = 1000
// Mapping
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer1
piping_layer = 1
icon_state = "dpvent_map-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/layer3
piping_layer = 3
icon_state = "dpvent_map-3"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on
on = TRUE
icon_state = "dpvent_map_on-2"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer1
piping_layer = 1
icon_state = "dpvent_map_on-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on/layer3
piping_layer = 3
icon_state = "dpvent_map_on-3"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_toxmix
id = INCINERATOR_TOXMIX_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_atmos
id = INCINERATOR_ATMOS_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/incinerator_syndicatelava
id = INCINERATOR_SYNDICATELAVA_DP_VENTPUMP
frequency = FREQ_AIRLOCK_CONTROL
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer1
piping_layer = 1
icon_state = "dpvent_map-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/layer3
piping_layer = 3
icon_state = "dpvent_map-3"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on
on = TRUE
icon_state = "dpvent_map_on-2"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer1
piping_layer = 1
icon_state = "dpvent_map_on-1"
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on/layer3
piping_layer = 3
icon_state = "dpvent_map_on-3"
#undef EXT_BOUND
#undef INPUT_MIN
#undef OUTPUT_MAX
@@ -7,12 +7,13 @@ Passive gate is similar to the regular pump except:
*/
/obj/machinery/atmospherics/components/binary/passive_gate
icon_state = "passgate_map"
icon_state = "passgate_map-2"
name = "passive gate"
desc = "A one-way air valve that does not require power."
can_unwrench = TRUE
shift_underlay_only = FALSE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
@@ -25,27 +26,15 @@ Passive gate is similar to the regular pump except:
construction_type = /obj/item/pipe/directional
pipe_state = "passivegate"
/obj/machinery/atmospherics/components/binary/passive_gate/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/passive_gate/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/binary/passive_gate/update_icon_nopipes()
if(!on)
icon_state = "passgate_off"
cut_overlays()
return
add_overlay(getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "passgate_on"))
cut_overlays()
icon_state = "passgate_off"
if(on)
add_overlay(getpipeimage(icon, "passgate_on"))
/obj/machinery/atmospherics/components/binary/passive_gate/process_atmos()
..()
@@ -176,3 +165,11 @@ Passive gate is similar to the regular pump except:
if(. && on)
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
/obj/machinery/atmospherics/components/binary/passive_gate/layer1
piping_layer = 1
icon_state = "passgate_map-1"
/obj/machinery/atmospherics/components/binary/passive_gate/layer3
piping_layer = 3
icon_state = "passgate_map-3"
@@ -1,23 +1,22 @@
/*
Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
node1, air1, network1 correspond to input
node2, air2, network2 correspond to output
Thus, the two variables affect pump operation are set in New():
air1.volume
This is the volume of gas available to the pump that may be transfered to the output
air2.volume
Higher quantities of this cause more air to be perfected later
but overall network volume is also increased as this increases...
*/
// Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
//
// node1, air1, network1 correspond to input
// node2, air2, network2 correspond to output
//
// Thus, the two variables affect pump operation are set in New():
// air1.volume
// This is the volume of gas available to the pump that may be transfered to the output
// air2.volume
// Higher quantities of this cause more air to be perfected later
// but overall network volume is also increased as this increases...
/obj/machinery/atmospherics/components/binary/pump
icon_state = "pump_map"
icon_state = "pump_map-2"
name = "gas pump"
desc = "A pump that moves gas by pressure."
can_unwrench = TRUE
shift_underlay_only = FALSE
var/target_pressure = ONE_ATMOSPHERE
@@ -54,30 +53,6 @@ Thus, the two variables affect pump operation are set in New():
message_admins("Pump, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
return TRUE
/obj/machinery/atmospherics/components/binary/pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
icon_state = "pump_on_map"
/obj/machinery/atmospherics/components/binary/pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/Destroy()
SSradio.remove_object(src,frequency)
if(radio_connection)
@@ -85,11 +60,7 @@ Thus, the two variables affect pump operation are set in New():
return ..()
/obj/machinery/atmospherics/components/binary/pump/update_icon_nopipes()
if(!is_operational())
icon_state = "pump_off"
return
icon_state = "pump_[on?"on":"off"]"
icon_state = (on && is_operational()) ? "pump_on" : "pump_off"
/obj/machinery/atmospherics/components/binary/pump/process_atmos()
// ..()
@@ -222,3 +193,23 @@ Thus, the two variables affect pump operation are set in New():
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
return TRUE
/obj/machinery/atmospherics/components/binary/pump/layer1
piping_layer = 1
icon_state= "pump_map-1"
/obj/machinery/atmospherics/components/binary/pump/layer3
piping_layer = 3
icon_state= "pump_map-3"
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
icon_state = "pump_on_map-2"
/obj/machinery/atmospherics/components/binary/pump/on/layer1
piping_layer = 1
icon_state= "pump_on_map-1"
/obj/machinery/atmospherics/components/binary/pump/on/layer3
piping_layer = 3
icon_state= "pump_on_map-3"
@@ -5,6 +5,7 @@
icon_state = "relief_valve-t-map"
can_unwrench = TRUE
construction_type = /obj/item/pipe/binary
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
@@ -50,9 +51,11 @@
if(!is_operational())
return
var/datum/gas_mixture/air_contents = airs[1]
var/our_pressure = air_contents.return_pressure()
if(opened && our_pressure < close_pressure)
var/datum/gas_mixture/air_one = airs[1]
var/datum/gas_mixture/air_two = airs[2]
var/air_one_pressure = air_one.return_pressure()
var/our_pressure = abs(air_one_pressure - air_two.return_pressure())
if(opened && air_one_pressure < close_pressure)
close()
else if(!opened && our_pressure >= open_pressure)
open()
@@ -3,12 +3,15 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
*/
/obj/machinery/atmospherics/components/binary/valve
icon_state = "mvalve_map"
icon_state = "mvalve_map-2"
name = "manual valve"
desc = "A pipe with a valve that can be used to disable flow of gas through it."
can_unwrench = TRUE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN //Intentionally no allow_silicon flag
shift_underlay_only = FALSE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN //Intentionally no allow_silicon flag
pipe_flags = PIPING_CARDINAL_AUTONORMALIZE
var/frequency = 0
var/id = null
@@ -20,101 +23,87 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
var/switching = FALSE
/obj/machinery/atmospherics/components/binary/valve/update_icon_nopipes(animation = FALSE)
normalize_cardinal_directions()
if(animation)
flick("[valve_type]valve_[on][!on]", src)
icon_state = "[valve_type]valve_[on ? "on" : "off"]"
/obj/machinery/atmospherics/components/binary/valve/proc/toggle()
if(on)
on = FALSE
update_icon_nopipes()
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
else
on = TRUE
update_icon_nopipes()
update_parents()
var/datum/pipeline/parent1 = parents[1]
parent1.reconcile_air()
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
/obj/machinery/atmospherics/components/binary/valve/interact(mob/user)
add_fingerprint(usr)
if(switching)
return
update_icon_nopipes(TRUE)
switching = TRUE
addtimer(CALLBACK(src, .proc/finish_interact), 10)
/obj/machinery/atmospherics/components/binary/valve/proc/finish_interact()
toggle()
switching = FALSE
/obj/machinery/atmospherics/components/binary/valve/digital // can be controlled by AI
icon_state = "dvalve_map-2"
name = "digital valve"
desc = "A digitally controlled valve."
valve_type = "d"
pipe_state = "dvalve"
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN | INTERACT_MACHINE_OPEN_SILICON
/obj/machinery/atmospherics/components/binary/valve/digital/update_icon_nopipes(animation)
if(!is_operational())
normalize_cardinal_directions()
icon_state = "dvalve_nopower"
return
..()
/obj/machinery/atmospherics/components/binary/valve/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "mvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
piping_layer = 3
icon_state = "mvalve_map-3"
/obj/machinery/atmospherics/components/binary/valve/on
on = TRUE
/obj/machinery/atmospherics/components/binary/valve/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "mvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/valve/update_icon_nopipes(animation = 0)
normalize_dir()
if(animation)
flick("[valve_type]valve_[on][!on]",src)
icon_state = "[valve_type]valve_[on?"on":"off"]"
/obj/machinery/atmospherics/components/binary/valve/proc/open()
on = TRUE
update_icon_nopipes()
update_parents()
var/datum/pipeline/parent1 = parents[1]
parent1.reconcile_air()
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
/obj/machinery/atmospherics/components/binary/valve/proc/close()
on = FALSE
update_icon_nopipes()
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
/obj/machinery/atmospherics/components/binary/valve/proc/normalize_dir()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
/obj/machinery/atmospherics/components/binary/valve/interact(mob/user)
add_fingerprint(usr)
update_icon_nopipes(1)
if(switching)
return
switching = TRUE
sleep(10)
if(on)
close()
else
open()
switching = FALSE
/obj/machinery/atmospherics/components/binary/valve/digital // can be controlled by AI
name = "digital valve"
desc = "A digitally controlled valve."
icon_state = "dvalve_map"
valve_type = "d"
pipe_state = "dvalve"
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_OPEN | INTERACT_MACHINE_OPEN_SILICON
piping_layer = 3
icon_state = "mvalve_map-3"
/obj/machinery/atmospherics/components/binary/valve/digital/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "dvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/digital/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
piping_layer = 3
icon_state = "dvalve_map-3"
/obj/machinery/atmospherics/components/binary/valve/digital/on
on = TRUE
/obj/machinery/atmospherics/components/binary/valve/digital/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "dvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/digital/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/valve/digital/update_icon_nopipes(animation)
if(!is_operational())
normalize_dir()
icon_state = "dvalve_nopower"
return
..()
piping_layer = 3
icon_state = "dvalve_map-3"
@@ -1,23 +1,22 @@
/*
Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
node1, air1, network1 correspond to input
node2, air2, network2 correspond to output
Thus, the two variables affect pump operation are set in New():
air1.volume
This is the volume of gas available to the pump that may be transfered to the output
air2.volume
Higher quantities of this cause more air to be perfected later
but overall network volume is also increased as this increases...
*/
// Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
//
// node1, air1, network1 correspond to input
// node2, air2, network2 correspond to output
//
// Thus, the two variables affect pump operation are set in New():
// air1.volume
// This is the volume of gas available to the pump that may be transfered to the output
// air2.volume
// Higher quantities of this cause more air to be perfected later
// but overall network volume is also increased as this increases...
/obj/machinery/atmospherics/components/binary/volume_pump
icon_state = "volpump_map"
icon_state = "volpump_map-2"
name = "volumetric gas pump"
desc = "A pump that moves gas by volume."
can_unwrench = TRUE
shift_underlay_only = FALSE
var/transfer_rate = MAX_TRANSFER_RATE
@@ -43,40 +42,12 @@ Thus, the two variables affect pump operation are set in New():
message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
return ..()
/obj/machinery/atmospherics/components/binary/volume_pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/binary/volume_pump/on
on = TRUE
icon_state = "volpump_on_map"
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/volume_pump/update_icon_nopipes()
if(!is_operational())
icon_state = "volpump_off"
return
icon_state = "volpump_[on?"on":"off"]"
icon_state = on && is_operational() ? "volpump_on" : "volpump_off"
/obj/machinery/atmospherics/components/binary/volume_pump/process_atmos()
// ..()
@@ -208,3 +179,25 @@ Thus, the two variables affect pump operation are set in New():
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
return TRUE
// Mapping
/obj/machinery/atmospherics/components/binary/volume_pump/layer1
piping_layer = 1
icon_state = "volpump_map-1"
/obj/machinery/atmospherics/components/binary/volume_pump/layer3
piping_layer = 3
icon_state = "volpump_map-3"
/obj/machinery/atmospherics/components/binary/volume_pump/on
on = TRUE
icon_state = "volpump_on_map"
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer1
piping_layer = 1
icon_state = "volpump_map-1"
/obj/machinery/atmospherics/components/binary/volume_pump/on/layer3
piping_layer = 3
icon_state = "volpump_map-3"
@@ -1,11 +1,10 @@
/*
So much of atmospherics.dm was used solely by components, so separating this makes things all a lot cleaner.
On top of that, now people can add component-speciic procs/vars if they want!
*/
// So much of atmospherics.dm was used solely by components, so separating this makes things all a lot cleaner.
// On top of that, now people can add component-speciic procs/vars if they want!
/obj/machinery/atmospherics/components
var/welded = FALSE //Used on pumps and scrubbers
var/showpipe = FALSE
var/shift_underlay_only = TRUE //Layering only shifts underlay?
var/list/datum/pipeline/parents
var/list/datum/gas_mixture/airs
@@ -19,9 +18,8 @@ On top of that, now people can add component-speciic procs/vars if they want!
var/datum/gas_mixture/A = new
A.volume = 200
airs[i] = A
/*
Iconnery
*/
// Iconnery
/obj/machinery/atmospherics/components/proc/update_icon_nopipes()
return
@@ -32,7 +30,7 @@ Iconnery
underlays.Cut()
var/turf/T = loc
if(level == 2 || !T.intact)
if(level == 2 || (istype(T) && !T.intact))
showpipe = TRUE
plane = GAME_PLANE
else
@@ -46,14 +44,25 @@ Iconnery
for(var/i in 1 to device_type) //adds intact pieces
if(nodes[i])
connected |= icon_addintact(nodes[i])
var/obj/machinery/atmospherics/node = nodes[i]
var/image/img = get_pipe_underlay("pipe_intact", get_dir(src, node), node.pipe_color)
underlays += img
connected |= img.dir
icon_addbroken(connected) //adds broken pieces
for(var/direction in GLOB.cardinals)
if((initialize_directions & direction) && !(connected & direction))
underlays += get_pipe_underlay("pipe_exposed", direction)
if(!shift_underlay_only)
PIPING_LAYER_SHIFT(src, piping_layer)
/*
Pipenet stuff; housekeeping
*/
/obj/machinery/atmospherics/components/proc/get_pipe_underlay(state, dir, color = null)
if(color)
. = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir, color, piping_layer = shift_underlay_only ? piping_layer : 2)
else
. = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir, piping_layer = shift_underlay_only ? piping_layer : 2)
// Pipenet stuff; housekeeping
/obj/machinery/atmospherics/components/nullifyNode(i)
if(nodes[i])
@@ -129,9 +138,7 @@ Pipenet stuff; housekeeping
return new_value
return default_set
/*
Helpers
*/
// Helpers
/obj/machinery/atmospherics/components/proc/update_parents()
for(var/i in 1 to device_type)
@@ -146,9 +153,9 @@ Helpers
for(var/i in 1 to device_type)
. += returnPipenet(nodes[i])
/*
UI Stuff
*/
// UI Stuff
/obj/machinery/atmospherics/components/ui_status(mob/user)
if(allowed(user))
@@ -156,9 +163,9 @@ UI Stuff
to_chat(user, "<span class='danger'>Access denied.</span>")
return UI_CLOSE
/*
Tool acts
*/
// Tool acts
/obj/machinery/atmospherics/components/analyzer_act(mob/living/user, obj/item/I)
atmosanalyzer_scan(airs, user, src)
@@ -1,9 +1,12 @@
/obj/machinery/atmospherics/components/trinary/filter
name = "gas filter"
icon_state = "filter_off"
desc = "Very useful for filtering gasses."
density = FALSE
name = "gas filter"
desc = "Very useful for filtering gasses."
can_unwrench = TRUE
var/transfer_rate = MAX_TRANSFER_RATE
var/filter_type = null
var/frequency = 0
@@ -38,38 +41,6 @@
message_admins("Filter, [src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
return TRUE
/obj/machinery/atmospherics/components/trinary/filter/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/filter/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
// These two filter types have critical_machine flagged to on and thus causes the area they are in to be exempt from the Grid Check event.
/obj/machinery/atmospherics/components/trinary/filter/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
@@ -80,62 +51,26 @@
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/trinary/filter/atmos //Used for atmos waste loops
on = TRUE
icon_state = "filter_on"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/plasma
name = "plasma filter"
filter_type = "plasma"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped //This feels wrong, I know
icon_state = "filter_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/plasma
name = "plasma filter"
filter_type = "plasma"
/obj/machinery/atmospherics/components/trinary/filter/update_icon()
cut_overlays()
for(var/direction in GLOB.cardinals)
if(direction & initialize_directions)
var/obj/machinery/atmospherics/node = findConnecting(direction)
if(node)
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction, node.pipe_color))
continue
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction))
..()
if(!(direction & initialize_directions))
continue
var/obj/machinery/atmospherics/node = findConnecting(direction)
var/image/cap
if(node)
cap = getpipeimage(icon, "cap", direction, node.pipe_color, piping_layer = piping_layer)
else
cap = getpipeimage(icon, "cap", direction, piping_layer = piping_layer)
add_overlay(cap)
return ..()
/obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes()
if(on && nodes[1] && nodes[2] && nodes[3] && is_operational())
icon_state = "filter_on[flipped?"_f":""]"
return
icon_state = "filter_off[flipped?"_f":""]"
var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational()
icon_state = "filter_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
/obj/machinery/atmospherics/components/trinary/filter/power_change()
var/old_stat = stat
@@ -258,3 +193,91 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
// Mapping
/obj/machinery/atmospherics/components/trinary/filter/layer1
piping_layer = 1
icon_state = "filter_off_map-1"
/obj/machinery/atmospherics/components/trinary/filter/layer3
piping_layer = 3
icon_state = "filter_off_map-3"
/obj/machinery/atmospherics/components/trinary/filter/on
on = TRUE
icon_state = "filter_on"
/obj/machinery/atmospherics/components/trinary/filter/on/layer1
piping_layer = 1
icon_state = "filter_on_map-1"
/obj/machinery/atmospherics/components/trinary/filter/on/layer3
piping_layer = 3
icon_state = "filter_on_map-3"
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer1
piping_layer = 1
icon_state = "filter_off_f_map-1"
/obj/machinery/atmospherics/components/trinary/filter/flipped/layer3
piping_layer = 3
icon_state = "filter_off_f_map-3"
/obj/machinery/atmospherics/components/trinary/filter/flipped/on
on = TRUE
icon_state = "filter_on_f"
/obj/machinery/atmospherics/components/trinary/filter/flipped/on/layer1
piping_layer = 1
icon_state = "filter_on_f_map-1"
/obj/machinery/atmospherics/components/trinary/filter/flipped/on/layer3
piping_layer = 3
icon_state = "filter_on_f_map-3"
/obj/machinery/atmospherics/components/trinary/filter/atmos //Used for atmos waste loops
on = TRUE
icon_state = "filter_on"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/plasma
name = "plasma filter"
filter_type = "plasma"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped //This feels wrong, I know
icon_state = "filter_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2
name = "nitrogen filter"
filter_type = "n2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/o2
name = "oxygen filter"
filter_type = "o2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/co2
name = "carbon dioxide filter"
filter_type = "co2"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/n2o
name = "nitrous oxide filter"
filter_type = "n2o"
/obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/plasma
name = "plasma filter"
filter_type = "plasma"
// These two filter types have critical_machine flagged to on and thus causes the area they are in to be exempt from the Grid Check event.
/obj/machinery/atmospherics/components/trinary/filter/critical
critical_machine = TRUE
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical
critical_machine = TRUE
@@ -3,9 +3,10 @@
density = FALSE
name = "gas mixer"
can_unwrench = TRUE
desc = "Very useful for mixing gasses."
can_unwrench = TRUE
var/target_pressure = ONE_ATMOSPHERE
var/node1_concentration = 0.5
var/node2_concentration = 0.5
@@ -41,66 +42,27 @@
return TRUE
//node 3 is the outlet, nodes 1 & 2 are intakes
/obj/machinery/atmospherics/components/trinary/mixer/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/flipped
icon_state = "mixer_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/trinary/mixer/airmix //For standard airmix to distro
name = "air mixer"
icon_state = "mixer_on"
node1_concentration = N2STANDARD
node2_concentration = O2STANDARD
on = TRUE
target_pressure = MAX_OUTPUT_PRESSURE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped
icon_state = "mixer_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
/obj/machinery/atmospherics/components/trinary/mixer/update_icon()
cut_overlays()
for(var/direction in GLOB.cardinals)
if(direction & initialize_directions)
var/obj/machinery/atmospherics/node = findConnecting(direction)
if(node)
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction, node.pipe_color))
continue
add_overlay(getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction))
if(!(direction & initialize_directions))
continue
var/obj/machinery/atmospherics/node = findConnecting(direction)
var/image/cap
if(node)
cap = getpipeimage(icon, "cap", direction, node.pipe_color, piping_layer = piping_layer)
else
cap = getpipeimage(icon, "cap", direction, piping_layer = piping_layer)
add_overlay(cap)
return ..()
/obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes()
if(on && nodes[1] && nodes[2] && nodes[3] && is_operational())
icon_state = "mixer_on[flipped?"_f":""]"
return
icon_state = "mixer_off[flipped?"_f":""]"
var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational()
icon_state = "mixer_[on_state ? "on" : "off"][flipped ? "_f" : ""]"
/obj/machinery/atmospherics/components/trinary/mixer/power_change()
var/old_stat = stat
@@ -233,8 +195,70 @@
update_icon()
/obj/machinery/atmospherics/components/trinary/filter/can_unwrench(mob/user)
/obj/machinery/atmospherics/components/trinary/mixer/can_unwrench(mob/user)
. = ..()
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
// mapping
/obj/machinery/atmospherics/components/trinary/mixer/layer1
piping_layer = 1
icon_state = "mixer_off_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/layer3
piping_layer = 3
icon_state = "mixer_off_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/on
on = TRUE
icon_state = "mixer_on"
/obj/machinery/atmospherics/components/trinary/mixer/on/layer1
piping_layer = 1
icon_state = "mixer_on_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/on/layer3
piping_layer = 3
icon_state = "mixer_on_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/flipped
icon_state = "mixer_off_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer1
piping_layer = 1
icon_state = "mixer_off_f_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer3
piping_layer = 3
icon_state = "mixer_off_f_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/on
on = TRUE
icon_state = "mixer_on_f"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/on/layer1
piping_layer = 1
icon_state = "mixer_on_f_map-1"
/obj/machinery/atmospherics/components/trinary/mixer/flipped/on/layer3
piping_layer = 3
icon_state = "mixer_on_f_map-3"
/obj/machinery/atmospherics/components/trinary/mixer/airmix //For standard airmix to distro
name = "air mixer"
icon_state = "mixer_on"
node1_concentration = N2STANDARD
node2_concentration = O2STANDARD
target_pressure = MAX_OUTPUT_PRESSURE
on = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped
icon_state = "mixer_on_f"
flipped = TRUE
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped/inverse
node1_concentration = O2STANDARD
node2_concentration = N2STANDARD
@@ -1,11 +1,12 @@
/obj/machinery/atmospherics/components/unary/heat_exchanger
icon_state = "he_intact"
icon_state = "he1"
name = "heat exchanger"
desc = "Exchanges heat between two input gases. Set up for fast heat transfer."
can_unwrench = TRUE
shift_underlay_only = FALSE // not really used
layer = LOW_OBJ_LAYER
@@ -13,24 +14,23 @@
var/update_cycle
pipe_state = "heunary"
/obj/machinery/atmospherics/components/unary/heat_exchanger/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
piping_layer = 1
icon_state = "he_map-1"
/obj/machinery/atmospherics/components/unary/heat_exchanger/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
piping_layer = 3
icon_state = "he_map-3"
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
if(nodes[1])
icon_state = "he_intact"
icon_state = "he1"
var/obj/machinery/atmospherics/node = nodes[1]
add_atom_colour(node.color, FIXED_COLOUR_PRIORITY)
else
icon_state = "he_exposed"
icon_state = "he0"
PIPING_LAYER_SHIFT(src, piping_layer)
/obj/machinery/atmospherics/components/unary/heat_exchanger/atmosinit()
if(!partner)
@@ -1,9 +1,10 @@
/obj/machinery/atmospherics/components/unary/outlet_injector
icon_state = "inje_map-2"
name = "air injector"
desc = "Has a valve and pump attached to it."
icon_state = "inje_map"
use_power = IDLE_POWER_USE
can_unwrench = TRUE
shift_underlay_only = FALSE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF //really helpful in building gas chambers for xenomorphs
var/injecting = 0
@@ -19,82 +20,20 @@
pipe_state = "injector"
/obj/machinery/atmospherics/components/unary/outlet_injector/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/Destroy()
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
volume_rate = 200
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/atmos_waste
name = "atmos waste outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ATMOS
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/engine_waste
name = "engine outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ENGINE
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxin_input
name = "plasma tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/oxygen_input
name = "oxygen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_O2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrogen_input
name = "nitrogen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/mix_input
name = "mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_MIX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrous_input
name = "nitrous oxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2O
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/air_input
name = "air mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_AIR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/carbon_input
name = "carbon dioxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_CO2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/incinerator_input
name = "incinerator chamber input injector"
id = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input
name = "toxins mixing input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB
/obj/machinery/atmospherics/components/unary/outlet_injector/on
on = TRUE
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/outlet_injector/update_icon_nopipes()
cut_overlays()
if(showpipe)
// everything is already shifted so don't shift the cap
add_overlay(getpipeimage(icon, "inje_cap", initialize_directions))
if(!nodes[1] || !on || !is_operational())
icon_state = "inje_off"
return
icon_state = "inje_on"
else
icon_state = "inje_on"
/obj/machinery/atmospherics/components/unary/outlet_injector/power_change()
var/old_stat = stat
@@ -243,3 +182,63 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
// mapping
/obj/machinery/atmospherics/components/unary/outlet_injector/layer1
piping_layer = 1
icon_state = "inje_map-1"
/obj/machinery/atmospherics/components/unary/outlet_injector/layer3
piping_layer = 2
icon_state = "inje_map-2"
/obj/machinery/atmospherics/components/unary/outlet_injector/on
on = TRUE
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer1
piping_layer = 1
icon_state = "inje_map-1"
/obj/machinery/atmospherics/components/unary/outlet_injector/on/layer3
piping_layer = 2
icon_state = "inje_map-2"
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
volume_rate = 200
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/atmos_waste
name = "atmos waste outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ATMOS
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/engine_waste
name = "engine outlet injector"
id = ATMOS_GAS_MONITOR_WASTE_ENGINE
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxin_input
name = "plasma tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/oxygen_input
name = "oxygen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_O2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrogen_input
name = "nitrogen tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/mix_input
name = "mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_MIX
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/nitrous_input
name = "nitrous oxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_N2O
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/air_input
name = "air mix tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_AIR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/carbon_input
name = "carbon dioxide tank input injector"
id = ATMOS_GAS_MONITOR_INPUT_CO2
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/incinerator_input
name = "incinerator chamber input injector"
id = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input
name = "toxins mixing input injector"
id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB
@@ -13,43 +13,51 @@
/obj/machinery/atmospherics/components/unary/passive_vent/update_icon_nopipes()
cut_overlays()
if(showpipe)
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions)
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
icon_state = "passive_vent"
/obj/machinery/atmospherics/components/unary/passive_vent/process_atmos()
..()
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
var/pressure_delta = abs(environment_pressure - airs[1].return_pressure())
var/active = FALSE
if((environment.temperature || airs[1].temperature) && pressure_delta > 0.5)
if(environment_pressure < airs[1].return_pressure())
var/air_temperature = (environment.temperature > 0) ? environment.temperature : airs[1].temperature
var/transfer_moles = (pressure_delta * environment.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = airs[1].remove(transfer_moles)
loc.assume_air(removed)
air_update_turf()
var/datum/gas_mixture/external = loc.return_air()
var/datum/gas_mixture/internal = airs[1]
var/external_pressure = external.return_pressure()
var/internal_pressure = internal.return_pressure()
var/pressure_delta = abs(external_pressure - internal_pressure)
if(pressure_delta > 0.5)
if(external_pressure < internal_pressure)
var/air_temperature = (external.temperature > 0) ? external.temperature : internal.temperature
var/transfer_moles = (pressure_delta * external.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = internal.remove(transfer_moles)
external.merge(removed)
else
var/air_temperature = (airs[1].temperature > 0) ? airs[1].temperature : environment.temperature
var/output_volume = airs[1].volume
var/transfer_moles = (pressure_delta * output_volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
transfer_moles = min(transfer_moles, environment.total_moles()*airs[1].volume/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
var/air_temperature = (internal.temperature > 0) ? internal.temperature : external.temperature
var/transfer_moles = (pressure_delta * internal.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
transfer_moles = min(transfer_moles, external.total_moles() * internal.volume / external.volume)
var/datum/gas_mixture/removed = external.remove(transfer_moles)
if(isnull(removed))
return
airs[1].merge(removed)
air_update_turf()
update_parents()
internal.merge(removed)
active = TRUE
active = internal.temperature_share(external, OPEN_HEAT_TRANSFER_COEFFICIENT) ? TRUE : active
if(active)
air_update_turf()
update_parents()
/obj/machinery/atmospherics/components/unary/passive_vent/can_crawl_through()
return TRUE
/obj/machinery/atmospherics/components/unary/passive_vent/layer1
piping_layer = PIPING_LAYER_MIN
piping_layer = 1
icon_state = "passive_vent_map-1"
/obj/machinery/atmospherics/components/unary/passive_vent/layer3
piping_layer = PIPING_LAYER_MAX
piping_layer = 3
icon_state = "passive_vent_map-3"
@@ -1,25 +1,16 @@
/obj/machinery/atmospherics/components/unary/portables_connector
icon_state = "connector_map-2"
name = "connector port"
desc = "For connecting portables devices related to atmospherics control."
icon = 'icons/obj/atmospherics/components/unary_devices.dmi'
icon_state = "connector_map" //Only for mapping purposes, so mappers can see direction
can_unwrench = TRUE
var/obj/machinery/portable_atmospherics/connected_device
use_power = NO_POWER_USE
level = 0
layer = GAS_FILTER_LAYER
pipe_flags = PIPING_ONE_PER_TURF
pipe_state = "connector"
/obj/machinery/atmospherics/components/unary/portables_connector/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/portables_connector/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
var/obj/machinery/portable_atmospherics/connected_device
/obj/machinery/atmospherics/components/unary/portables_connector/New()
..()
@@ -27,29 +18,22 @@
air_contents.volume = 0
/obj/machinery/atmospherics/components/unary/portables_connector/visible
level = 2
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/portables_connector/process_atmos()
if(!connected_device)
return
update_parents()
/obj/machinery/atmospherics/components/unary/portables_connector/Destroy()
if(connected_device)
connected_device.disconnect()
return ..()
/obj/machinery/atmospherics/components/unary/portables_connector/update_icon_nopipes()
icon_state = "connector"
if(showpipe)
var/image/cap = getpipeimage(icon, "connector_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
/obj/machinery/atmospherics/components/unary/portables_connector/process_atmos()
if(!connected_device)
return
update_parents()
/obj/machinery/atmospherics/components/unary/portables_connector/can_unwrench(mob/user)
. = ..()
if(. && connected_device)
@@ -60,3 +44,24 @@
return connected_device.portableConnectorReturnAir()
/obj/proc/portableConnectorReturnAir()
return
/obj/machinery/atmospherics/components/unary/portables_connector/layer1
piping_layer = 1
icon_state = "connector_map-1"
/obj/machinery/atmospherics/components/unary/portables_connector/layer3
piping_layer = 3
icon_state = "connector_map-3"
/obj/machinery/atmospherics/components/unary/portables_connector/visible
level = 2
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer1
piping_layer = 1
icon_state = "connector_map-1"
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer3
piping_layer = 3
icon_state = "connector_map-3"
@@ -4,6 +4,7 @@
icon = 'icons/obj/atmospherics/components/relief_valve.dmi'
icon_state = "relief_valve-e-map"
can_unwrench = TRUE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
@@ -5,11 +5,11 @@
name = "pressure tank"
desc = "A large vessel containing pressurized gas."
max_integrity = 800
var/volume = 10000 //in liters, 1 meters by 1 meters by 2 meters
density = TRUE
var/gas_type = 0
layer = ABOVE_WINDOW_LAYER
pipe_flags = PIPING_ONE_PER_TURF
var/volume = 10000 //in liters
var/gas_type = 0
/obj/machinery/atmospherics/components/unary/tank/New()
..()
@@ -20,6 +20,16 @@
air_contents.gases[gas_type] = AIR_CONTENTS
name = "[name] ([GLOB.meta_gas_names[gas_type]])"
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
name = "pressure tank (Air)"
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2
air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = /datum/gas/carbon_dioxide
@@ -27,7 +37,6 @@
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = /datum/gas/oxygen
@@ -40,12 +49,3 @@
icon_state = "red_white"
gas_type = /datum/gas/nitrous_oxide
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
name = "pressure tank (Air)"
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2
air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8
@@ -11,7 +11,7 @@
layer = OBJ_LAYER
circuit = /obj/item/circuitboard/machine/thermomachine
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
pipe_flags = PIPING_ONE_PER_TURF
var/icon_state_off = "freezer"
var/icon_state_on = "freezer_1"
@@ -28,7 +28,10 @@
initialize_directions = dir
/obj/machinery/atmospherics/components/unary/thermomachine/on_construction()
..(dir,dir)
var/obj/item/circuitboard/machine/thermomachine/board = circuit
if(board)
piping_layer = board.pipe_layer
..(dir, piping_layer)
/obj/machinery/atmospherics/components/unary/thermomachine/RefreshParts()
var/B
@@ -37,6 +40,8 @@
heat_capacity = 5000 * ((B - 1) ** 2)
/obj/machinery/atmospherics/components/unary/thermomachine/update_icon()
cut_overlays()
if(panel_open)
icon_state = icon_state_open
else if(on && is_operational())
@@ -44,6 +49,8 @@
else
icon_state = icon_state_off
add_overlay(getpipeimage(icon, "pipe", dir, , piping_layer))
/obj/machinery/atmospherics/components/unary/thermomachine/update_icon_nopipes()
cut_overlays()
if(showpipe)
@@ -6,9 +6,9 @@
#define RELEASING 1
/obj/machinery/atmospherics/components/unary/vent_pump
icon_state = "vent_map-2"
name = "air vent"
desc = "Has a valve and pump attached to it."
icon_state = "vent_map"
use_power = IDLE_POWER_USE
can_unwrench = TRUE
welded = FALSE
@@ -32,99 +32,13 @@
pipe_state = "uvent"
/obj/machinery/atmospherics/components/unary/vent_pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/on
on = TRUE
icon_state = "vent_map_on"
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 4000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxin_output
name = "plasma tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/oxygen_output
name = "oxygen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_O2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrogen_output
name = "nitrogen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/mix_output
name = "mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_MIX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrous_output
name = "nitrous oxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2O
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/carbon_output
name = "carbon dioxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/incinerator_output
name = "incinerator chamber output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxins_mixing_output
name = "toxins mixing output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/New()
..()
if(!id_tag)
id_tag = assign_uid_vents()
/obj/machinery/atmospherics/components/unary/vent_pump/Destroy()
var/area/A = get_area(src)
var/area/A = get_base_area(src)
if (A)
A.air_vent_names -= id_tag
A.air_vent_info -= id_tag
@@ -133,82 +47,11 @@
radio_connection = null
return ..()
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume
name = "large air vent"
power_channel = EQUIP
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on
on = TRUE
icon_state = "vent_map_on"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 2000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos/air_output
name = "air mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_AIR
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.volume = 1000
/obj/machinery/atmospherics/components/unary/vent_pump/update_icon_nopipes()
cut_overlays()
if(showpipe)
add_overlay(getpipeimage(icon, "vent_cap", initialize_directions))
var/image/cap = getpipeimage(icon, "vent_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
if(welded)
icon_state = "vent_welded"
@@ -312,7 +155,7 @@
"sigtype" = "status"
))
var/area/A = get_area(src)
var/area/A = get_base_area(src)
if(!A.air_vent_names[id_tag])
name = "\improper [A.name] vent pump #[A.air_vent_names.len + 1]"
A.air_vent_names[id_tag] = name
@@ -445,6 +288,149 @@
pipe_vision_img.plane = ABOVE_HUD_PLANE
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume
name = "large air vent"
power_channel = EQUIP
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.volume = 1000
// mapping
/obj/machinery/atmospherics/components/unary/vent_pump/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/layer3
piping_layer = 3
icon_state = "vent_map-3"
/obj/machinery/atmospherics/components/unary/vent_pump/on
on = TRUE
icon_state = "vent_map_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer1
piping_layer = 1
icon_state = "vent_map_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3
piping_layer = 3
icon_state = "vent_map_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 4000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/layer3
piping_layer = 3
icon_state = "vent_map-3"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer1
piping_layer = 1
icon_state = "vent_map_siphon_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on/layer3
piping_layer = 3
icon_state = "vent_map_siphon_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxin_output
name = "plasma tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/oxygen_output
name = "oxygen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_O2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrogen_output
name = "nitrogen tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/mix_output
name = "mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_MIX
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/nitrous_output
name = "nitrous oxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_N2O
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/carbon_output
name = "carbon dioxide tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_CO2
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/incinerator_output
name = "incinerator chamber output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/atmos/toxins_mixing_output
name = "toxins mixing output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB
frequency = FREQ_ATMOS_CONTROL
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/layer3
piping_layer = 3
icon_state = "map_vent-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on
on = TRUE
icon_state = "vent_map_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer1
piping_layer = 1
icon_state = "vent_map_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/on/layer3
piping_layer = 3
icon_state = "map_vent_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon
pump_direction = SIPHONING
pressure_checks = INT_BOUND
internal_pressure_bound = 2000
external_pressure_bound = 0
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer1
piping_layer = 1
icon_state = "vent_map-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/layer3
piping_layer = 3
icon_state = "map_vent-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer1
piping_layer = 1
icon_state = "vent_map_siphon_on-1"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/on/layer3
piping_layer = 3
icon_state = "vent_map_siphon_on-3"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos
frequency = FREQ_ATMOS_STORAGE
on = TRUE
icon_state = "vent_map_siphon_on-2"
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/siphon/atmos/air_output
name = "air mix tank output inlet"
id_tag = ATMOS_GAS_MONITOR_OUTPUT_AIR
#undef INT_BOUND
#undef EXT_BOUND
@@ -2,9 +2,9 @@
#define SCRUBBING 1
/obj/machinery/atmospherics/components/unary/vent_scrubber
icon_state = "scrub_map-2"
name = "air scrubber"
desc = "Has a valve and pump attached to it."
icon_state = "scrub_map"
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 60
@@ -28,16 +28,6 @@
pipe_state = "scrubber"
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/New()
..()
if(!id_tag)
@@ -48,22 +38,8 @@
filter_types -= f
filter_types += gas_id2path(f)
/obj/machinery/atmospherics/components/unary/vent_scrubber/on
on = TRUE
icon_state = "scrub_map_on"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/unary/vent_scrubber/Destroy()
var/area/A = get_area(src)
var/area/A = get_base_area(src)
if (A)
A.air_scrub_names -= id_tag
A.air_scrub_info -= id_tag
@@ -92,7 +68,8 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/update_icon_nopipes()
cut_overlays()
if(showpipe)
add_overlay(getpipeimage(icon, "scrub_cap", initialize_directions))
var/image/cap = getpipeimage(icon, "scrub_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
if(welded)
icon_state = "scrub_welded"
@@ -135,7 +112,7 @@
"sigtype" = "status"
))
var/area/A = get_area(src)
var/area/A = get_base_area(src)
if(!A.air_scrub_names[id_tag])
name = "\improper [A.name] air scrubber #[A.air_scrub_names.len + 1]"
A.air_scrub_names[id_tag] = name
@@ -322,7 +299,25 @@
pipe_vision_img.plane = ABOVE_HUD_PLANE
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer1
piping_layer = 1
icon_state = "scrub_map-1"
/obj/machinery/atmospherics/components/unary/vent_scrubber/layer3
piping_layer = 3
icon_state = "scrub_map-3"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on
on = TRUE
icon_state = "scrub_map_on-2"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1
piping_layer = 1
icon_state = "scrub_map_on-1"
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer3
piping_layer = 3
icon_state = "scrub_map_on-3"
#undef SIPHONING
#undef SCRUBBING