mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Trinary atmospheric device variants
- Mirror filter - standard filter with the output mirrored to the opposite side - T-Mixer - takes left and right inputs then outputs the mix perpendicular to the inputs - Mirror mixer - standard filter with the output mirrored to the opposite side - Added all three to pipe dispenser and construction code so they can be built in-game
This commit is contained in:
@@ -234,4 +234,45 @@ obj/machinery/atmospherics/trinary/filter/Topic(href, href_list) // -- TLE
|
||||
*/
|
||||
return
|
||||
|
||||
obj/machinery/atmospherics/trinary/filter/m_filter
|
||||
icon = 'icons/obj/atmospherics/m_filter.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|NORTH|EAST
|
||||
|
||||
obj/machinery/atmospherics/trinary/filter/m_filter/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = WEST|NORTH|SOUTH
|
||||
if(SOUTH)
|
||||
initialize_directions = SOUTH|EAST|NORTH
|
||||
if(EAST)
|
||||
initialize_directions = EAST|WEST|NORTH
|
||||
if(WEST)
|
||||
initialize_directions = WEST|SOUTH|EAST
|
||||
|
||||
obj/machinery/atmospherics/trinary/filter/m_filter/initialize()
|
||||
if(node1 && node2 && node3) return
|
||||
|
||||
var/node1_connect = turn(dir, -180)
|
||||
var/node2_connect = turn(dir, 90)
|
||||
var/node3_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node3 = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -160,3 +160,93 @@ obj/machinery/atmospherics/trinary/mixer
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/t_mixer
|
||||
icon = 'icons/obj/atmospherics/t_mixer.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|EAST|WEST
|
||||
|
||||
//node 3 is the outlet, nodes 1 & 2 are intakes
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/t_mixer/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = EAST|NORTH|WEST
|
||||
if(SOUTH)
|
||||
initialize_directions = SOUTH|WEST|EAST
|
||||
if(EAST)
|
||||
initialize_directions = EAST|NORTH|SOUTH
|
||||
if(WEST)
|
||||
initialize_directions = WEST|NORTH|SOUTH
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/t_mixer/initialize()
|
||||
if(node1 && node2 && node3) return
|
||||
|
||||
var/node1_connect = turn(dir, -90)
|
||||
var/node2_connect = turn(dir, 90)
|
||||
var/node3_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node3 = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/m_mixer
|
||||
icon = 'icons/obj/atmospherics/m_mixer.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|NORTH|EAST
|
||||
|
||||
//node 3 is the outlet, nodes 1 & 2 are intakes
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/m_mixer/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = WEST|NORTH|SOUTH
|
||||
if(SOUTH)
|
||||
initialize_directions = SOUTH|EAST|NORTH
|
||||
if(EAST)
|
||||
initialize_directions = EAST|WEST|NORTH
|
||||
if(WEST)
|
||||
initialize_directions = WEST|SOUTH|EAST
|
||||
|
||||
obj/machinery/atmospherics/trinary/mixer/m_mixer/initialize()
|
||||
if(node1 && node2 && node3) return
|
||||
|
||||
var/node1_connect = turn(dir, -180)
|
||||
var/node2_connect = turn(dir, 90)
|
||||
var/node3_connect = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node3 = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
@@ -27,6 +27,9 @@ Buildable meters
|
||||
#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
|
||||
|
||||
/obj/item/pipe
|
||||
name = "pipe"
|
||||
@@ -71,6 +74,12 @@ Buildable meters
|
||||
src.pipe_type = PIPE_MVALVE
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/binary/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))
|
||||
@@ -132,6 +141,9 @@ Buildable meters
|
||||
"pipe up", \
|
||||
"pipe down", \
|
||||
///// Z-Level stuff
|
||||
"gas filter m", \
|
||||
"gas mixer t", \
|
||||
"gas mixer m", \
|
||||
)
|
||||
name = nlist[pipe_type+1] + " fitting"
|
||||
var/list/islist = list( \
|
||||
@@ -160,6 +172,9 @@ Buildable meters
|
||||
"cap", \
|
||||
"cap", \
|
||||
///// Z-Level stuff
|
||||
"m_filter", \
|
||||
"t_mixer", \
|
||||
"m_mixer", \
|
||||
)
|
||||
icon_state = islist[pipe_type + 1]
|
||||
|
||||
@@ -230,6 +245,10 @@ Buildable meters
|
||||
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
|
||||
@@ -490,7 +509,7 @@ Buildable meters
|
||||
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
|
||||
@@ -510,6 +529,66 @@ Buildable meters
|
||||
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
|
||||
@@ -709,4 +788,7 @@ Buildable meters
|
||||
#undef PIPE_VOLUME_PUMP
|
||||
#undef PIPE_OUTLET_INJECT
|
||||
#undef PIPE_MTVALVE
|
||||
#undef PIPE_GAS_FILTER_M
|
||||
#undef PIPE_GAS_MIXER_T
|
||||
#undef PIPE_GAS_MIXER_M
|
||||
//#undef PIPE_MANIFOLD4W
|
||||
|
||||
@@ -34,7 +34,10 @@
|
||||
<A href='?src=\ref[src];make=10;dir=1'>Scrubber</A><BR>
|
||||
<A href='?src=\ref[src];makemeter=1'>Meter</A><BR>
|
||||
<A href='?src=\ref[src];make=13;dir=1'>Gas Filter</A><BR>
|
||||
<A href='?src=\ref[src];make=23;dir=1'>Gas Filter-Mirrored</A><BR>
|
||||
<A href='?src=\ref[src];make=14;dir=1'>Gas Mixer</A><BR>
|
||||
<A href='?src=\ref[src];make=25;dir=1'>Gas Mixer-Mirrored</A><BR>
|
||||
<A href='?src=\ref[src];make=24;dir=1'>Gas Mixer-T</A><BR>
|
||||
<b>Heat exchange:</b><BR>
|
||||
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
|
||||
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
|
||||
|
||||
BIN
icons/obj/atmospherics/m_filter.dmi
Normal file
BIN
icons/obj/atmospherics/m_filter.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
BIN
icons/obj/atmospherics/m_mixer.dmi
Normal file
BIN
icons/obj/atmospherics/m_mixer.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
BIN
icons/obj/atmospherics/t_mixer.dmi
Normal file
BIN
icons/obj/atmospherics/t_mixer.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user