Make pipe layers better, also some cleanups (#41664)

* Layered pipes no longer stick out of their tile, also vents and other
  machines will always be in the middle of the tile.
* Layer manifold now looks like an adaptor.
* Some pipe mapping helpers were made into macros so maintianing things is
  easier.
* Some unused icons were removed.
* A lot of icons were added, so that pipe layering looks better.
* Layer manifold renamed to layer adaptor and resprited to look more like an
  adaptor.
This commit is contained in:
nicbn
2018-11-30 19:44:34 -02:00
committed by yogstation13-bot
parent 698bc62b1f
commit c4648c9a82
46 changed files with 1066 additions and 2068 deletions

View File

@@ -242,6 +242,18 @@
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
//HELPERS
#define PIPING_LAYER_SHIFT(T, PipingLayer) \
if(T.dir & NORTH || T.dir & SOUTH) { \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
} \
if(T.dir & WEST || T.dir & EAST) { \
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;\
}
#define PIPING_LAYER_DOUBLE_SHIFT(T, PipingLayer) \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
#define ADD_GAS(gas_id, out_list)\

View File

@@ -75,8 +75,7 @@ Buildable meters
new_layer = PIPING_LAYER_DEFAULT
piping_layer = new_layer
pixel_x += (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y += (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
PIPING_LAYER_SHIFT(src, piping_layer)
layer = initial(layer) + ((piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE)
/obj/item/pipe/proc/update()
@@ -232,5 +231,4 @@ Buildable meters
/obj/item/pipe_meter/proc/setAttachLayer(new_layer = PIPING_LAYER_DEFAULT)
piping_layer = new_layer
pixel_x = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
PIPING_LAYER_DOUBLE_SHIFT(src, piping_layer)

View File

@@ -1,14 +1,12 @@
/*
Quick overview:
// Quick overview:
//
// Pipes combine to form pipelines
// Pipelines and other atmospheric objects combine to form pipe_networks
// Note: A single pipe_network represents a completely open space
//
// Pipes -> Pipelines
// Pipelines + Other Objects -> Pipe network
Pipes combine to form pipelines
Pipelines and other atmospheric objects combine to form pipe_networks
Note: A single pipe_network represents a completely open space
Pipes -> Pipelines
Pipelines + Other Objects -> Pipe network
*/
#define PIPE_VISIBLE_LEVEL 2
#define PIPE_HIDDEN_LEVEL 1
@@ -101,13 +99,14 @@ Pipelines + Other Objects -> Pipe network
return node_connects
/obj/machinery/atmospherics/proc/normalize_cardinal_directions()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
switch(dir)
if(SOUTH)
setDir(NORTH)
if(WEST)
setDir(EAST)
//this is called just after the air controller sets up turfs
/obj/machinery/atmospherics/proc/atmosinit(var/list/node_connects)
/obj/machinery/atmospherics/proc/atmosinit(list/node_connects)
if(!node_connects) //for pipes where order of nodes doesn't matter
node_connects = getNodeConnects()
@@ -119,12 +118,8 @@ Pipelines + Other Objects -> Pipe network
update_icon()
/obj/machinery/atmospherics/proc/setPipingLayer(new_layer)
if(pipe_flags & PIPING_DEFAULT_LAYER_ONLY)
new_layer = PIPING_LAYER_DEFAULT
piping_layer = new_layer
pixel_x = (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y = (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
layer = initial(layer) + ((piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE)
piping_layer = (pipe_flags & PIPING_DEFAULT_LAYER_ONLY) ? PIPING_LAYER_DEFAULT : new_layer
update_icon()
/obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target, iteration)
return connection_check(target, piping_layer)
@@ -176,9 +171,6 @@ Pipelines + Other Objects -> Pipe network
nodes[nodes.Find(reference)] = null
update_icon()
/obj/machinery/atmospherics/update_icon()
return
/obj/machinery/atmospherics/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pipe)) //lets you autodrop
var/obj/item/pipe/pipe = W
@@ -235,15 +227,13 @@ Pipelines + Other Objects -> Pipe network
var/datum/gas_mixture/env_air = loc.return_air()
pressures = int_air.return_pressure() - env_air.return_pressure()
var/fuck_you_dir = get_dir(src, user) // Because fuck you...
if(!fuck_you_dir)
fuck_you_dir = pick(GLOB.cardinals)
var/turf/target = get_edge_target_turf(user, fuck_you_dir)
var/range = pressures/250
var/speed = range/5
user.visible_message("<span class='danger'>[user] is sent flying by pressure!</span>","<span class='userdanger'>The pressure sends you flying!</span>")
user.throw_at(target, range, speed)
// if get_dir(src, user) is not 0, target is the edge_target_turf on that dir
// otherwise, edge_target_turf uses a random cardinal direction
// range is pressures / 250
// speed is pressures / 1250
user.throw_at(get_edge_target_turf(user, get_dir(src, user) || pick(GLOB.cardinals)), pressures / 250, pressures / 1250)
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -269,17 +259,6 @@ Pipelines + Other Objects -> Pipe network
pipe_overlay = . = pipeimages[identifier] = image(iconset, iconstate, dir = direction)
pipe_overlay.color = col
/obj/machinery/atmospherics/proc/icon_addintact(var/obj/machinery/atmospherics/node)
var/image/img = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_intact", get_dir(src,node), node.pipe_color)
underlays += img
return img.dir
/obj/machinery/atmospherics/proc/icon_addbroken(var/connected = FALSE)
var/unconnected = (~connected) & initialize_directions
for(var/direction in GLOB.cardinals)
if(unconnected & direction)
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
/obj/machinery/atmospherics/on_construction(obj_color, set_layer)
if(can_unwrench)
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
@@ -320,7 +299,7 @@ Pipelines + Other Objects -> Pipe network
if(target_move.can_crawl_through())
if(is_type_in_typecache(target_move, GLOB.ventcrawl_machinery))
user.forceMove(target_move.loc) //handle entering and so on.
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>", "<span class='notice'>You climb out the ventilation system.")
else
var/list/pipenetdiff = returnPipenets() ^ target_move.returnPipenets()
if(pipenetdiff.len)
@@ -332,7 +311,7 @@ Pipelines + Other Objects -> Pipe network
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
else if(is_type_in_typecache(src, GLOB.ventcrawl_machinery) && can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
user.forceMove(loc)
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>","<span class='notice'>You climb out the ventilation system.")
user.visible_message("<span class='notice'>You hear something squeezing through the ducts...</span>", "<span class='notice'>You climb out the ventilation system.")
//PLACEHOLDER COMMENT FOR ME TO READD THE 1 (?) DS DELAY THAT WAS IMPLEMENTED WITH A... TIMER?
@@ -355,3 +334,6 @@ Pipelines + Other Objects -> Pipe network
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
/obj/machinery/atmospherics/proc/can_see_pipes()
return TRUE
/obj/machinery/atmospherics/proc/update_layer()
layer = initial(layer) + (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE

View File

@@ -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)

View File

@@ -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,26 @@ 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_SHIFT(cap, 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 +176,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

View File

@@ -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()
..()
@@ -179,3 +168,12 @@ 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"

View File

@@ -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
@@ -28,30 +27,6 @@ Thus, the two variables affect pump operation are set in New():
construction_type = /obj/item/pipe/directional
pipe_state = "pump"
/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)
@@ -59,11 +34,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()
// ..()
@@ -191,3 +162,24 @@ Thus, the two variables affect pump operation are set in New():
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
/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"

View File

@@ -3,12 +3,16 @@ 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,35 +24,13 @@ 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/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/valve/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/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
/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()
/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"]"
flick("[valve_type]valve_[on][!on]", src)
icon_state = "[valve_type]valve_[on ? "on" : "off"]"
<<<<<<< HEAD
/obj/machinery/atmospherics/components/binary/valve/proc/open()
on = TRUE
update_icon_nopipes()
@@ -69,54 +51,86 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
=======
/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)
>>>>>>> f7955352e4... Make pipe layers better, also some cleanups (#41664)
/obj/machinery/atmospherics/components/binary/valve/interact(mob/user)
add_fingerprint(usr)
update_icon_nopipes(1)
if(switching)
return
update_icon_nopipes(TRUE)
switching = TRUE
sleep(10)
if(on)
close()
else
open()
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
/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."
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
/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 = 1
icon_state = "mvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/layer3
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 = 1
icon_state = "mvalve_map-1"
/obj/machinery/atmospherics/components/binary/valve/on/layer3
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"

View File

@@ -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
@@ -28,40 +27,12 @@ Thus, the two variables affect pump operation are set in New():
construction_type = /obj/item/pipe/directional
pipe_state = "volumepump"
/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()
// ..()
@@ -188,3 +159,25 @@ Thus, the two variables affect pump operation are set in New():
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/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"

View File

@@ -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
@@ -13,15 +12,15 @@ On top of that, now people can add component-speciic procs/vars if they want!
/obj/machinery/atmospherics/components/New()
parents = new(device_type)
airs = new(device_type)
..()
for(var/i in 1 to device_type)
var/datum/gas_mixture/A = new
A.volume = 200
airs[i] = A
/*
Iconnery
*/
// Iconnery
/obj/machinery/atmospherics/components/proc/update_icon_nopipes()
return
@@ -46,14 +45,29 @@ 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)
else
. = getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', state, dir)
if(shift_underlay_only)
var/image/I = .
PIPING_LAYER_SHIFT(I, piping_layer)
// Pipenet stuff; housekeeping
/obj/machinery/atmospherics/components/nullifyNode(i)
if(nodes[i])
@@ -129,9 +143,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 +158,7 @@ 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 +166,7 @@ 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)

View File

@@ -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/target_pressure = ONE_ATMOSPHERE
var/filter_type = null
var/frequency = 0
@@ -12,38 +15,6 @@
construction_type = /obj/item/pipe/trinary/flippable
pipe_state = "filter"
/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
@@ -54,62 +25,27 @@
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)
else
cap = getpipeimage(icon, "cap", direction)
PIPING_LAYER_SHIFT(cap, 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
@@ -240,3 +176,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

View File

@@ -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
@@ -15,66 +16,27 @@
//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)
else
cap = getpipeimage(icon, "cap", direction)
PIPING_LAYER_SHIFT(cap, 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
@@ -202,8 +164,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

View File

@@ -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
@@ -15,22 +16,21 @@
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)

View File

@@ -1,9 +1,13 @@
/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 +23,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
@@ -102,7 +44,6 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/components/unary/outlet_injector/process_atmos()
..()
@@ -243,3 +184,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

View File

@@ -1,55 +1,42 @@
/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()
..()
var/datum/gas_mixture/air_contents = airs[1]
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_SHIFT(cap, 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 +47,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"

View File

@@ -2,15 +2,18 @@
/obj/machinery/atmospherics/components/unary/tank
icon = 'icons/obj/atmospherics/pipes/pressure_tank.dmi'
icon_state = "generic"
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()
..()
var/datum/gas_mixture/air_contents = airs[1]
@@ -22,21 +25,6 @@
name = "[name] ([air_contents.gases[gas_type][GAS_META][META_GAS_NAME]])"
setPipingLayer(piping_layer)
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = /datum/gas/carbon_dioxide
/obj/machinery/atmospherics/components/unary/tank/toxins
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = /datum/gas/oxygen
/obj/machinery/atmospherics/components/unary/tank/nitrogen
icon_state = "red"
gas_type = /datum/gas/nitrogen
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
@@ -48,3 +36,18 @@
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
air_contents.gases[/datum/gas/oxygen][MOLES] = AIR_CONTENTS * 0.2
air_contents.gases[/datum/gas/nitrogen][MOLES] = AIR_CONTENTS * 0.8
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = /datum/gas/carbon_dioxide
/obj/machinery/atmospherics/components/unary/tank/toxins
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = /datum/gas/oxygen
/obj/machinery/atmospherics/components/unary/tank/nitrogen
icon_state = "red"
gas_type = /datum/gas/nitrogen

View File

@@ -1,18 +1,22 @@
/obj/machinery/atmospherics/components/unary/thermomachine
name = "thermomachine"
desc = "Heats or cools gas in connected pipes."
icon = 'icons/obj/atmospherics/components/thermomachine.dmi'
icon_state = "freezer"
var/icon_state_off = "freezer"
var/icon_state_on = "freezer_1"
var/icon_state_open = "freezer-o"
name = "thermomachine"
desc = "Heats or cools gas in connected pipes."
density = TRUE
max_integrity = 300
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30)
layer = OBJ_LAYER
circuit = /obj/item/circuitboard/machine/thermomachine
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
var/icon_state_off = "freezer"
var/icon_state_on = "freezer_1"
var/icon_state_open = "freezer-o"
var/min_temperature = 0
var/max_temperature = 0
var/target_temperature = T20C

View File

@@ -6,9 +6,11 @@
#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,92 +34,6 @@
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)
@@ -133,82 +49,12 @@
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_SHIFT(cap, piping_layer)
add_overlay(cap)
if(welded)
icon_state = "vent_welded"
@@ -445,6 +291,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

View File

@@ -2,9 +2,10 @@
#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 +29,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,20 +39,6 @@
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)
if (A)
@@ -92,7 +69,9 @@
/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_SHIFT(cap, piping_layer)
add_overlay(cap)
if(welded)
icon_state = "scrub_welded"
@@ -325,6 +304,25 @@
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

View File

@@ -50,10 +50,9 @@
target = candidate
setAttachLayer(candidate.piping_layer)
/obj/machinery/meter/proc/setAttachLayer(var/new_layer)
/obj/machinery/meter/proc/setAttachLayer(new_layer)
target_layer = new_layer
pixel_x = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
pixel_y = (new_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
PIPING_LAYER_DOUBLE_SHIFT(src, target_layer)
/obj/machinery/meter/process_atmos()
if(!target)

View File

@@ -1,5 +1,4 @@
/obj/machinery/atmospherics/pipe/heat_exchanging
icon = 'icons/obj/atmospherics/pipes/heat.dmi'
level = 2
var/minimum_temperature_difference = 20
var/thermal_conductivity = WINDOW_HEAT_TRANSFER_COEFFICIENT

View File

@@ -1,6 +1,6 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/junction
icon = 'icons/obj/atmospherics/pipes/junction.dmi'
icon_state = "intact"
icon = 'icons/obj/atmospherics/pipes/he-junction.dmi'
icon_state = "pipe11-2"
name = "junction"
desc = "A one meter junction that connects regular and heat-exchanging pipe."
@@ -15,21 +15,11 @@
construction_type = /obj/item/pipe/directional
pipe_state = "junction"
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/SetInitDirections()
switch(dir)
if(NORTH,SOUTH)
if(NORTH, SOUTH)
initialize_directions = SOUTH|NORTH
if(EAST,WEST)
if(EAST, WEST)
initialize_directions = WEST|EAST
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/getNodeConnects()
@@ -37,5 +27,19 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/isConnectable(obj/machinery/atmospherics/target, given_layer, he_type_check)
if(dir == get_dir(target, src))
return ..(target, given_layer, FALSE) //we want a normal pipe instead
return ..(target, given_layer, FALSE) //we want a normal pipe instead
return ..(target, given_layer, TRUE)
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/update_icon()
icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]"
update_layer()
update_alpha()
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer1
piping_layer = 1
icon_state = "pipe11-1"
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/layer3
piping_layer = 3
icon_state = "pipe11-3"

View File

@@ -1,6 +1,8 @@
//3-way manifold
//3-Way Manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold
icon_state = "manifold"
icon = 'icons/obj/atmospherics/pipes/he-manifold.dmi'
icon_state = "manifold-2"
name = "pipe manifold"
desc = "A manifold composed of regular pipes."
@@ -13,74 +15,36 @@
construction_type = /obj/item/pipe/trinary
pipe_state = "he_manifold"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold_center")
return ..()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/SetInitDirections()
switch(dir)
if(NORTH)
initialize_directions = EAST|SOUTH|WEST
if(SOUTH)
initialize_directions = WEST|NORTH|EAST
if(EAST)
initialize_directions = SOUTH|WEST|NORTH
if(WEST)
initialize_directions = NORTH|EAST|SOUTH
initialize_directions = NORTH|SOUTH|EAST|WEST
initialize_directions &= ~dir
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold_center[invis]"
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, nodes[i])))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
//4-way manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
icon_state = "manifold4w"
update_layer()
update_alpha()
name = "4-way pipe manifold"
desc = "A manifold composed of heat-exchanging pipes."
initialize_directions = NORTH|SOUTH|EAST|WEST
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer1
piping_layer = 1
icon_state = "manifold-1"
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "he_manifold4w"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold4w_center[invis]"
cut_overlays()
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, nodes[i])))
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/layer3
piping_layer = 3
icon_state = "manifold-3"

View File

@@ -0,0 +1,48 @@
//4-Way Manifold
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
icon = 'icons/obj/atmospherics/pipes/he-manifold.dmi'
icon_state = "manifold4w"
name = "4-way pipe manifold"
desc = "A manifold composed of heat-exchanging pipes."
initialize_directions = NORTH|SOUTH|EAST|WEST
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "he_manifold4w"
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold4w_center")
return ..()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/update_icon()
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
update_layer()
update_alpha()
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer1
piping_layer = 1
icon_state = "manifold4w-1"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/layer3
piping_layer = 3
icon_state = "manifold4w-3"

View File

@@ -1,46 +1,39 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/simple
icon_state = "intact"
icon = 'icons/obj/atmospherics/pipes/he-simple.dmi'
icon_state = "pipe11-2"
name = "pipe"
desc = "A one meter section of heat-exchanging pipe."
dir = SOUTH
initialize_directions = SOUTH|NORTH
pipe_flags = PIPING_CARDINAL_AUTONORMALIZE
device_type = BINARY
construction_type = /obj/item/pipe/binary/bendable
pipe_state = "he"
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/SetInitDirections()
if(dir in GLOB.diagonals)
initialize_directions = dir
return
switch(dir)
if(NORTH,SOUTH)
if(NORTH, SOUTH)
initialize_directions = SOUTH|NORTH
if(EAST,WEST)
initialize_directions = WEST|EAST
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/proc/normalize_dir()
if(dir==SOUTH)
setDir(NORTH)
else if(dir==WEST)
setDir(EAST)
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/atmosinit()
normalize_dir()
..()
if(EAST, WEST)
initialize_directions = EAST|WEST
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon()
normalize_dir()
..()
icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]"
update_layer()
update_alpha()
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer1
piping_layer = 1
icon_state = "pipe11-1"
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/layer3
piping_layer = 3
icon_state = "pipe11-3"

View File

@@ -1,5 +1,5 @@
/obj/machinery/atmospherics/pipe/layer_manifold
name = "pipe-layer manifold"
name = "layer adaptor"
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifoldlayer"
desc = "A special pipe to bridge pipe layers with."
@@ -9,14 +9,16 @@
piping_layer = PIPING_LAYER_DEFAULT
device_type = 0
volume = 260
construction_type = /obj/item/pipe/binary
pipe_state = "manifoldlayer"
var/list/front_nodes
var/list/back_nodes
construction_type = /obj/item/pipe/binary
pipe_state = "layer_manifold"
/obj/machinery/atmospherics/pipe/layer_manifold/Initialize()
front_nodes = list()
back_nodes = list()
icon_state = "manifoldlayer_center"
return ..()
/obj/machinery/atmospherics/pipe/layer_manifold/Destroy()
@@ -36,30 +38,36 @@
return front_nodes + back_nodes + nodes
/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() //HEAVILY WIP FOR UPDATE ICONS!!
layer = (initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE)) //This is above everything else.
var/invis = invisibility ? "-f" : ""
icon_state = "[initial(icon_state)][invis]"
cut_overlays()
for(var/obj/machinery/atmospherics/A in front_nodes)
add_attached_image(A)
for(var/obj/machinery/atmospherics/A in back_nodes)
add_attached_image(A)
layer = initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE) //This is above everything else.
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_image(obj/machinery/atmospherics/A)
var/invis = A.invisibility ? "-f" : ""
for(var/node in front_nodes)
add_attached_images(node)
for(var/node in back_nodes)
add_attached_images(node)
update_alpha()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_images(obj/machinery/atmospherics/A)
if(!A)
return
if(istype(A, /obj/machinery/atmospherics/pipe/layer_manifold))
for(var/i = PIPING_LAYER_MIN, i <= PIPING_LAYER_MAX, i++)
var/image/I = getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full_layer_long[invis]", get_dir(src, A), A.pipe_color)
I.pixel_x = (i - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X
I.pixel_y = (i - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y
I.layer = layer - 0.01
add_overlay(I)
for(var/i in PIPING_LAYER_MIN to PIPING_LAYER_MAX)
add_attached_image(get_dir(src, A), i)
return
add_attached_image(get_dir(src, A), A.piping_layer, A.pipe_color)
/obj/machinery/atmospherics/pipe/layer_manifold/proc/add_attached_image(p_dir, p_layer, p_color = null)
var/image/I
if(p_color)
I = getpipeimage(icon, "pipe", p_dir, p_color)
else
var/image/I = getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full_layer_long[invis]", get_dir(src, A), A.pipe_color)
I.pixel_x = A.pixel_x
I.pixel_y = A.pixel_y
I.layer = layer - 0.01
add_overlay(I)
I = getpipeimage(icon, "pipe", p_dir)
I.layer = layer - 0.01
PIPING_LAYER_SHIFT(I, p_layer)
add_overlay(I)
/obj/machinery/atmospherics/pipe/layer_manifold/SetInitDirections()
switch(dir)

View File

@@ -1,9 +1,8 @@
/*
3-Way Manifold
*/
//3-Way Manifold
/obj/machinery/atmospherics/pipe/manifold
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifold"
icon_state = "manifold-2"
name = "pipe manifold"
desc = "A manifold composed of regular pipes."
@@ -16,399 +15,26 @@
construction_type = /obj/item/pipe/trinary
pipe_state = "manifold"
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/manifold/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold_center")
return ..()
/obj/machinery/atmospherics/pipe/manifold/SetInitDirections()
switch(dir)
if(NORTH)
initialize_directions = EAST|SOUTH|WEST
if(SOUTH)
initialize_directions = WEST|NORTH|EAST
if(EAST)
initialize_directions = SOUTH|WEST|NORTH
if(WEST)
initialize_directions = NORTH|EAST|SOUTH
initialize_directions = NORTH|SOUTH|EAST|WEST
initialize_directions &= ~dir
/obj/machinery/atmospherics/pipe/manifold/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold_center[invis]"
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, nodes[i])))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/manifold/general
/obj/machinery/atmospherics/pipe/manifold/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/general/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/general/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/general/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/general/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
color=rgb(255,0,0)
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
color=rgb(0,0,255)
/obj/machinery/atmospherics/pipe/manifold/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
color=rgb(130,43,255)
/obj/machinery/atmospherics/pipe/manifold/supplymain/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/supplymain/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/supplymain/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/supplymain/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
/obj/machinery/atmospherics/pipe/manifold/yellow/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/yellow/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/yellow/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
/obj/machinery/atmospherics/pipe/manifold/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/cyan/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green
pipe_color=rgb(30,255,0)
color=rgb(30,255,0)
/obj/machinery/atmospherics/pipe/manifold/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/green/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange
pipe_color=rgb(255,129,25)
color=rgb(255,129,25)
/obj/machinery/atmospherics/pipe/manifold/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/orange/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
/obj/machinery/atmospherics/pipe/manifold/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/purple/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/purple/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
/obj/machinery/atmospherics/pipe/manifold/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/dark/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/dark/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
/obj/machinery/atmospherics/pipe/manifold/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/violet/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/violet/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
/obj/machinery/atmospherics/pipe/manifold/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold/brown/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold/brown/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
update_layer()
update_alpha()

View File

@@ -1,9 +1,8 @@
/*
4-way manifold
*/
//4-Way Manifold
/obj/machinery/atmospherics/pipe/manifold4w
icon = 'icons/obj/atmospherics/pipes/manifold.dmi'
icon_state = "manifold4w"
icon_state = "manifold4w-2"
name = "4-way pipe manifold"
desc = "A manifold composed of regular pipes."
@@ -15,391 +14,25 @@
construction_type = /obj/item/pipe/quaternary
pipe_state = "manifold4w"
var/mutable_appearance/center
/obj/machinery/atmospherics/pipe/manifold4w/Initialize()
icon_state = ""
center = mutable_appearance(icon, "manifold4w_center")
return ..()
/obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
/obj/machinery/atmospherics/pipe/manifold4w/update_icon()
var/invis = invisibility ? "-f" : ""
icon_state = "manifold4w_center[invis]"
cut_overlays()
PIPING_LAYER_DOUBLE_SHIFT(center, piping_layer)
add_overlay(center)
//Add non-broken pieces
for(var/i in 1 to device_type)
if(nodes[i])
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, nodes[i])))
add_overlay( getpipeimage(icon, "pipe-[piping_layer]", get_dir(src, nodes[i])) )
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/manifold4w/general
/obj/machinery/atmospherics/pipe/manifold4w/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/general/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/general/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/general/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/general/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
color=rgb(255,0,0)
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
color=rgb(0,0,255)
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
color=rgb(130,43,255)
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/supplymain/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
/obj/machinery/atmospherics/pipe/manifold4w/yellow/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/yellow/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/yellow/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/yellow/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
/obj/machinery/atmospherics/pipe/manifold4w/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/cyan/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green
pipe_color=rgb(30,255,0)
color=rgb(30,255,0)
/obj/machinery/atmospherics/pipe/manifold4w/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/green/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange
pipe_color=rgb(255,129,25)
color=rgb(255,129,25)
/obj/machinery/atmospherics/pipe/manifold4w/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
/obj/machinery/atmospherics/pipe/manifold4w/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/purple/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/purple/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
/obj/machinery/atmospherics/pipe/manifold4w/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/dark/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/dark/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
/obj/machinery/atmospherics/pipe/manifold4w/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/violet/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/violet/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
/obj/machinery/atmospherics/pipe/manifold4w/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
update_layer()
update_alpha()

View File

@@ -0,0 +1,64 @@
//Colored pipes, use these for mapping
#define HELPER_PARTIAL(Fulltype, Iconbase, Color) \
##Fulltype { \
pipe_color = Color; \
color = Color; \
} \
##Fulltype/visible { \
level = PIPE_VISIBLE_LEVEL; \
layer = GAS_PIPE_VISIBLE_LAYER; \
} \
##Fulltype/visible/layer1 { \
piping_layer = 1; \
icon_state = Iconbase + "-1"; \
} \
##Fulltype/visible/layer3 { \
piping_layer = 3; \
icon_state = Iconbase + "-3"; \
} \
##Fulltype/hidden { \
level = PIPE_HIDDEN_LEVEL; \
} \
##Fulltype/hidden/layer1 { \
piping_layer = 1; \
icon_state = Iconbase + "-1"; \
} \
##Fulltype/hidden/layer3 { \
piping_layer = 3; \
icon_state = Iconbase + "-3"; \
}
#define HELPER_PARTIAL_NAMED(Fulltype, Iconbase, Name, Color) \
HELPER_PARTIAL(Fulltype, Iconbase, Color) \
##Fulltype { \
name = Name; \
}
#define HELPER(Type, Color) \
HELPER_PARTIAL(/obj/machinery/atmospherics/pipe/simple/##Type, "pipe11", Color) \
HELPER_PARTIAL(/obj/machinery/atmospherics/pipe/manifold/##Type, "manifold", Color) \
HELPER_PARTIAL(/obj/machinery/atmospherics/pipe/manifold4w/##Type, "manifold4w", Color)
#define HELPER_NAMED(Type, Name, Color) \
HELPER_PARTIAL_NAMED(/obj/machinery/atmospherics/pipe/simple/##Type, "pipe11", Name, Color) \
HELPER_PARTIAL_NAMED(/obj/machinery/atmospherics/pipe/manifold/##Type, "manifold", Name, Color) \
HELPER_PARTIAL_NAMED(/obj/machinery/atmospherics/pipe/manifold4w/##Type, "manifold4w", Name, Color)
HELPER(general, null)
HELPER(yellow, rgb(255, 198, 0))
HELPER(cyan, rgb(0, 255, 249))
HELPER(green, rgb(30, 255, 0))
HELPER(orange, rgb(255, 129, 25))
HELPER(purple, rgb(128, 0, 182))
HELPER(dark, rgb(69, 69, 69))
HELPER(brown, rgb(64, 0, 128))
HELPER_NAMED(scrubbers, "scrubbers pipe", rgb(255, 0, 0))
HELPER_NAMED(supply, "air supply pipe", rgb(0, 0, 255))
HELPER_NAMED(supplymain, "main air supply pipe", rgb(130, 43, 255))
#undef HELPER_NAMED
#undef HELPER
#undef HELPER_PARTIAL_NAMED
#undef HELPER_PARTIAL

View File

@@ -32,14 +32,6 @@
parent = new
parent.build_pipeline(src)
/obj/machinery/atmospherics/pipe/update_icon() //overridden by manifolds
if(nodes[1] && nodes[2])
icon_state = "intact[invisibility ? "-f" : "" ]"
else
var/have_node1 = nodes[1] ? TRUE : FALSE
var/have_node2 = nodes[2] ? TRUE : FALSE
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
/obj/machinery/atmospherics/pipe/atmosinit()
var/turf/T = loc // hide if turf is not intact
hide(T.intact)
@@ -93,6 +85,13 @@
qdel(meter)
. = ..()
/obj/machinery/atmospherics/pipe/update_icon()
. = ..()
update_alpha()
/obj/machinery/atmospherics/pipe/proc/update_alpha()
alpha = invisibility ? 64 : 255
/obj/machinery/atmospherics/pipe/proc/update_node_icon()
for(var/i in 1 to device_type)
if(nodes[i])

View File

@@ -1,11 +1,9 @@
/*
Simple Pipe
The regular pipe you see everywhere, including bent ones.
*/
// Simple Pipe
// The regular pipe you see everywhere, including bent ones.
/obj/machinery/atmospherics/pipe/simple
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
icon_state = "intact"
icon_state = "pipe11-2"
name = "pipe"
desc = "A one meter section of regular pipe."
@@ -20,385 +18,16 @@ The regular pipe you see everywhere, including bent ones.
pipe_state = "simple"
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
normalize_cardinal_directions()
if(dir in GLOB.diagonals)
initialize_directions = dir
return
switch(dir)
if(NORTH,SOUTH)
if(NORTH, SOUTH)
initialize_directions = SOUTH|NORTH
if(EAST,WEST)
if(EAST, WEST)
initialize_directions = EAST|WEST
//Colored pipes, use these for mapping
/obj/machinery/atmospherics/pipe/simple/general
/obj/machinery/atmospherics/pipe/simple/general/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/general/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/general/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/general/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/general/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/general/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers
name="scrubbers pipe"
pipe_color=rgb(255,0,0)
color=rgb(255,0,0)
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply
name="air supply pipe"
pipe_color=rgb(0,0,255)
color=rgb(0,0,255)
/obj/machinery/atmospherics/pipe/simple/supply/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/supply/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain
name="main air supply pipe"
pipe_color=rgb(130,43,255)
color=rgb(130,43,255)
/obj/machinery/atmospherics/pipe/simple/supplymain/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/supplymain/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow
pipe_color=rgb(255,198,0)
color=rgb(255,198,0)
/obj/machinery/atmospherics/pipe/simple/yellow/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/yellow/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/yellow/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/yellow/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan
pipe_color=rgb(0,255,249)
color=rgb(0,255,249)
/obj/machinery/atmospherics/pipe/simple/cyan/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/cyan/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green
pipe_color=rgb(30,255,0)
color=rgb(30,255,0)
/obj/machinery/atmospherics/pipe/simple/green/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/green/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/green/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/green/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange
pipe_color=rgb(255,129,25)
color=rgb(255,129,25)
/obj/machinery/atmospherics/pipe/simple/orange/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/orange/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/orange/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple
pipe_color=rgb(128,0,182)
color=rgb(128,0,182)
/obj/machinery/atmospherics/pipe/simple/purple/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/purple/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/purple/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/purple/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark
pipe_color=rgb(69,69,69)
color=rgb(69,69,69)
/obj/machinery/atmospherics/pipe/simple/dark/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/dark/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/dark/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/dark/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet
pipe_color=rgb(64,0,128)
color=rgb(64,0,128)
/obj/machinery/atmospherics/pipe/simple/violet/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/violet/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/violet/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/violet/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown
pipe_color=rgb(178,100,56)
color=rgb(178,100,56)
/obj/machinery/atmospherics/pipe/simple/brown/visible
level = PIPE_VISIBLE_LEVEL
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/brown/visible/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown/visible/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown/hidden
level = PIPE_HIDDEN_LEVEL
/obj/machinery/atmospherics/pipe/simple/brown/hidden/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
pixel_y = -PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/brown/hidden/layer3
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/pipe/simple/update_icon()
icon_state = "pipe[nodes[1] ? "1" : "0"][nodes[2] ? "1" : "0"]-[piping_layer]"
update_layer()
update_alpha()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 B

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -1358,11 +1358,13 @@
#include "code\modules\atmospherics\machinery\pipes\layermanifold.dm"
#include "code\modules\atmospherics\machinery\pipes\manifold.dm"
#include "code\modules\atmospherics\machinery\pipes\manifold4w.dm"
#include "code\modules\atmospherics\machinery\pipes\mapping.dm"
#include "code\modules\atmospherics\machinery\pipes\pipes.dm"
#include "code\modules\atmospherics\machinery\pipes\simple.dm"
#include "code\modules\atmospherics\machinery\pipes\heat_exchange\he_pipes.dm"
#include "code\modules\atmospherics\machinery\pipes\heat_exchange\junction.dm"
#include "code\modules\atmospherics\machinery\pipes\heat_exchange\manifold.dm"
#include "code\modules\atmospherics\machinery\pipes\heat_exchange\manifold4w.dm"
#include "code\modules\atmospherics\machinery\pipes\heat_exchange\simple.dm"
#include "code\modules\atmospherics\machinery\portable\canister.dm"
#include "code\modules\atmospherics\machinery\portable\portable_atmospherics.dm"