update auxmos

This commit is contained in:
Katherine Kiefer
2023-08-18 22:13:30 +10:00
parent a36c4fd163
commit 16a490ee5c
19 changed files with 63 additions and 238 deletions
@@ -56,53 +56,35 @@
/turf/open/assume_air_moles(datum/gas_mixture/giver, moles)
if(!giver)
return FALSE
if(SSair.thread_running())
SSair.deferred_airs += list(list(giver, air, moles / giver.total_moles()))
else
giver.transfer_to(air, moles)
update_visuals()
giver.transfer_to(air, moles)
return TRUE
/turf/open/assume_air_ratio(datum/gas_mixture/giver, ratio)
if(!giver)
return FALSE
if(SSair.thread_running())
SSair.deferred_airs += list(list(giver, air, ratio))
else
giver.transfer_ratio_to(air, ratio)
update_visuals()
giver.transfer_ratio_to(air, ratio)
return TRUE
/turf/open/transfer_air(datum/gas_mixture/taker, moles)
if(!taker || !return_air()) // shouldn't transfer from space
return FALSE
if(SSair.thread_running())
SSair.deferred_airs += list(list(air, taker, moles / air.total_moles()))
else
air.transfer_to(taker, moles)
update_visuals()
air.transfer_to(taker, moles)
return TRUE
/turf/open/transfer_air_ratio(datum/gas_mixture/taker, ratio)
if(!taker || !return_air())
return FALSE
if(SSair.thread_running())
SSair.deferred_airs += list(list(air, taker, ratio))
else
air.transfer_ratio_to(taker, ratio)
update_visuals()
air.transfer_ratio_to(taker, ratio)
return TRUE
/turf/open/remove_air(amount)
var/datum/gas_mixture/ours = return_air()
var/datum/gas_mixture/removed = ours.remove(amount)
update_visuals()
return removed
/turf/open/remove_air_ratio(ratio)
var/datum/gas_mixture/ours = return_air()
var/datum/gas_mixture/removed = ours.remove_ratio(ratio)
update_visuals()
return removed
/turf/open/proc/copy_air_with_tile(turf/open/T)
@@ -39,7 +39,6 @@
var/construction_type
var/pipe_state //icon_state as a pipe item
var/on = FALSE
var/interacts_with_air = FALSE
/obj/machinery/atmospherics/Initialize(mapload)
. = ..()
@@ -73,10 +72,7 @@
armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 100, BOMB = 0, BIO = 100, RAD = 100, FIRE = 100, ACID = 70)
..()
if(process)
if(interacts_with_air)
SSair.atmos_air_machinery += src
else
SSair.atmos_machinery += src
SSair.atmos_machinery += src
SetInitDirections()
/obj/machinery/atmospherics/Destroy()
@@ -84,7 +80,6 @@
nullifyNode(i)
SSair.atmos_machinery -= src
SSair.atmos_air_machinery -= src
SSair.pipenets_needing_rebuilt -= src
dropContents()
@@ -16,8 +16,6 @@
level = 1
interacts_with_air = TRUE
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
@@ -16,7 +16,6 @@
var/datum/radio_frequency/radio_connection
level = 1
interacts_with_air = TRUE
layer = GAS_SCRUBBER_LAYER
pipe_state = "injector"
@@ -6,7 +6,6 @@
can_unwrench = TRUE
level = 1
interacts_with_air = TRUE
layer = GAS_SCRUBBER_LAYER
pipe_state = "pvent"
@@ -5,7 +5,6 @@
icon_state = "relief_valve-e-map"
can_unwrench = TRUE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
interacts_with_air = TRUE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
@@ -15,8 +15,6 @@
level = 1
layer = GAS_SCRUBBER_LAYER
interacts_with_air = TRUE
var/id_tag = null
var/pump_direction = RELEASING
@@ -13,8 +13,6 @@
level = 1
layer = GAS_SCRUBBER_LAYER
interacts_with_air = TRUE
var/id_tag = null
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
@@ -12,7 +12,6 @@
icon_state = "miner"
density = FALSE
resistance_flags = INDESTRUCTIBLE|ACID_PROOF|FIRE_PROOF
interacts_with_air = TRUE
var/spawn_id = null
var/spawn_temp = T20C
var/spawn_mol = MOLES_CELLSTANDARD * 10
@@ -6,7 +6,6 @@
buckle_lying = 1
var/icon_temperature = T20C //stop small changes in temperature causing icon refresh
resistance_flags = LAVA_PROOF | FIRE_PROOF
interacts_with_air = TRUE
/obj/machinery/atmospherics/pipe/heat_exchanging/Initialize(mapload)
. = ..()
@@ -16,7 +16,7 @@
/obj/machinery/portable_atmospherics/New()
..()
SSair.atmos_air_machinery += src
SSair.atmos_machinery += src
air_contents = new(volume)
air_contents.set_temperature(T20C)
@@ -24,7 +24,7 @@
return 1
/obj/machinery/portable_atmospherics/Destroy()
SSair.atmos_air_machinery -= src
SSair.atmos_machinery -= src
disconnect()
qdel(air_contents)
@@ -195,7 +195,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/Initialize(mapload)
. = ..()
uid = gl_uid++
SSair.atmos_air_machinery += src
SSair.atmos_machinery += src
countdown = new(src)
countdown.start()
GLOB.poi_list |= src
@@ -214,7 +214,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/Destroy()
investigate_log("has been destroyed.", INVESTIGATE_SUPERMATTER)
SSair.atmos_air_machinery -= src
SSair.atmos_machinery -= src
QDEL_NULL(radio)
GLOB.poi_list -= src
QDEL_NULL(countdown)