Atmos construction rework again
This commit is contained in:
committed by
CitadelStationBot
parent
3243eaa6b8
commit
ed12370a73
@@ -1,33 +1,10 @@
|
||||
/*
|
||||
PIPE CONSTRUCTION DEFINES
|
||||
Update these any time a path is changed
|
||||
Construction breaks otherwise
|
||||
*/
|
||||
|
||||
//Pipes
|
||||
#define PIPE_SIMPLE /obj/machinery/atmospherics/pipe/simple
|
||||
#define PIPE_MANIFOLD /obj/machinery/atmospherics/pipe/manifold
|
||||
#define PIPE_4WAYMANIFOLD /obj/machinery/atmospherics/pipe/manifold4w
|
||||
#define PIPE_HE /obj/machinery/atmospherics/pipe/heat_exchanging/simple
|
||||
#define PIPE_HE_MANIFOLD /obj/machinery/atmospherics/pipe/heat_exchanging/manifold
|
||||
#define PIPE_HE_4WAYMANIFOLD /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
|
||||
#define PIPE_JUNCTION /obj/machinery/atmospherics/pipe/heat_exchanging/junction
|
||||
#define PIPE_LAYER_MANIFOLD /obj/machinery/atmospherics/pipe/layer_manifold
|
||||
//Unary
|
||||
#define PIPE_CONNECTOR /obj/machinery/atmospherics/components/unary/portables_connector
|
||||
#define PIPE_UVENT /obj/machinery/atmospherics/components/unary/vent_pump
|
||||
#define PIPE_SCRUBBER /obj/machinery/atmospherics/components/unary/vent_scrubber
|
||||
#define PIPE_INJECTOR /obj/machinery/atmospherics/components/unary/outlet_injector
|
||||
#define PIPE_HEAT_EXCHANGE /obj/machinery/atmospherics/components/unary/heat_exchanger
|
||||
//Binary
|
||||
#define PIPE_PUMP /obj/machinery/atmospherics/components/binary/pump
|
||||
#define PIPE_PASSIVE_GATE /obj/machinery/atmospherics/components/binary/passive_gate
|
||||
#define PIPE_VOLUME_PUMP /obj/machinery/atmospherics/components/binary/volume_pump
|
||||
#define PIPE_MVALVE /obj/machinery/atmospherics/components/binary/valve
|
||||
#define PIPE_DVALVE /obj/machinery/atmospherics/components/binary/valve/digital
|
||||
//Trinary
|
||||
#define PIPE_GAS_FILTER /obj/machinery/atmospherics/components/trinary/filter
|
||||
#define PIPE_GAS_MIXER /obj/machinery/atmospherics/components/trinary/mixer
|
||||
//Construction Categories
|
||||
#define PIPE_BINARY 0 //2 directions: N/S, E/W
|
||||
#define PIPE_BENDABLE 1 //6 directions: N/S, E/W, N/E, N/W, S/E, S/W
|
||||
#define PIPE_TRINARY 2 //4 directions: N/E/S, E/S/W, S/W/N, W/N/E
|
||||
#define PIPE_TRIN_M 3 //8 directions: N->S+E, S->N+E, N->S+W, S->N+W, E->W+S, W->E+S, E->W+N, W->E+N
|
||||
#define PIPE_UNARY 4 //4 directions: N, S, E, W
|
||||
#define PIPE_QUAD 5 //1 directions: N/S/E/W
|
||||
|
||||
//Disposal piping numbers - do NOT hardcode these, use the defines
|
||||
#define DISP_PIPE_STRAIGHT 0
|
||||
|
||||
@@ -10,7 +10,7 @@ Buildable meters
|
||||
/obj/item/pipe
|
||||
name = "pipe"
|
||||
desc = "A pipe."
|
||||
var/pipe_type = 0
|
||||
var/pipe_type
|
||||
var/pipename
|
||||
force = 7
|
||||
throwforce = 7
|
||||
@@ -19,35 +19,22 @@ Buildable meters
|
||||
item_state = "buildpipe"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
level = 2
|
||||
var/flipped = FALSE
|
||||
var/is_bent = FALSE
|
||||
var/piping_layer = PIPING_LAYER_DEFAULT
|
||||
var/RPD_type //TEMP: kill this once RPDs get a rewrite pls
|
||||
|
||||
var/static/list/pipe_types = list(
|
||||
PIPE_SIMPLE, \
|
||||
PIPE_LAYER_MANIFOLD, \
|
||||
PIPE_MANIFOLD, \
|
||||
PIPE_4WAYMANIFOLD, \
|
||||
PIPE_HE, \
|
||||
PIPE_HE_MANIFOLD, \
|
||||
PIPE_HE_4WAYMANIFOLD, \
|
||||
PIPE_JUNCTION, \
|
||||
\
|
||||
PIPE_CONNECTOR, \
|
||||
PIPE_UVENT, \
|
||||
PIPE_SCRUBBER, \
|
||||
PIPE_INJECTOR, \
|
||||
PIPE_HEAT_EXCHANGE, \
|
||||
\
|
||||
PIPE_PUMP, \
|
||||
PIPE_PASSIVE_GATE, \
|
||||
PIPE_VOLUME_PUMP, \
|
||||
PIPE_MVALVE, \
|
||||
PIPE_DVALVE, \
|
||||
\
|
||||
PIPE_GAS_FILTER, \
|
||||
PIPE_GAS_MIXER, \
|
||||
)
|
||||
/obj/item/pipe/directional
|
||||
RPD_type = PIPE_UNARY
|
||||
/obj/item/pipe/binary
|
||||
RPD_type = PIPE_BINARY
|
||||
/obj/item/pipe/binary/bendable
|
||||
RPD_type = PIPE_BENDABLE
|
||||
/obj/item/pipe/trinary
|
||||
RPD_type = PIPE_TRINARY
|
||||
/obj/item/pipe/trinary/flippable
|
||||
RPD_type = PIPE_TRIN_M
|
||||
var/flipped = FALSE
|
||||
/obj/item/pipe/quaternary
|
||||
RPD_type = PIPE_QUAD
|
||||
|
||||
/obj/item/pipe/examine(mob/user)
|
||||
..()
|
||||
@@ -55,35 +42,27 @@ Buildable meters
|
||||
|
||||
/obj/item/pipe/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from)
|
||||
if(make_from)
|
||||
setDir(make_from.dir)
|
||||
pipename = make_from.name
|
||||
add_atom_colour(make_from.color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
if(make_from.type in pipe_types)
|
||||
pipe_type = make_from.type
|
||||
setPipingLayer(make_from.piping_layer)
|
||||
else //make pipe_type a value we can work with
|
||||
for(var/P in pipe_types)
|
||||
if(istype(make_from, P))
|
||||
pipe_type = P
|
||||
break
|
||||
|
||||
var/obj/machinery/atmospherics/components/trinary/triP = make_from
|
||||
if(istype(triP) && triP.flipped)
|
||||
flipped = TRUE
|
||||
setDir(turn(dir, -45))
|
||||
make_from_existing(make_from)
|
||||
else
|
||||
pipe_type = _pipe_type
|
||||
setDir(_dir)
|
||||
|
||||
if(_dir in GLOB.diagonals)
|
||||
is_bent = TRUE
|
||||
|
||||
update()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
pixel_x += rand(-5, 5)
|
||||
pixel_y += rand(-5, 5)
|
||||
return ..()
|
||||
|
||||
/obj/item/pipe/proc/make_from_existing(obj/machinery/atmospherics/make_from)
|
||||
setDir(make_from.dir)
|
||||
pipename = make_from.name
|
||||
add_atom_colour(make_from.color, FIXED_COLOUR_PRIORITY)
|
||||
pipe_type = make_from.type
|
||||
|
||||
/obj/item/pipe/trinary/flippable/make_from_existing(obj/machinery/atmospherics/components/trinary/make_from)
|
||||
..()
|
||||
if(make_from.flipped)
|
||||
do_a_flip()
|
||||
|
||||
/obj/item/pipe/dropped()
|
||||
if(loc)
|
||||
setPipingLayer(piping_layer)
|
||||
@@ -91,73 +70,19 @@ Buildable meters
|
||||
|
||||
/obj/item/pipe/proc/setPipingLayer(new_layer = PIPING_LAYER_DEFAULT)
|
||||
var/obj/machinery/atmospherics/fakeA = get_pipe_cache(pipe_type)
|
||||
var/nolayer = (fakeA.pipe_flags & PIPING_ALL_LAYER)
|
||||
if(nolayer)
|
||||
|
||||
if(fakeA.pipe_flags & PIPING_ALL_LAYER)
|
||||
new_layer = PIPING_LAYER_DEFAULT
|
||||
piping_layer = new_layer
|
||||
if(pipe_type != PIPE_LAYER_MANIFOLD)
|
||||
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)
|
||||
|
||||
//update the name and icon of the pipe item depending on the type
|
||||
GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
"[PIPE_SIMPLE]" = "simple", \
|
||||
"[PIPE_MANIFOLD]" = "manifold", \
|
||||
"[PIPE_LAYER_MANIFOLD]" = "layer_manifold", \
|
||||
"[PIPE_4WAYMANIFOLD]" = "manifold4w", \
|
||||
"[PIPE_HE]" = "he", \
|
||||
"[PIPE_HE_MANIFOLD]" = "he_manifold", \
|
||||
"[PIPE_HE_4WAYMANIFOLD]" = "he_manifold4w", \
|
||||
"[PIPE_JUNCTION]" = "junction", \
|
||||
\
|
||||
"[PIPE_CONNECTOR]" = "connector", \
|
||||
"[PIPE_UVENT]" = "uvent", \
|
||||
"[PIPE_SCRUBBER]" = "scrubber", \
|
||||
"[PIPE_INJECTOR]" = "injector", \
|
||||
"[PIPE_HEAT_EXCHANGE]" = "heunary", \
|
||||
\
|
||||
"[PIPE_PUMP]" = "pump", \
|
||||
"[PIPE_PASSIVE_GATE]" = "passivegate", \
|
||||
"[PIPE_VOLUME_PUMP]" = "volumepump", \
|
||||
"[PIPE_MVALVE]" = "mvalve", \
|
||||
"[PIPE_DVALVE]" = "dvalve", \
|
||||
\
|
||||
"[PIPE_GAS_FILTER]" = "filter", \
|
||||
"[PIPE_GAS_MIXER]" = "mixer", \
|
||||
))
|
||||
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)
|
||||
|
||||
/obj/item/pipe/proc/update()
|
||||
var/list/nlist = list(\
|
||||
"[PIPE_SIMPLE]" = "pipe", \
|
||||
"[PIPE_SIMPLE]_b" = "bent pipe", \
|
||||
"[PIPE_MANIFOLD]" = "manifold", \
|
||||
"[PIPE_LAYER_MANIFOLD]" = "layer manifold", \
|
||||
"[PIPE_4WAYMANIFOLD]" = "4-way manifold", \
|
||||
"[PIPE_HE]" = "h/e pipe", \
|
||||
"[PIPE_HE]_b" = "bent h/e pipe", \
|
||||
"[PIPE_HE_MANIFOLD]" = "h/e manifold", \
|
||||
"[PIPE_HE_4WAYMANIFOLD]"= "h/e 4-way manifold", \
|
||||
"[PIPE_JUNCTION]" = "junction", \
|
||||
\
|
||||
"[PIPE_CONNECTOR]" = "connector", \
|
||||
"[PIPE_UVENT]" = "vent", \
|
||||
"[PIPE_SCRUBBER]" = "scrubber", \
|
||||
"[PIPE_INJECTOR]" = "injector", \
|
||||
"[PIPE_HEAT_EXCHANGE]" = "heat exchanger", \
|
||||
\
|
||||
"[PIPE_PUMP]" = "pump", \
|
||||
"[PIPE_PASSIVE_GATE]" = "passive gate", \
|
||||
"[PIPE_VOLUME_PUMP]" = "volume pump", \
|
||||
"[PIPE_MVALVE]" = "manual valve", \
|
||||
"[PIPE_DVALVE]" = "digital valve", \
|
||||
\
|
||||
"[PIPE_GAS_FILTER]" = "gas filter", \
|
||||
"[PIPE_GAS_MIXER]" = "gas mixer", \
|
||||
)
|
||||
//fix_pipe_type()
|
||||
name = nlist["[pipe_type][is_bent ? "_b" : ""]"] + " fitting"
|
||||
icon_state = GLOB.pipeID2State["[pipe_type]"]
|
||||
var/obj/machinery/atmospherics/A = get_pipe_cache(pipe_type)
|
||||
name = "[A.name] fitting"
|
||||
icon_state = A.pipe_state
|
||||
|
||||
// rotate the pipe item clockwise
|
||||
|
||||
@@ -170,11 +95,8 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
return
|
||||
|
||||
setDir(turn(dir, -90))
|
||||
|
||||
fixdir()
|
||||
|
||||
return
|
||||
|
||||
/obj/item/pipe/verb/flip()
|
||||
set category = "Object"
|
||||
set name = "Flip Pipe"
|
||||
@@ -183,16 +105,15 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
if ( usr.stat || usr.restrained() || !usr.canmove )
|
||||
return
|
||||
|
||||
if (pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER))
|
||||
setDir(turn(dir, flipped )? 45 : -45)
|
||||
flipped = !flipped
|
||||
return
|
||||
do_a_flip()
|
||||
|
||||
/obj/item/pipe/proc/do_a_flip()
|
||||
setDir(turn(dir, -180))
|
||||
|
||||
fixdir()
|
||||
|
||||
return
|
||||
/obj/item/pipe/trinary/flippable/do_a_flip()
|
||||
setDir(turn(dir, flipped ? 45 : -45))
|
||||
flipped = !flipped
|
||||
|
||||
/obj/item/pipe/AltClick(mob/user)
|
||||
..()
|
||||
@@ -207,21 +128,21 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
/obj/item/pipe/Move()
|
||||
var/old_dir = dir
|
||||
..()
|
||||
setDir(old_dir )//pipes changing direction when moved is just annoying and buggy
|
||||
|
||||
/obj/item/pipe/proc/unflip(direction)
|
||||
if(direction in GLOB.diagonals)
|
||||
return turn(direction, 45)
|
||||
|
||||
return direction
|
||||
setDir(old_dir) //pipes changing direction when moved is just annoying and buggy
|
||||
|
||||
//Helper to clean up dir
|
||||
/obj/item/pipe/proc/fixdir()
|
||||
if((pipe_type in list (PIPE_SIMPLE, PIPE_HE, PIPE_MVALVE, PIPE_DVALVE, PIPE_LAYER_MANIFOLD)) && !is_bent)
|
||||
if(dir==SOUTH)
|
||||
setDir(NORTH)
|
||||
else if(dir==WEST)
|
||||
setDir(EAST)
|
||||
return
|
||||
|
||||
/obj/item/pipe/binary/fixdir()
|
||||
if(dir == SOUTH)
|
||||
setDir(NORTH)
|
||||
else if(dir == WEST)
|
||||
setDir(EAST)
|
||||
|
||||
/obj/item/pipe/trinary/flippable/fixdir()
|
||||
if(dir in GLOB.diagonals)
|
||||
setDir(turn(dir, 45))
|
||||
|
||||
/obj/item/pipe/attack_self(mob/user)
|
||||
return rotate()
|
||||
@@ -245,16 +166,14 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
add_fingerprint(user)
|
||||
|
||||
fixdir()
|
||||
if(pipe_type in list(PIPE_GAS_MIXER, PIPE_GAS_FILTER))
|
||||
setDir(unflip(dir))
|
||||
|
||||
var/obj/machinery/atmospherics/fakeA = get_pipe_cache(pipe_type, dir)
|
||||
|
||||
for(var/obj/machinery/atmospherics/M in loc)
|
||||
if((M.pipe_flags & PIPING_ONE_PER_TURF) && (fakeA.pipe_flags & PIPING_ONE_PER_TURF)) //Only one dense/requires density object per tile, eg connectors/cryo/heater/coolers.
|
||||
if((M.pipe_flags & fakeA.pipe_flags & PIPING_ONE_PER_TURF)) //Only one dense/requires density object per tile, eg connectors/cryo/heater/coolers.
|
||||
to_chat(user, "<span class='warning'>Something is hogging the tile!</span>")
|
||||
return TRUE
|
||||
if((M.piping_layer != piping_layer) && !((M.pipe_flags & PIPING_ALL_LAYER) || (pipe_type == PIPE_LAYER_MANIFOLD)))
|
||||
if((M.piping_layer != piping_layer) && !((M.pipe_flags | fakeA.pipe_flags) & PIPING_ALL_LAYER)) //don't continue if either pipe goes across all layers
|
||||
continue
|
||||
if(M.GetInitDirections() & fakeA.GetInitDirections()) // matches at least one direction on either type of pipe
|
||||
to_chat(user, "<span class='warning'>There is already a pipe at that location!</span>")
|
||||
@@ -262,16 +181,8 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
// no conflicts found
|
||||
|
||||
var/obj/machinery/atmospherics/A = new pipe_type(loc)
|
||||
A.setDir(dir)
|
||||
A.SetInitDirections()
|
||||
|
||||
if(pipename)
|
||||
A.name = pipename
|
||||
|
||||
var/obj/machinery/atmospherics/components/trinary/T = A
|
||||
if(istype(T))
|
||||
T.flipped = flipped
|
||||
A.on_construction(pipe_type, color, piping_layer)
|
||||
build_pipe(A)
|
||||
A.on_construction(color, piping_layer)
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
@@ -281,20 +192,28 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/pipe/suicide_act(mob/user)
|
||||
if(pipe_type in list(PIPE_PUMP, PIPE_PASSIVE_GATE, PIPE_VOLUME_PUMP))
|
||||
user.visible_message("<span class='suicide'>[user] shoves [src] in [user.p_their()] mouth and turns it on! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
for(var/i=1 to 20)
|
||||
C.vomit(0, TRUE, FALSE, 4, FALSE)
|
||||
if(prob(20))
|
||||
C.spew_organ()
|
||||
sleep(5)
|
||||
C.blood_volume = 0
|
||||
return(OXYLOSS|BRUTELOSS)
|
||||
else
|
||||
return ..()
|
||||
/obj/item/pipe/proc/build_pipe(obj/machinery/atmospherics/A)
|
||||
A.setDir(dir)
|
||||
A.SetInitDirections()
|
||||
|
||||
if(pipename)
|
||||
A.name = pipename
|
||||
|
||||
/obj/item/pipe/trinary/flippable/build_pipe(obj/machinery/atmospherics/components/trinary/T)
|
||||
..()
|
||||
T.flipped = flipped
|
||||
|
||||
/obj/item/pipe/directional/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] shoves [src] in [user.p_their()] mouth and turns it on! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
for(var/i=1 to 20)
|
||||
C.vomit(0, TRUE, FALSE, 4, FALSE)
|
||||
if(prob(20))
|
||||
C.spew_organ()
|
||||
sleep(5)
|
||||
C.blood_volume = 0
|
||||
return(OXYLOSS|BRUTELOSS)
|
||||
|
||||
/obj/item/pipe_meter
|
||||
name = "meter"
|
||||
@@ -332,4 +251,3 @@ GLOBAL_LIST_INIT(pipeID2State, list(
|
||||
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
|
||||
|
||||
|
||||
@@ -17,30 +17,30 @@
|
||||
var/dat = {"
|
||||
PIPING LAYER: <A href='?src=\ref[src];layer_down=1'>--</A><b>[piping_layer]</b><A href='?src=\ref[src];layer_up=1'>++</A><BR>
|
||||
<b>Pipes:</b><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_SIMPLE];dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_SIMPLE];dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_MANIFOLD];dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_LAYER_MANIFOLD];dir=1'>Layer Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_4WAYMANIFOLD];dir=1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_MVALVE];dir=1'>Manual Valve</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_DVALVE];dir=1'>Digital Valve</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/simple];dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/simple];dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/manifold];dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/layer_manifold];dir=1'>Layer Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/manifold4w];dir=1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/binary/valve];dir=1'>Manual Valve</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/binary/valve/digital];dir=1'>Digital Valve</A><BR>
|
||||
<b>Devices:</b><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_CONNECTOR];dir=1'>Connector</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_UVENT];dir=1'>Vent</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_PUMP];dir=1'>Gas Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_PASSIVE_GATE];dir=1'>Passive Gate</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_VOLUME_PUMP];dir=1'>Volume Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_SCRUBBER];dir=1'>Scrubber</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/unary/portables_connector];dir=1'>Connector</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/unary/vent_pump];dir=1'>Vent</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/binary/pump];dir=1'>Gas Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/binary/passive_gate];dir=1'>Passive Gate</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/binary/volume_pump];dir=1'>Volume Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/unary/vent_scrubber];dir=1'>Scrubber</A><BR>
|
||||
<A href='?src=\ref[src];makemeter=1'>Meter</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_GAS_FILTER];dir=1'>Gas Filter</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_GAS_MIXER];dir=1'>Gas Mixer</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/trinary/filter];dir=1'>Gas Filter</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/trinary/mixer];dir=1'>Gas Mixer</A><BR>
|
||||
<b>Heat exchange:</b><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_HE];dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_HE];dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_HE_MANIFOLD];dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_HE_4WAYMANIFOLD];dir=1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_JUNCTION];dir=1'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];make=[PIPE_HEAT_EXCHANGE];dir=1'>Heat Exchanger</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/heat_exchanging/simple];dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/heat_exchanging/simple];dir=5'>Bent Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/heat_exchanging/manifold];dir=1'>Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w];dir=1'>4-Way Manifold</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/pipe/heat_exchanging/junction];dir=1'>Junction</A><BR>
|
||||
<A href='?src=\ref[src];make=[/obj/machinery/atmospherics/components/unary/heat_exchanger];dir=1'>Heat Exchanger</A><BR>
|
||||
"}
|
||||
|
||||
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
CONTAINS:
|
||||
RPD
|
||||
*/
|
||||
#define PIPE_BINARY 0
|
||||
#define PIPE_BENDABLE 1
|
||||
#define PIPE_TRINARY 2
|
||||
#define PIPE_TRIN_M 3
|
||||
#define PIPE_UNARY 4
|
||||
#define PIPE_QUAD 5
|
||||
|
||||
#define PAINT_MODE -2
|
||||
#define EATING_MODE -1
|
||||
@@ -22,23 +16,29 @@ RPD
|
||||
|
||||
/datum/pipe_info
|
||||
var/id=-1
|
||||
var/categoryId = CATEGORY_ATMOS
|
||||
var/categoryId
|
||||
var/dir=SOUTH
|
||||
var/dirtype = PIPE_BENDABLE
|
||||
var/icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
|
||||
var/icon_state=""
|
||||
var/icon
|
||||
var/icon_state
|
||||
var/selected=0
|
||||
|
||||
/datum/pipe_info/New(pid,direction,dt)
|
||||
id=pid
|
||||
icon_state=GLOB.pipeID2State["[pid]"]
|
||||
dir = direction
|
||||
dirtype=dt
|
||||
/datum/pipe_info/pipe
|
||||
categoryId = CATEGORY_ATMOS
|
||||
icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
|
||||
|
||||
/datum/pipe_info/pipe/New(obj/machinery/atmospherics/path)
|
||||
id = path
|
||||
icon_state = initial(path.pipe_state)
|
||||
dirtype = initial(path.construction_type)
|
||||
|
||||
/datum/pipe_info/proc/Render(dispenser,label)
|
||||
|
||||
/datum/pipe_info/pipe/Render(dispenser,label,dir=NORTH)
|
||||
return "<li><a href='?src=\ref[dispenser];makepipe=[id];dir=[dir];type=[dirtype]'>[label]</a></li>"
|
||||
|
||||
/datum/pipe_info/meter
|
||||
categoryId = CATEGORY_ATMOS
|
||||
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
|
||||
icon_state = "meterX"
|
||||
|
||||
@@ -64,7 +64,6 @@ GLOBAL_LIST_INIT(disposalpipeID2State, list(
|
||||
/datum/pipe_info/disposal
|
||||
categoryId = CATEGORY_DISPOSALS
|
||||
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
|
||||
icon_state = "meterX"
|
||||
|
||||
/datum/pipe_info/disposal/New(var/pid,var/dt)
|
||||
id=pid
|
||||
@@ -80,33 +79,31 @@ GLOBAL_LIST_INIT(disposalpipeID2State, list(
|
||||
//find these defines in code\game\machinery\pipe\consruction.dm
|
||||
GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
"Pipes" = list(
|
||||
"Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 1, PIPE_BENDABLE),
|
||||
//"Bent Pipe" = new /datum/pipe_info(PIPE_SIMPLE, 5, PIPE_BENT),
|
||||
"Manifold" = new /datum/pipe_info(PIPE_MANIFOLD, 1, PIPE_TRINARY),
|
||||
"Manual Valve" = new /datum/pipe_info(PIPE_MVALVE, 1, PIPE_BINARY),
|
||||
"Digital Valve" = new /datum/pipe_info(PIPE_DVALVE, 1, PIPE_BINARY),
|
||||
"4-Way Manifold" = new /datum/pipe_info(PIPE_4WAYMANIFOLD, 1, PIPE_QUAD),
|
||||
"Layer Manifold" = new /datum/pipe_info(PIPE_LAYER_MANIFOLD, 1, PIPE_BINARY),
|
||||
"Pipe" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/simple),
|
||||
"Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/manifold),
|
||||
"Manual Valve" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/valve),
|
||||
"Digital Valve" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/valve/digital),
|
||||
"4-Way Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/manifold4w),
|
||||
"Layer Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/layer_manifold),
|
||||
),
|
||||
"Devices"=list(
|
||||
"Connector" = new /datum/pipe_info(PIPE_CONNECTOR, 1, PIPE_UNARY),
|
||||
"Unary Vent" = new /datum/pipe_info(PIPE_UVENT, 1, PIPE_UNARY),
|
||||
"Gas Pump" = new /datum/pipe_info(PIPE_PUMP, 1, PIPE_UNARY),
|
||||
"Passive Gate" = new /datum/pipe_info(PIPE_PASSIVE_GATE, 1, PIPE_UNARY),
|
||||
"Volume Pump" = new /datum/pipe_info(PIPE_VOLUME_PUMP, 1, PIPE_UNARY),
|
||||
"Scrubber" = new /datum/pipe_info(PIPE_SCRUBBER, 1, PIPE_UNARY),
|
||||
"Injector" = new /datum/pipe_info(PIPE_INJECTOR, 1, PIPE_UNARY),
|
||||
"Devices" = list(
|
||||
"Connector" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/portables_connector),
|
||||
"Unary Vent" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/vent_pump),
|
||||
"Gas Pump" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/pump),
|
||||
"Passive Gate" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/passive_gate),
|
||||
"Volume Pump" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/volume_pump),
|
||||
"Scrubber" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/vent_scrubber),
|
||||
"Injector" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/outlet_injector),
|
||||
"Meter" = new /datum/pipe_info/meter(),
|
||||
"Gas Filter" = new /datum/pipe_info(PIPE_GAS_FILTER, 1, PIPE_TRIN_M),
|
||||
"Gas Mixer" = new /datum/pipe_info(PIPE_GAS_MIXER, 1, PIPE_TRIN_M),
|
||||
"Gas Filter" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/trinary/filter),
|
||||
"Gas Mixer" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/trinary/mixer),
|
||||
),
|
||||
"Heat Exchange" = list(
|
||||
"Pipe" = new /datum/pipe_info(PIPE_HE, 1, PIPE_BENDABLE),
|
||||
//"Bent Pipe" = new /datum/pipe_info(PIPE_HE, 5, PIPE_BENT),
|
||||
"Manifold" = new /datum/pipe_info(PIPE_HE_MANIFOLD, 1, PIPE_TRINARY),
|
||||
"4-Way Manifold" = new /datum/pipe_info(PIPE_HE_4WAYMANIFOLD, 1, PIPE_QUAD),
|
||||
"Junction" = new /datum/pipe_info(PIPE_JUNCTION, 1, PIPE_UNARY),
|
||||
"Heat Exchanger" = new /datum/pipe_info(PIPE_HEAT_EXCHANGE, 1, PIPE_UNARY),
|
||||
"Pipe" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/simple),
|
||||
"Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/manifold),
|
||||
"4-Way Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w),
|
||||
"Junction" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/junction),
|
||||
"Heat Exchanger" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/heat_exchanger),
|
||||
),
|
||||
"Disposal Pipes" = list(
|
||||
"Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_STRAIGHT, PIPE_BINARY),
|
||||
@@ -120,6 +117,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
"Sort Junction" = new /datum/pipe_info/disposal(DISP_SORTJUNCTION, PIPE_TRINARY),
|
||||
)
|
||||
))
|
||||
|
||||
/obj/item/pipe_dispenser
|
||||
name = "Rapid Piping Device (RPD)"
|
||||
desc = "A device used to rapidly pipe things."
|
||||
@@ -137,7 +135,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/working = 0
|
||||
var/p_type = PIPE_SIMPLE
|
||||
var/p_type = /obj/machinery/atmospherics/pipe/simple
|
||||
var/p_conntype = PIPE_BENDABLE
|
||||
var/p_dir = 1
|
||||
var/p_flipped = 0
|
||||
@@ -201,7 +199,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
if(screen == CATEGORY_ATMOS)
|
||||
dat += "<span class='linkOn'>Atmospherics</span> <A href='?src=\ref[src];screen=[CATEGORY_DISPOSALS];dmake=0;type=0'>Disposals</A><BR>"
|
||||
else if(screen == CATEGORY_DISPOSALS)
|
||||
dat += "<A href='?src=\ref[src];screen=[CATEGORY_ATMOS];makepipe=0;dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>"
|
||||
dat += "<A href='?src=\ref[src];screen=[CATEGORY_ATMOS];makepipe=[/obj/machinery/atmospherics/pipe/simple];dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>"
|
||||
var/generated_layer_list = ""
|
||||
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
|
||||
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
|
||||
@@ -220,9 +218,9 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
var/datum/pipe_info/I = cat[label]
|
||||
var/found=0
|
||||
if(I.id == p_type)
|
||||
if((p_class == ATMOS_MODE || p_class == METER_MODE) && (I.type == /datum/pipe_info || I.type == /datum/pipe_info/meter))
|
||||
if((p_class == ATMOS_MODE || p_class == METER_MODE) && (istype(I, /datum/pipe_info/pipe) || istype(I, /datum/pipe_info/meter)))
|
||||
found=1
|
||||
else if(p_class == DISPOSALS_MODE && I.type==/datum/pipe_info/disposal)
|
||||
else if(p_class == DISPOSALS_MODE && istype(I, /datum/pipe_info/disposal))
|
||||
found=1
|
||||
if(found)
|
||||
preview=new /icon(I.icon,I.icon_state)
|
||||
@@ -510,7 +508,8 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
if(href_list["makepipe"])
|
||||
p_type = text2path(href_list["makepipe"])
|
||||
p_dir = text2num(href_list["dir"])
|
||||
p_conntype = text2num(href_list["type"])
|
||||
var/obj/item/pipe/path = text2path(href_list["type"])
|
||||
p_conntype = initial(path.RPD_type)
|
||||
p_class = ATMOS_MODE
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
@@ -581,7 +580,9 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
var/obj/item/pipe/P = new(A, queued_p_type, queued_p_dir)
|
||||
P.flipped = queued_p_flipped
|
||||
if(queued_p_flipped)
|
||||
var/obj/item/pipe/trinary/flippable/F = P
|
||||
F.flipped = queued_p_flipped
|
||||
P.update()
|
||||
P.add_fingerprint(usr)
|
||||
if(!isnull(temp_piping_layer))
|
||||
@@ -627,12 +628,6 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
/obj/item/pipe_dispenser/proc/activate()
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
#undef PIPE_BINARY
|
||||
#undef PIPE_BENT
|
||||
#undef PIPE_TRINARY
|
||||
#undef PIPE_TRIN_M
|
||||
#undef PIPE_UNARY
|
||||
#undef PIPE_QUAD
|
||||
#undef PAINT_MODE
|
||||
#undef EATING_MODE
|
||||
#undef ATMOS_MODE
|
||||
|
||||
@@ -36,6 +36,9 @@ Pipelines + Other Objects -> Pipe network
|
||||
var/device_type = 0
|
||||
var/list/obj/machinery/atmospherics/nodes
|
||||
|
||||
var/construction_type
|
||||
var/pipe_state //icon_state as a pipe item
|
||||
|
||||
/obj/machinery/atmospherics/examine(mob/user)
|
||||
..()
|
||||
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user))
|
||||
@@ -239,7 +242,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(can_unwrench)
|
||||
var/obj/item/pipe/stored = new(loc, piping_layer, dir, src)
|
||||
var/obj/item/pipe/stored = new construction_type(loc, null, dir, src)
|
||||
stored.setPipingLayer(piping_layer)
|
||||
if(!disassembled)
|
||||
stored.obj_integrity = stored.max_integrity * 0.5
|
||||
@@ -271,7 +274,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
if(unconnected & direction)
|
||||
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
|
||||
|
||||
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color, set_layer)
|
||||
/obj/machinery/atmospherics/on_construction(obj_color, set_layer)
|
||||
if(can_unwrench)
|
||||
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
|
||||
pipe_color = obj_color
|
||||
|
||||
@@ -21,6 +21,9 @@ Passive gate is similar to the regular pump except:
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "passivegate"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
|
||||
SSradio.remove_object(src,frequency)
|
||||
return ..()
|
||||
@@ -167,4 +170,3 @@ 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
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "pump"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/on
|
||||
on = TRUE
|
||||
|
||||
@@ -175,7 +178,10 @@ 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
|
||||
<<<<<<< HEAD
|
||||
else
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
|
||||
return TRUE
|
||||
=======
|
||||
>>>>>>> e8c2109... Atmos construction rework again (#31944)
|
||||
|
||||
@@ -15,6 +15,9 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
var/open = FALSE
|
||||
var/valve_type = "m" //lets us have a nice, clean, OOP update_icon_nopipes()
|
||||
|
||||
construction_type = /obj/item/pipe/binary
|
||||
pipe_state = "mvalve"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/valve/open
|
||||
open = TRUE
|
||||
|
||||
@@ -65,6 +68,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
desc = "A digitally controlled valve."
|
||||
icon_state = "dvalve_map"
|
||||
valve_type = "d"
|
||||
pipe_state = "dvalve"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/valve/digital/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -26,6 +26,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "volumepump"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
|
||||
SSradio.remove_object(src,frequency)
|
||||
return ..()
|
||||
@@ -171,7 +174,10 @@ 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
|
||||
<<<<<<< HEAD
|
||||
else
|
||||
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [A]")
|
||||
return
|
||||
=======
|
||||
>>>>>>> e8c2109... Atmos construction rework again (#31944)
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
var/frequency = 0
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
construction_type = /obj/item/pipe/trinary/flippable
|
||||
pipe_state = "filter"
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/flipped
|
||||
icon_state = "filter_off_f"
|
||||
flipped = TRUE
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
var/node1_concentration = 0.5
|
||||
var/node2_concentration = 0.5
|
||||
|
||||
construction_type = /obj/item/pipe/trinary/flippable
|
||||
pipe_state = "mixer"
|
||||
|
||||
//node 3 is the outlet, nodes 1 & 2 are intakes
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/flipped
|
||||
@@ -171,4 +174,3 @@
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
var/obj/machinery/atmospherics/components/unary/heat_exchanger/partner = null
|
||||
var/update_cycle
|
||||
|
||||
pipe_state = "heunary"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
|
||||
if(NODE1)
|
||||
icon_state = "he_intact"
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
level = 1
|
||||
layer = GAS_SCRUBBER_LAYER
|
||||
|
||||
pipe_state = "injector"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/Destroy()
|
||||
SSradio.remove_object(src,frequency)
|
||||
return ..()
|
||||
@@ -188,4 +190,3 @@
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
level = 0
|
||||
layer = GAS_FILTER_LAYER
|
||||
pipe_flags = PIPING_ONE_PER_TURF
|
||||
pipe_state = "connector"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/portables_connector/New()
|
||||
..()
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
initialize_directions = SOUTH
|
||||
device_type = UNARY
|
||||
pipe_flags = PIPING_ONE_PER_TURF
|
||||
construction_type = /obj/item/pipe/directional
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/SetInitDirections()
|
||||
initialize_directions = dir
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
var/radio_filter_out
|
||||
var/radio_filter_in
|
||||
|
||||
pipe_state = "uvent"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/on
|
||||
on = TRUE
|
||||
icon_state = "vent_map_on"
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
var/radio_filter_out
|
||||
var/radio_filter_in
|
||||
|
||||
pipe_state = "scrubber"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/New()
|
||||
..()
|
||||
if(!id_tag)
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
initialize_directions_he = SOUTH
|
||||
|
||||
device_type = BINARY
|
||||
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "junction"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/SetInitDirections()
|
||||
switch(dir)
|
||||
@@ -43,4 +46,4 @@
|
||||
return 0
|
||||
init_dir = H.initialize_directions_he
|
||||
if(init_dir & get_dir(target,src))
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
|
||||
device_type = TRINARY
|
||||
|
||||
construction_type = /obj/item/pipe/trinary
|
||||
pipe_state = "he_manifold"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/SetInitDirections()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
@@ -44,6 +47,9 @@
|
||||
|
||||
device_type = QUATERNARY
|
||||
|
||||
construction_type = /obj/item/pipe/quaternary
|
||||
pipe_state = "he_manifold4w"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
|
||||
initialize_directions_he = initial(initialize_directions_he)
|
||||
|
||||
@@ -57,4 +63,4 @@
|
||||
//Add non-broken pieces
|
||||
for(DEVICE_TYPE_LOOP)
|
||||
if(NODE_I)
|
||||
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
|
||||
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
device_type = BINARY
|
||||
|
||||
construction_type = /obj/item/pipe/binary/bendable
|
||||
pipe_state = "he"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/SetInitDirections()
|
||||
if(dir in GLOB.diagonals)
|
||||
initialize_directions_he = dir
|
||||
@@ -30,4 +33,4 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon()
|
||||
normalize_dir()
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
volume = 260
|
||||
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()
|
||||
@@ -31,17 +33,7 @@
|
||||
A.build_network()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes()
|
||||
var/list/obj/machinery/atmospherics/all_connected = list()
|
||||
for(var/obj/machinery/atmospherics/I in front_nodes)
|
||||
all_connected[I] = I
|
||||
for(var/obj/machinery/atmospherics/I in back_nodes)
|
||||
all_connected[I] = I
|
||||
for(var/obj/machinery/atmospherics/I in nodes)
|
||||
all_connected[I] = I
|
||||
var/list/obj/machinery/atmospherics/returnlist = list()
|
||||
for(var/obj/machinery/atmospherics/A in all_connected)
|
||||
returnlist += all_connected[A]
|
||||
return returnlist
|
||||
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.
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
|
||||
device_type = TRINARY
|
||||
|
||||
construction_type = /obj/item/pipe/trinary
|
||||
pipe_state = "manifold"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/SetInitDirections()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
@@ -168,4 +171,4 @@
|
||||
layer = GAS_PIPE_VISIBLE_LAYER
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/brown/hidden
|
||||
level = PIPE_HIDDEN_LEVEL
|
||||
level = PIPE_HIDDEN_LEVEL
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
device_type = QUATERNARY
|
||||
|
||||
construction_type = /obj/item/pipe/quaternary
|
||||
pipe_state = "manifold4w"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections()
|
||||
initialize_directions = initial(initialize_directions)
|
||||
|
||||
@@ -160,4 +163,4 @@
|
||||
layer = GAS_PIPE_VISIBLE_LAYER
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden
|
||||
level = PIPE_HIDDEN_LEVEL
|
||||
level = PIPE_HIDDEN_LEVEL
|
||||
|
||||
@@ -16,6 +16,9 @@ The regular pipe you see everywhere, including bent ones.
|
||||
|
||||
device_type = BINARY
|
||||
|
||||
construction_type = /obj/item/pipe/binary/bendable
|
||||
pipe_state = "simple"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
|
||||
normalize_cardinal_directions()
|
||||
if(dir in GLOB.diagonals)
|
||||
@@ -158,4 +161,4 @@ The regular pipe you see everywhere, including bent ones.
|
||||
layer = GAS_PIPE_VISIBLE_LAYER
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/brown/hidden
|
||||
level = PIPE_HIDDEN_LEVEL
|
||||
level = PIPE_HIDDEN_LEVEL
|
||||
|
||||
Reference in New Issue
Block a user