mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Merge pull request #3771 from Cyantime/passivevents
Makes passive vents constructable
This commit is contained in:
@@ -116,15 +116,17 @@ datum/pipeline
|
||||
if(istype(target) && target.zone)
|
||||
//Have to consider preservation of group statuses
|
||||
var/datum/gas_mixture/turf_copy = new
|
||||
var/datum/gas_mixture/turf_original = new
|
||||
|
||||
turf_copy.copy_from(target.zone.air)
|
||||
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
|
||||
turf_original.copy_from(turf_copy)
|
||||
|
||||
equalize_gases(list(air_sample, turf_copy))
|
||||
air.merge(air_sample)
|
||||
|
||||
turf_copy.subtract(target.zone.air)
|
||||
|
||||
target.zone.air.remove(turf_original.total_moles)
|
||||
target.zone.air.merge(turf_copy)
|
||||
|
||||
else
|
||||
|
||||
@@ -72,8 +72,6 @@
|
||||
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
|
||||
return ..()
|
||||
if (istype(src, /obj/machinery/atmospherics/pipe/vent))
|
||||
return ..()
|
||||
|
||||
if(istype(W,/obj/item/device/pipe_painter))
|
||||
return 0
|
||||
|
||||
@@ -55,6 +55,7 @@ Buildable meters
|
||||
#define PIPE_DTVALVE 45
|
||||
#define PIPE_DTVALVEM 46
|
||||
|
||||
#define PIPE_PASSIVE_VENT 47
|
||||
|
||||
/obj/item/pipe
|
||||
name = "pipe"
|
||||
@@ -198,6 +199,8 @@ Buildable meters
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down))
|
||||
src.pipe_type = PIPE_DOWN
|
||||
///// Z-Level stuff
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/vent))
|
||||
src.pipe_type = PIPE_PASSIVE_VENT
|
||||
else
|
||||
src.pipe_type = pipe_type
|
||||
src.set_dir(dir)
|
||||
@@ -272,6 +275,7 @@ Buildable meters
|
||||
"dvalve", \
|
||||
"dt-valve", \
|
||||
"dt-valve m", \
|
||||
"passive vent", \
|
||||
)
|
||||
name = nlist[pipe_type+1] + " fitting"
|
||||
var/list/islist = list( \
|
||||
@@ -325,6 +329,7 @@ Buildable meters
|
||||
"dvalve", \
|
||||
"dtvalve", \
|
||||
"dtvalvem", \
|
||||
"passive vent", \
|
||||
)
|
||||
icon_state = islist[pipe_type + 1]
|
||||
|
||||
@@ -414,6 +419,8 @@ Buildable meters
|
||||
if(PIPE_UP,PIPE_DOWN,PIPE_SUPPLY_UP,PIPE_SUPPLY_DOWN,PIPE_SCRUBBERS_UP,PIPE_SCRUBBERS_DOWN)
|
||||
return dir
|
||||
///// Z-Level stuff
|
||||
if(PIPE_PASSIVE_VENT)
|
||||
return dir
|
||||
return 0
|
||||
|
||||
/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes
|
||||
@@ -1230,6 +1237,17 @@ Buildable meters
|
||||
P.level = !T.is_plating() ? 2 : 1
|
||||
P.initialize()
|
||||
P.build_network()
|
||||
if(PIPE_PASSIVE_VENT)
|
||||
var/obj/machinery/atmospherics/pipe/vent/P = new(loc)
|
||||
P.set_dir(dir)
|
||||
P.initialize_directions = pipe_dir
|
||||
var/turf/T = P.loc
|
||||
P.level = !T.is_plating() ? 2 : 1
|
||||
P.initialize()
|
||||
P.build_network()
|
||||
if (P.node1)
|
||||
P.node1.initialize()
|
||||
P.node1.build_network()
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<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=47;dir=1'>Passive Vent</A><BR>
|
||||
<A href='?src=\ref[src];make=9;dir=1'>Gas Pump</A><BR>
|
||||
<A href='?src=\ref[src];make=15;dir=1'>Pressure Regulator</A><BR>
|
||||
<A href='?src=\ref[src];make=16;dir=1'>High Power Gas Pump</A><BR>
|
||||
|
||||
Reference in New Issue
Block a user