relief valve tweaks

This commit is contained in:
Putnam
2020-01-25 17:10:40 -08:00
parent 45ad9bc77d
commit aba40056b3
2 changed files with 5 additions and 2 deletions
@@ -5,6 +5,7 @@
icon_state = "relief_valve-t-map"
can_unwrench = TRUE
construction_type = /obj/item/pipe/binary
interaction_flags_machine = INTERACT_MACHINE_OFFLINE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
@@ -50,8 +51,9 @@
if(!is_operational())
return
var/datum/gas_mixture/air_contents = airs[1]
var/our_pressure = air_contents.return_pressure()
var/datum/gas_mixture/air_one = airs[1]
var/datum/gas_mixture/air_two = airs[2]
var/our_pressure = abs(air_one.return_pressure() - air_two.return_pressure())
if(opened && our_pressure < close_pressure)
close()
else if(!opened && our_pressure >= open_pressure)
@@ -4,6 +4,7 @@
icon = 'icons/obj/atmospherics/components/relief_valve.dmi'
icon_state = "relief_valve-e-map"
can_unwrench = TRUE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE