mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Adds H/E Manifolds (#14717)
* Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Balances heat transfer Not efficient to build 5 manifolds on every tile, makes you utilize pipes. * Whoops Forgot the 4-way
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
minimum_temperature_difference = 20
|
minimum_temperature_difference = 20
|
||||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||||
|
|
||||||
var/const/RADIATION_CAPACITY = 32000 // Radiation isn't particularly effective (TODO BALANCE)
|
var/RADIATION_CAPACITY = 32000 // Radiation isn't particularly effective (TODO BALANCE)
|
||||||
// Plate value is 30000, increased it a bit because of additional surface area. - N3X
|
// Plate value is 30000, increased it a bit because of additional surface area. - N3X
|
||||||
var/const/ENERGY_MULT = 6.4 // Not sure what this is, keeping it the same as plates.
|
var/const/ENERGY_MULT = 6.4 // Not sure what this is, keeping it the same as plates.
|
||||||
|
|
||||||
@@ -209,3 +209,106 @@
|
|||||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/hidden
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/hidden
|
||||||
level=1
|
level=1
|
||||||
icon_state="intact-f"
|
icon_state="intact-f"
|
||||||
|
|
||||||
|
/////////////////////////////////
|
||||||
|
// Manifold
|
||||||
|
/////////////////////////////////
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold
|
||||||
|
icon = 'icons/obj/pipe-item.dmi'
|
||||||
|
icon_state = "he_manifold"
|
||||||
|
var/obj/machinery/atmospherics/node3
|
||||||
|
RADIATION_CAPACITY = 24000
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold/New()
|
||||||
|
.. ()
|
||||||
|
switch(dir)
|
||||||
|
if(NORTH)
|
||||||
|
initialize_directions_he = EAST|SOUTH|WEST
|
||||||
|
if(SOUTH)
|
||||||
|
initialize_directions_he = NORTH|EAST|WEST
|
||||||
|
if(EAST)
|
||||||
|
initialize_directions_he = NORTH|SOUTH|WEST
|
||||||
|
if(WEST)
|
||||||
|
initialize_directions_he = NORTH|EAST|SOUTH
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||||
|
dir = pipe.dir
|
||||||
|
initialize_directions_he = pipe.get_hdir()
|
||||||
|
initialize(1)
|
||||||
|
if (!node1 && !node2 && !node3)
|
||||||
|
to_chat(usr, "There's nothing to connect this manifold to!")
|
||||||
|
return 0
|
||||||
|
build_network()
|
||||||
|
if (node1)
|
||||||
|
node1.initialize()
|
||||||
|
node1.build_network()
|
||||||
|
if (node2)
|
||||||
|
node2.initialize()
|
||||||
|
node2.build_network()
|
||||||
|
if (node3)
|
||||||
|
node3.initialize()
|
||||||
|
node3.build_network()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold/update_icon()
|
||||||
|
if(!node1&&!node2&&!node3)
|
||||||
|
qdel(src)
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold/pipeline_expansion()
|
||||||
|
return list(node1, node2, node3)
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold/initialize(var/suppress_icon_check=0)
|
||||||
|
findAllConnections(initialize_directions_he)
|
||||||
|
|
||||||
|
if(!suppress_icon_check)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/////////////////////////////////
|
||||||
|
// 4-Way Manifold
|
||||||
|
/////////////////////////////////
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w
|
||||||
|
icon = 'icons/obj/pipe-item.dmi'
|
||||||
|
icon_state = "he_manifold4w"
|
||||||
|
var/obj/machinery/atmospherics/node3
|
||||||
|
var/obj/machinery/atmospherics/node4
|
||||||
|
RADIATION_CAPACITY = 24000
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w/New()
|
||||||
|
.. ()
|
||||||
|
initialize_directions_he = NORTH|SOUTH|EAST|WEST
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w/buildFrom(var/mob/usr,var/obj/item/pipe/pipe)
|
||||||
|
dir = pipe.dir
|
||||||
|
initialize_directions_he = pipe.get_hdir()
|
||||||
|
initialize(1)
|
||||||
|
if (!node1 && !node2 && !node3 && !node4)
|
||||||
|
to_chat(usr, "There's nothing to connect this manifold to!")
|
||||||
|
return 0
|
||||||
|
build_network()
|
||||||
|
if (node1)
|
||||||
|
node1.initialize()
|
||||||
|
node1.build_network()
|
||||||
|
if (node2)
|
||||||
|
node2.initialize()
|
||||||
|
node2.build_network()
|
||||||
|
if (node3)
|
||||||
|
node3.initialize()
|
||||||
|
node3.build_network()
|
||||||
|
if (node4)
|
||||||
|
node4.initialize()
|
||||||
|
node4.build_network()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w/update_icon()
|
||||||
|
if(!node1&&!node2&&!node3&&!node4)
|
||||||
|
qdel(src)
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w/pipeline_expansion()
|
||||||
|
return list(node1, node2, node3, node4)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w/initialize(var/suppress_icon_check=0)
|
||||||
|
findAllConnections(initialize_directions_he)
|
||||||
|
|
||||||
|
if(!suppress_icon_check)
|
||||||
|
update_icon()
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ Buildable meters
|
|||||||
#define PIPE_INSUL_MANIFOLD4W 28
|
#define PIPE_INSUL_MANIFOLD4W 28
|
||||||
#define PIPE_LAYER_MANIFOLD 29
|
#define PIPE_LAYER_MANIFOLD 29
|
||||||
#define PIPE_LAYER_ADAPTER 30
|
#define PIPE_LAYER_ADAPTER 30
|
||||||
|
#define PIPE_HE_MANIFOLD 31
|
||||||
|
#define PIPE_HE_MANIFOLD4W 32
|
||||||
|
|
||||||
//Disposal piping numbers - do NOT hardcode these, use the defines
|
//Disposal piping numbers - do NOT hardcode these, use the defines
|
||||||
#define DISP_PIPE_STRAIGHT 0
|
#define DISP_PIPE_STRAIGHT 0
|
||||||
@@ -49,7 +51,7 @@ Buildable meters
|
|||||||
#define DISP_SORT_WRAP_JUNCTION 9
|
#define DISP_SORT_WRAP_JUNCTION 9
|
||||||
|
|
||||||
var/global/list/unstackable_pipes = list(PIPE_LAYER_MANIFOLD)
|
var/global/list/unstackable_pipes = list(PIPE_LAYER_MANIFOLD)
|
||||||
var/global/list/heat_pipes = list(PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_JUNCTION)
|
var/global/list/heat_pipes = list(PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_JUNCTION, PIPE_HE_MANIFOLD, PIPE_HE_MANIFOLD4W)
|
||||||
|
|
||||||
/obj/item/pipe_spawner
|
/obj/item/pipe_spawner
|
||||||
name = "Pipe Spawner"
|
name = "Pipe Spawner"
|
||||||
@@ -129,6 +131,10 @@ var/list/bent_dirs = list(NORTH|SOUTH, WEST|EAST)
|
|||||||
is_bent = 1
|
is_bent = 1
|
||||||
if (istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction))
|
if (istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction))
|
||||||
src.pipe_type = PIPE_JUNCTION
|
src.pipe_type = PIPE_JUNCTION
|
||||||
|
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w))
|
||||||
|
src.pipe_type = PIPE_HE_MANIFOLD4W
|
||||||
|
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold))
|
||||||
|
src.pipe_type = PIPE_HE_MANIFOLD
|
||||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging))
|
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging))
|
||||||
src.pipe_type = PIPE_HE_STRAIGHT + is_bent
|
src.pipe_type = PIPE_HE_STRAIGHT + is_bent
|
||||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated))
|
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated))
|
||||||
@@ -243,6 +249,8 @@ var/global/list/pipeID2State = list(
|
|||||||
"insulated_manifold4w",
|
"insulated_manifold4w",
|
||||||
"manifoldlayer",
|
"manifoldlayer",
|
||||||
"layeradapter",
|
"layeradapter",
|
||||||
|
"he_manifold",
|
||||||
|
"he_manifold4w",
|
||||||
)
|
)
|
||||||
var/global/list/nlist = list( \
|
var/global/list/nlist = list( \
|
||||||
"pipe", \
|
"pipe", \
|
||||||
@@ -276,6 +284,8 @@ var/global/list/nlist = list( \
|
|||||||
"insulated 4-way manifold", \
|
"insulated 4-way manifold", \
|
||||||
"pipe alignment converter", \
|
"pipe alignment converter", \
|
||||||
"pipe alignment adapter",
|
"pipe alignment adapter",
|
||||||
|
"h/e manifold", \
|
||||||
|
"h/e 4-way manifold", \
|
||||||
)
|
)
|
||||||
/obj/item/pipe/proc/update()
|
/obj/item/pipe/proc/update()
|
||||||
|
|
||||||
@@ -294,7 +304,7 @@ var/global/list/nlist = list( \
|
|||||||
// rotate the pipe item clockwise
|
// rotate the pipe item clockwise
|
||||||
var/list/straight_pipes = list(PIPE_SIMPLE_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE)
|
var/list/straight_pipes = list(PIPE_SIMPLE_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE)
|
||||||
var/list/bent_pipes = list(PIPE_SIMPLE_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)
|
var/list/bent_pipes = list(PIPE_SIMPLE_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)
|
||||||
var/list/manifold_pipes = list(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W)
|
var/list/manifold_pipes = list(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W, PIPE_HE_MANIFOLD4W)
|
||||||
/obj/item/pipe/verb/rotate()
|
/obj/item/pipe/verb/rotate()
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set name = "Rotate Pipe"
|
set name = "Rotate Pipe"
|
||||||
@@ -349,9 +359,9 @@ var/list/manifold_pipes = list(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W)
|
|||||||
return dir //dir|acw
|
return dir //dir|acw
|
||||||
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_PASV_VENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE,PIPE_THERMAL_PLATE,PIPE_INJECTOR)
|
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_PASV_VENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE,PIPE_THERMAL_PLATE,PIPE_INJECTOR)
|
||||||
return dir
|
return dir
|
||||||
if(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W)
|
if(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W, PIPE_HE_MANIFOLD4W)
|
||||||
return dir|flip|cw|acw
|
return dir|flip|cw|acw
|
||||||
if(PIPE_MANIFOLD, PIPE_INSUL_MANIFOLD)
|
if(PIPE_MANIFOLD, PIPE_INSUL_MANIFOLD, PIPE_HE_MANIFOLD)
|
||||||
return flip|cw|acw
|
return flip|cw|acw
|
||||||
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE,PIPE_DTVALVE)
|
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER,PIPE_MTVALVE,PIPE_DTVALVE)
|
||||||
return dir|flip|cw
|
return dir|flip|cw
|
||||||
@@ -387,6 +397,10 @@ var/list/manifold_pipes = list(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W)
|
|||||||
return get_pipe_dir()
|
return get_pipe_dir()
|
||||||
if(PIPE_HE_BENT)
|
if(PIPE_HE_BENT)
|
||||||
return get_pipe_dir()
|
return get_pipe_dir()
|
||||||
|
if (PIPE_HE_MANIFOLD)
|
||||||
|
return get_pipe_dir()
|
||||||
|
if (PIPE_HE_MANIFOLD4W)
|
||||||
|
return get_pipe_dir()
|
||||||
if(PIPE_JUNCTION)
|
if(PIPE_JUNCTION)
|
||||||
return dir
|
return dir
|
||||||
else
|
else
|
||||||
@@ -425,6 +439,12 @@ var/list/manifold_pipes = list(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W)
|
|||||||
if(PIPE_HE_STRAIGHT, PIPE_HE_BENT)
|
if(PIPE_HE_STRAIGHT, PIPE_HE_BENT)
|
||||||
P=new/obj/machinery/atmospherics/pipe/simple/heat_exchanging(loc)
|
P=new/obj/machinery/atmospherics/pipe/simple/heat_exchanging(loc)
|
||||||
|
|
||||||
|
if(PIPE_HE_MANIFOLD4W)
|
||||||
|
P=new/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold4w( src.loc )
|
||||||
|
|
||||||
|
if(PIPE_HE_MANIFOLD)
|
||||||
|
P=new/obj/machinery/atmospherics/pipe/simple/heat_exchanging/he_manifold( src.loc )
|
||||||
|
|
||||||
if(PIPE_CONNECTOR) // connector
|
if(PIPE_CONNECTOR) // connector
|
||||||
P=new/obj/machinery/atmospherics/unary/portables_connector(loc)
|
P=new/obj/machinery/atmospherics/unary/portables_connector(loc)
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,8 @@
|
|||||||
/datum/rcd_schematic/pipe/he_bent,
|
/datum/rcd_schematic/pipe/he_bent,
|
||||||
/datum/rcd_schematic/pipe/juntion,
|
/datum/rcd_schematic/pipe/juntion,
|
||||||
/datum/rcd_schematic/pipe/heat_exchanger,
|
/datum/rcd_schematic/pipe/heat_exchanger,
|
||||||
|
/datum/rcd_schematic/pipe/he_manifold,
|
||||||
|
/datum/rcd_schematic/pipe/he_manifold4w,
|
||||||
|
|
||||||
/* Insulated Pipes */
|
/* Insulated Pipes */
|
||||||
/datum/rcd_schematic/pipe/insulated,
|
/datum/rcd_schematic/pipe/insulated,
|
||||||
@@ -74,7 +76,7 @@
|
|||||||
|
|
||||||
/obj/item/device/rcd/rpd/pickup(var/mob/living/L)
|
/obj/item/device/rcd/rpd/pickup(var/mob/living/L)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
hook_key = L.on_clickon.Add(src, "mob_onclickon")
|
hook_key = L.on_clickon.Add(src, "mob_onclickon")
|
||||||
|
|
||||||
/obj/item/device/rcd/rpd/dropped(var/mob/living/L)
|
/obj/item/device/rcd/rpd/dropped(var/mob/living/L)
|
||||||
@@ -89,7 +91,7 @@
|
|||||||
/obj/item/device/rcd/rpd/proc/mob_onclickon(var/list/event_args, var/mob/living/L)
|
/obj/item/device/rcd/rpd/proc/mob_onclickon(var/list/event_args, var/mob/living/L)
|
||||||
if (L.get_active_hand() != src)
|
if (L.get_active_hand() != src)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/list/modifiers = event_args["modifiers"]
|
var/list/modifiers = event_args["modifiers"]
|
||||||
modifiers -= list("alt", "shift", "ctrl")
|
modifiers -= list("alt", "shift", "ctrl")
|
||||||
|
|
||||||
|
|||||||
@@ -654,6 +654,20 @@ var/global/list/disposalpipeID2State = list(
|
|||||||
pipe_id = PIPE_HEAT_EXCHANGE
|
pipe_id = PIPE_HEAT_EXCHANGE
|
||||||
pipe_type = PIPE_UNARY
|
pipe_type = PIPE_UNARY
|
||||||
|
|
||||||
|
/datum/rcd_schematic/pipe/he_manifold
|
||||||
|
name = "Manifold"
|
||||||
|
category = "Heat Exchange"
|
||||||
|
|
||||||
|
pipe_id = PIPE_HE_MANIFOLD
|
||||||
|
pipe_type = PIPE_TRINARY
|
||||||
|
|
||||||
|
/datum/rcd_schematic/pipe/he_manifold4w
|
||||||
|
name = "4-Way Manifold"
|
||||||
|
category = "Heat Exchange"
|
||||||
|
|
||||||
|
pipe_id = PIPE_HE_MANIFOLD4W
|
||||||
|
pipe_type = PIPE_BINARY
|
||||||
|
|
||||||
//INSULATED PIPES.
|
//INSULATED PIPES.
|
||||||
|
|
||||||
/datum/rcd_schematic/pipe/insulated
|
/datum/rcd_schematic/pipe/insulated
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Reference in New Issue
Block a user