Major atmos overhaul: scrubbers and pipes can now co-exist

This commit is contained in:
Markolie
2015-01-18 02:24:24 +01:00
parent a463433001
commit f7ce7e55df
56 changed files with 18277 additions and 16749 deletions
+1 -1
View File
@@ -39,7 +39,7 @@
return 0 // not enough candidates for borer
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == STATION_Z && v.canSpawnMice==1) // No more spawning in atmos. Assuming the mappers did their jobs, anyway.
if(!v.welded && v.z == STATION_Z) // No more spawning in atmos. Assuming the mappers did their jobs, anyway.
found_vents.Add(v)
// for each 2 possible borers, add one borer and one host
+439 -42
View File
@@ -23,6 +23,25 @@ Buildable meters
#define PIPE_MTVALVE 18
#define PIPE_MANIFOLD4W 19
#define PIPE_CAP 20
///// Z-Level stuff
#define PIPE_UP 21
#define PIPE_DOWN 22
///// Z-Level stuff
#define PIPE_GAS_FILTER_M 23
#define PIPE_GAS_MIXER_T 24
#define PIPE_GAS_MIXER_M 25
#define PIPE_OMNI_MIXER 26
#define PIPE_OMNI_FILTER 27
///// Supply, scrubbers and universal pipes
#define PIPE_UNIVERSAL 28
#define PIPE_SUPPLY_STRAIGHT 29
#define PIPE_SUPPLY_BENT 30
#define PIPE_SCRUBBERS_STRAIGHT 31
#define PIPE_SCRUBBERS_BENT 32
#define PIPE_SUPPLY_MANIFOLD 33
#define PIPE_SCRUBBERS_MANIFOLD 34
#define PIPE_SUPPLY_MANIFOLD4W 35
#define PIPE_SCRUBBERS_MANIFOLD4W 36
/obj/item/pipe
name = "pipe"
@@ -30,6 +49,7 @@ Buildable meters
var/pipe_type = 0
//var/pipe_dir = 0
var/pipename
var/connect_types[] = list(1) //1=regular, 2=supply, 3=scrubber
force = 7
icon = 'icons/obj/pipe-item.dmi'
icon_state = "simple"
@@ -43,6 +63,7 @@ Buildable meters
if (make_from)
src.dir = make_from.dir
src.pipename = make_from.name
color = make_from.pipe_color
var/is_bent
if (make_from.initialize_directions in list(NORTH|SOUTH, WEST|EAST))
is_bent = 0
@@ -54,18 +75,43 @@ Buildable meters
src.pipe_type = PIPE_HE_STRAIGHT + is_bent
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated))
src.pipe_type = PIPE_INSULATED_STRAIGHT + is_bent
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/supply))
src.pipe_type = PIPE_SUPPLY_STRAIGHT + is_bent
connect_types = list(2)
src.color = PIPE_COLOR_BLUE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers))
src.pipe_type = PIPE_SCRUBBERS_STRAIGHT + is_bent
connect_types = list(3)
src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/universal) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/universal))
src.pipe_type = PIPE_UNIVERSAL
connect_types = list(1,2,3)
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple))
src.pipe_type = PIPE_SIMPLE_STRAIGHT + is_bent
else if(istype(make_from, /obj/machinery/atmospherics/portables_connector))
src.pipe_type = PIPE_CONNECTOR
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold/hidden/supply))
src.pipe_type = PIPE_SUPPLY_MANIFOLD
connect_types = list(2)
src.color = PIPE_COLOR_BLUE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers))
src.pipe_type = PIPE_SCRUBBERS_MANIFOLD
connect_types = list(3)
src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold))
src.pipe_type = PIPE_MANIFOLD
else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_pump))
src.pipe_type = PIPE_UVENT
else if(istype(make_from, /obj/machinery/atmospherics/valve))
src.pipe_type = PIPE_MVALVE
else if(istype(make_from, /obj/machinery/atmospherics/binary/pump))
else if(istype(make_from, /obj/machinery/atmospherics/binary/volume_pump))
src.pipe_type = PIPE_PUMP
else if(istype(make_from, /obj/machinery/atmospherics/trinary/filter/m_filter))
src.pipe_type = PIPE_GAS_FILTER_M
else if(istype(make_from, /obj/machinery/atmospherics/trinary/mixer/t_mixer))
src.pipe_type = PIPE_GAS_MIXER_T
else if(istype(make_from, /obj/machinery/atmospherics/trinary/mixer/m_mixer))
src.pipe_type = PIPE_GAS_MIXER_M
else if(istype(make_from, /obj/machinery/atmospherics/trinary/filter))
src.pipe_type = PIPE_GAS_FILTER
else if(istype(make_from, /obj/machinery/atmospherics/trinary/mixer))
@@ -80,42 +126,45 @@ Buildable meters
src.pipe_type = PIPE_HEAT_EXCHANGE
else if(istype(make_from, /obj/machinery/atmospherics/tvalve))
src.pipe_type = PIPE_MTVALVE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/supply))
src.pipe_type = PIPE_SUPPLY_MANIFOLD4W
connect_types = list(2)
src.color = PIPE_COLOR_BLUE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers))
src.pipe_type = PIPE_SCRUBBERS_MANIFOLD4W
connect_types = list(3)
src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w))
src.pipe_type = PIPE_MANIFOLD4W
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
src.pipe_type = PIPE_CAP
else if(istype(make_from, /obj/machinery/atmospherics/omni/mixer))
src.pipe_type = PIPE_OMNI_MIXER
else if(istype(make_from, /obj/machinery/atmospherics/omni/filter))
src.pipe_type = PIPE_OMNI_FILTER
///// Z-Level stuff
/*else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up))
src.pipe_type = PIPE_UP
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down))
src.pipe_type = PIPE_DOWN*/
///// Z-Level stuff
else
src.pipe_type = pipe_type
src.dir = dir
if (pipe_type == 29 || pipe_type == 30 || pipe_type == 33 || pipe_type == 35)
connect_types = list(2)
src.color = PIPE_COLOR_BLUE
else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36)
connect_types = list(3)
src.color = PIPE_COLOR_RED
else if (pipe_type == 28)
connect_types = list(1,2,3)
//src.pipe_dir = get_pipe_dir()
update()
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
//update the name and icon of the pipe item depending on the type
var/global/list/pipeID2State = list(
"simple", \
"simple", \
"he", \
"he", \
"connector", \
"manifold", \
"junction", \
"uvent", \
"mvalve", \
"pump", \
"scrubber", \
"insulated", \
"insulated", \
"filter", \
"mixer", \
"passivegate", \
"volumepump", \
"heunary", \
"mtvalve", \
"manifold4w", \
"cap", \
)
/obj/item/pipe/proc/update()
var/list/nlist = list( \
@@ -140,9 +189,70 @@ var/global/list/pipeID2State = list(
"t-valve", \
"4-way manifold", \
"pipe cap", \
///// Z-Level stuff
"pipe up", \
"pipe down", \
///// Z-Level stuff
"gas filter m", \
"gas mixer t", \
"gas mixer m", \
"omni mixer", \
"omni filter", \
///// Supply and scrubbers pipes
"universal pipe adapter", \
"supply pipe", \
"bent supply pipe", \
"scrubbers pipe", \
"bent scrubbers pipe", \
"supply manifold", \
"scrubbers manifold", \
"supply 4-way manifold", \
"scrubbers 4-way manifold", \
)
name = nlist[pipe_type+1] + " fitting"
icon_state = pipeID2State[pipe_type + 1]
var/list/islist = list( \
"simple", \
"simple", \
"he", \
"he", \
"connector", \
"manifold", \
"junction", \
"uvent", \
"mvalve", \
"pump", \
"scrubber", \
"insulated", \
"insulated", \
"filter", \
"mixer", \
"passivegate", \
"volumepump", \
"heunary", \
"mtvalve", \
"manifold4w", \
"cap", \
///// Z-Level stuff
"cap", \
"cap", \
///// Z-Level stuff
"m_filter", \
"t_mixer", \
"m_mixer", \
"omni_mixer", \
"omni_filter", \
///// Supply and scrubbers pipes
"universal", \
"simple", \
"simple", \
"simple", \
"simple", \
"manifold", \
"manifold", \
"manifold4w", \
"manifold4w", \
)
icon_state = islist[pipe_type + 1]
//called when a turf is attacked with a pipe item
// place the pipe on the turf, setting pipe level to 1 (underfloor) if the turf is not intact
@@ -159,22 +269,22 @@ var/global/list/pipeID2State = list(
src.dir = turn(src.dir, -90)
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
dir = 1
else if(dir==8)
dir = 4
else if (pipe_type == PIPE_MANIFOLD4W)
else if (pipe_type in list (PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W))
dir = 2
//src.pipe_dir = get_pipe_dir()
return
/obj/item/pipe/Move()
..()
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
&& (src.dir in cardinal))
src.dir = src.dir|turn(src.dir, 90)
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -198,21 +308,32 @@ var/global/list/pipeID2State = list(
PIPE_PUMP ,\
PIPE_VOLUME_PUMP ,\
PIPE_PASSIVE_GATE ,\
PIPE_MVALVE \
PIPE_MVALVE ,\
PIPE_SUPPLY_STRAIGHT, \
PIPE_SCRUBBERS_STRAIGHT, \
PIPE_UNIVERSAL, \
)
return dir|flip
if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT)
if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT)
return dir //dir|acw
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
return dir
if(PIPE_MANIFOLD4W)
if(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER)
return dir|flip|cw|acw
if(PIPE_MANIFOLD)
if(PIPE_MANIFOLD, PIPE_SUPPLY_MANIFOLD, PIPE_SCRUBBERS_MANIFOLD)
return flip|cw|acw
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE)
return dir|flip|cw
if(PIPE_GAS_FILTER_M, PIPE_GAS_MIXER_M)
return dir|flip|acw
if(PIPE_GAS_MIXER_T)
return dir|cw|acw
if(PIPE_CAP)
return flip
///// Z-Level stuff
if(PIPE_UP,PIPE_DOWN)
return dir
///// Z-Level stuff
return 0
/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes
@@ -257,26 +378,84 @@ var/global/list/pipeID2State = list(
return ..()
if (!isturf(src.loc))
return 1
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
dir = 1
else if(dir==8)
dir = 4
else if (pipe_type == PIPE_MANIFOLD4W)
else if (pipe_type in list(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER))
dir = 2
var/pipe_dir = get_pipe_dir()
for(var/obj/machinery/atmospherics/M in src.loc)
if(M.initialize_directions & pipe_dir) // matches at least one direction on either type of pipe
user << "\red There is already a pipe at that location."
if((M.initialize_directions & pipe_dir) && M.check_connect_types_construction(M,src)) // matches at least one direction on either type of pipe
user << "\red There is already a pipe of the same type at this location."
return 1
// no conflicts found
var/pipefailtext = "\red There's nothing to connect this pipe section to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
var/pipefailtext = "\red There's nothing to connect this pipe section to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
switch(pipe_type)
if(PIPE_SIMPLE_STRAIGHT, PIPE_SIMPLE_BENT)
var/obj/machinery/atmospherics/pipe/simple/P = new( src.loc )
P.pipe_color = color
P.dir = src.dir
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
usr << pipefailtext
return 1
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT)
var/obj/machinery/atmospherics/pipe/simple/hidden/supply/P = new( src.loc )
P.color = color
P.dir = src.dir
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
usr << pipefailtext
return 1
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if(PIPE_SCRUBBERS_STRAIGHT, PIPE_SCRUBBERS_BENT)
var/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers/P = new( src.loc )
P.color = color
P.dir = src.dir
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
usr << pipefailtext
return 1
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if(PIPE_UNIVERSAL)
var/obj/machinery/atmospherics/pipe/simple/hidden/universal/P = new( src.loc )
P.color = color
P.dir = src.dir
P.initialize_directions = pipe_dir
var/turf/T = P.loc
@@ -329,6 +508,53 @@ var/global/list/pipeID2State = list(
if(PIPE_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/M = new( src.loc )
M.pipe_color = color
M.dir = dir
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
usr << "There's nothing to connect this manifold to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
M.build_network()
if (M.node1)
M.node1.initialize()
M.node1.build_network()
if (M.node2)
M.node2.initialize()
M.node2.build_network()
if (M.node3)
M.node3.initialize()
M.node3.build_network()
if(PIPE_SUPPLY_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/hidden/supply/M = new( src.loc )
M.color = color
M.dir = dir
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
M.build_network()
if (M.node1)
M.node1.initialize()
M.node1.build_network()
if (M.node2)
M.node2.initialize()
M.node2.build_network()
if (M.node3)
M.node3.initialize()
M.node3.build_network()
if(PIPE_SCRUBBERS_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers/M = new( src.loc )
M.color = color
M.dir = dir
M.initialize_directions = pipe_dir
//M.New()
@@ -351,12 +577,67 @@ var/global/list/pipeID2State = list(
if(PIPE_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/M = new( src.loc )
M.pipe_color = color
M.dir = dir
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
usr << "There's nothing to connect this manifold to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
M.build_network()
if (M.node1)
M.node1.initialize()
M.node1.build_network()
if (M.node2)
M.node2.initialize()
M.node2.build_network()
if (M.node3)
M.node3.initialize()
M.node3.build_network()
if (M.node4)
M.node4.initialize()
M.node4.build_network()
if(PIPE_SUPPLY_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply/M = new( src.loc )
M.color = color
M.dir = dir
M.initialize_directions = pipe_dir
M.connect_types = src.connect_types
//M.New()
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
M.build_network()
if (M.node1)
M.node1.initialize()
M.node1.build_network()
if (M.node2)
M.node2.initialize()
M.node2.build_network()
if (M.node3)
M.node3.initialize()
M.node3.build_network()
if (M.node4)
M.node4.initialize()
M.node4.build_network()
if(PIPE_SCRUBBERS_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers/M = new( src.loc )
M.color = color
M.dir = dir
M.initialize_directions = pipe_dir
M.connect_types = src.connect_types
//M.New()
var/turf/T = M.loc
M.level = T.intact ? 2 : 1
M.initialize()
if (!M)
usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
@@ -383,7 +664,7 @@ var/global/list/pipeID2State = list(
//P.level = T.intact ? 2 : 1
P.initialize()
if (!P)
usr << "There's nothing to connect this junction to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1
P.build_network()
if (P.node1)
@@ -428,7 +709,7 @@ var/global/list/pipeID2State = list(
V.node2.build_network()
if(PIPE_PUMP) //gas pump
var/obj/machinery/atmospherics/binary/pump/P = new(src.loc)
var/obj/machinery/atmospherics/binary/volume_pump/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
@@ -464,7 +745,7 @@ var/global/list/pipeID2State = list(
P.node3.initialize()
P.node3.build_network()
if(PIPE_GAS_MIXER) //gas filter
if(PIPE_GAS_MIXER) //gas mixer
var/obj/machinery/atmospherics/trinary/mixer/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
@@ -484,6 +765,66 @@ var/global/list/pipeID2State = list(
P.node3.initialize()
P.node3.build_network()
if(PIPE_GAS_FILTER_M) //gas filter mirrored
var/obj/machinery/atmospherics/trinary/filter/m_filter/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if (P.node3)
P.node3.initialize()
P.node3.build_network()
if(PIPE_GAS_MIXER_T) //gas mixer-t
var/obj/machinery/atmospherics/trinary/mixer/t_mixer/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if (P.node3)
P.node3.initialize()
P.node3.build_network()
if(PIPE_GAS_MIXER_M) //gas mixer mirrored
var/obj/machinery/atmospherics/trinary/mixer/m_mixer/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if (P.node3)
P.node3.initialize()
P.node3.build_network()
if(PIPE_SCRUBBER) //scrubber
var/obj/machinery/atmospherics/unary/vent_scrubber/S = new(src.loc)
S.dir = dir
@@ -593,6 +934,52 @@ var/global/list/pipeID2State = list(
if (C.node)
C.node.initialize()
C.node.build_network()
///// Z-Level stuff
/* if(PIPE_UP)
var/obj/machinery/atmospherics/pipe/zpipe/up/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if(PIPE_DOWN)
var/obj/machinery/atmospherics/pipe/zpipe/down/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()*/
///// Z-Level stuff
if(PIPE_OMNI_MIXER)
var/obj/machinery/atmospherics/omni/mixer/P = new(loc)
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if(PIPE_OMNI_FILTER)
var/obj/machinery/atmospherics/omni/filter/P = new(loc)
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message( \
@@ -649,4 +1036,14 @@ var/global/list/pipeID2State = list(
#undef PIPE_VOLUME_PUMP
#undef PIPE_OUTLET_INJECT
#undef PIPE_MTVALVE
//#undef PIPE_MANIFOLD4W
#undef PIPE_GAS_FILTER_M
#undef PIPE_GAS_MIXER_T
#undef PIPE_GAS_MIXER_M
#undef PIPE_SUPPLY_STRAIGHT
#undef PIPE_SUPPLY_BENT
#undef PIPE_SCRUBBERS_STRAIGHT
#undef PIPE_SCRUBBERS_BENT
#undef PIPE_SUPPLY_MANIFOLD
#undef PIPE_SCRUBBERS_MANIFOLD
#undef PIPE_UNIVERSAL
//#undef PIPE_MANIFOLD4W
@@ -22,7 +22,18 @@
<A href='?src=\ref[src];make=20;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=19;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=18;dir=1'>Manual T-Valve</A><BR>
<b>Supply pipes:</b><BR>
<A href='?src=\ref[src];make=29;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=30;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=33;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=35;dir=1'>4-Way Manifold</A><BR>
<b>Scrubbers pipes:</b><BR>
<A href='?src=\ref[src];make=31;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=32;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=34;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=36;dir=1'>4-Way Manifold</A><BR>
<b>Devices:</b><BR>
<A href='?src=\ref[src];make=28;dir=1'>Universal Pipe Adapter</A><BR>
<A href='?src=\ref[src];make=4;dir=1'>Connector</A><BR>
<A href='?src=\ref[src];make=7;dir=1'>Unary Vent</A><BR>
<A href='?src=\ref[src];make=9;dir=1'>Gas Pump</A><BR>
@@ -3,19 +3,30 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler1"
item_state = "flight"
var/list/modes = list("grey","red","blue","cyan","green","yellow","purple")
var/mode = "grey"
var/list/modes
var/mode
/obj/item/device/pipe_painter/New()
..()
modes = new()
for(var/C in pipe_colors)
modes += "[C]"
mode = pick(modes)
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated))
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
return
var/obj/machinery/atmospherics/pipe/P = A
P._color = mode
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
P.update_icon()
var/turf/T = P.loc
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
user << "\red You must remove the plating first."
return
P.change_color(pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?","Pipe painter") in modes
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
/obj/item/device/pipe_painter/examine()
..()
@@ -66,11 +66,13 @@ REAGENT SCANNER
if(O.invisibility == 101)
O.invisibility = 0
O.alpha = 128
spawn(pulse_duration)
if(O)
var/turf/U = O.loc
if(U.intact)
O.invisibility = 101
O.alpha = 255
for(var/mob/living/M in T.contents)
var/oldalpha = M.alpha
if(M.alpha < 255 && istype(M))
+1
View File
@@ -50,6 +50,7 @@
icon_state = "engine"
thermal_conductivity = 0.025
heat_capacity = 325000
intact = 0
/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob)
if(!C)