diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index 7031a50605..7514715bc4 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -1,12 +1,3 @@
-//LISTMOS
-//indices of values in gas lists.
-#define META_GAS_SPECIFIC_HEAT 1
-#define META_GAS_NAME 2
-#define META_GAS_MOLES_VISIBLE 3
-#define META_GAS_OVERLAY 4
-#define META_GAS_DANGER 5
-#define META_GAS_ID 6
-#define META_GAS_FUSION_POWER 7
//ATMOS
//stuff you should probably leave well alone!
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index cf8fef386b..3026be9d46 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -343,3 +343,7 @@
///Define for spawning megafauna instead of a mob for cave gen
#define SPAWN_MEGAFAUNA "bluh bluh huge boss"
+
+// / Breathing types. Lungs can access either by these or by a string, which will be considered a gas ID.
+#define BREATH_OXY 0
+#define BREATH_PLASMA 1
diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm
index 6b4dc1e736..2439ef4d53 100644
--- a/code/datums/diseases/advance/symptoms/heal.dm
+++ b/code/datums/diseases/advance/symptoms/heal.dm
@@ -405,7 +405,7 @@
environment = M.loc.return_air()
if(environment)
plasmamount = environment.get_moles(GAS_PLASMA)
- if(plasmamount && plasmamount > GLOB.meta_gas_visibility[GAS_PLASMA]) //if there's enough plasma in the air to see
+ if(plasmamount && plasmamount > GLOB.gas_data.visibility[GAS_PLASMA]) //if there's enough plasma in the air to see
. += power * 0.5
if(M.reagents.has_reagent(/datum/reagent/toxin/plasma))
. += power * 0.75
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index f888f26331..fa552a4e66 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -60,7 +60,7 @@
var/total_moles = air_sample.total_moles()
if(total_moles)
for(var/gas_id in air_sample.get_gases())
- var/gas_name = GLOB.meta_gas_names[gas_id]
+ var/gas_name = GLOB.gas_data.names[gas_id]
signal.data["gases"][gas_name] = air_sample.get_moles(gas_id) / total_moles * 100
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index 875859e527..fb92e31f1e 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -1,6 +1,6 @@
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
-#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_specific_heats[GAS_PLASMA]) / (((PRESSURE_P) * GLOB.meta_gas_specific_heats[GAS_PLASMA] + (PRESSURE_O) * GLOB.meta_gas_specific_heats[GAS_O2]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_specific_heats[GAS_O2] / CELSIUS_TO_KELVIN(TEMP_O)))
+#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.gas_data.specific_heats[GAS_PLASMA]) / (((PRESSURE_P) * GLOB.gas_data.specific_heats[GAS_PLASMA] + (PRESSURE_O) * GLOB.gas_data.specific_heats[GAS_O2]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.gas_data.specific_heats[GAS_O2] / CELSIUS_TO_KELVIN(TEMP_O)))
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
/obj/effect/spawner/newbomb
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 2820b11312..2339e88a76 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -447,7 +447,7 @@ GLOBAL_LIST_EMPTY(PDAs)
for(var/id in environment.get_gases())
var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0)
- dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%
"
+ dat += "[GLOB.gas_data.names[id]]: [round(gas_level*100, 0.01)]%
"
dat += "Temperature: [round(environment.return_temperature()-T0C)]°C
"
dat += "
"
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index ebf6af6ea3..34fe90e797 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -708,7 +708,7 @@ GENETICS SCANNER
for(var/id in air_contents.get_gases())
if(air_contents.get_moles(id) >= 0.005)
var/gas_concentration = air_contents.get_moles(id)/total_moles
- to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)")
+ to_chat(user, "[GLOB.gas_data.names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)")
to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)")
else
@@ -768,7 +768,7 @@ GENETICS SCANNER
if(id in GLOB.hardcoded_gases)
continue
var/gas_concentration = environment.get_moles(id)/total_moles
- to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)")
+ to_chat(user, "[GLOB.gas_data.names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)")
to_chat(user, "Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)")
if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 358e7f1bec..8defd78a06 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -10,7 +10,7 @@
for(var/id in env.get_gases())
var/moles = env.get_moles(id)
if (moles >= 0.00001)
- lines += "[GLOB.meta_gas_names[id]]: [moles] mol"
+ lines += "[GLOB.gas_data.names[id]]: [moles] mol"
to_chat(usr, lines.Join("\n"))
/client/proc/air_status(turf/target)
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index 37f3da575f..3a3ba555de 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -146,8 +146,8 @@
for(var/id in air.get_gases())
if (nonoverlaying_gases[id])
continue
- var/gas_overlay = GLOB.meta_gas_overlays[id]
- if(gas_overlay && air.get_moles(id) > GLOB.meta_gas_visibility[id])
+ var/gas_overlay = GLOB.gas_data.overlays[id]
+ if(gas_overlay && air.get_moles(id) > GLOB.gas_data.visibility[id])
new_overlay_types += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(air.get_moles(id) / MOLES_GAS_VISIBLE_STEP, 1))]
if (atmos_overlay_types)
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index fed5e6ca31..016d17811f 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -6,15 +6,6 @@ What are the archived variables for?
#define MINIMUM_HEAT_CAPACITY 0.0003
#define MINIMUM_MOLE_COUNT 0.01
-//Unomos - global list inits for all of the meta gas lists.
-//This setup allows procs to only look at one list instead of trying to dig around in lists-within-lists
-GLOBAL_LIST_INIT(meta_gas_specific_heats, meta_gas_heat_list())
-GLOBAL_LIST_INIT(meta_gas_names, meta_gas_name_list())
-GLOBAL_LIST_INIT(meta_gas_visibility, meta_gas_visibility_list())
-GLOBAL_LIST_INIT(meta_gas_overlays, meta_gas_overlay_list())
-GLOBAL_LIST_INIT(meta_gas_flags, meta_gas_flags_list())
-GLOBAL_LIST_INIT(meta_gas_ids, meta_gas_id_list())
-GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture
/// Never ever set this variable, hooked into vv_get_var for view variables viewing.
var/gas_list_view_only
diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm
index 3d45b9ab78..d7f94b0236 100644
--- a/code/modules/atmospherics/gasmixtures/gas_types.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_types.dm
@@ -1,72 +1,65 @@
GLOBAL_LIST_INIT(hardcoded_gases, list(GAS_O2, GAS_N2, GAS_CO2, GAS_PLASMA)) //the main four gases, which were at one time hardcoded
GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(GAS_O2, GAS_N2, GAS_CO2, GAS_PLUOXIUM, GAS_STIMULUM, GAS_NITRYL))) //unable to react amongst themselves
-// Listmos 2.0
-// aka "auxgm", a send-up of XGM
-// it's basically the same architecture as XGM but
-// structured differently to make it more convenient for auxmos
+// Auxgm
+// It's a send-up of XGM, like what baystation got.
+// It's got the same architecture as XGM, but it's structured
+// differently to make it more convenient for auxmos.
-// most important compared to TG is that it does away with hardcoded typepaths,
-// which lead to problems on the auxmos end anyway.
+// Most important compared to TG is that it does away with hardcoded typepaths,
+// which lead to problems on the auxmos end anyway. We cache the string value
+// references on the Rust end, so no performance is lost here.
-// second most important is that i hate how breath is handled
-// and most basically every other thing in the codebase
-// when it comes to hardcoded gas typepaths, so, yeah, go away
+// Also allows you to add new gases at runtime
-GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
+/proc/_auxtools_register_gas(datum/gas/gas) // makes sure auxtools knows stuff about this gas
-/proc/meta_gas_info_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = new gas_path // !
- if(gas.id)
- .[gas.id] = gas
+/datum/auxgm
+ var/list/datums = list()
+ var/list/specific_heats = list()
+ var/list/names = list()
+ var/list/visibility = list()
+ var/list/overlays = list()
+ var/list/flags = list()
+ var/list/ids = list()
+ var/list/typepaths = list()
+ var/list/fusion_powers = list()
-/proc/meta_gas_heat_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = initial(gas.specific_heat)
-
-/proc/meta_gas_name_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = initial(gas.name)
-
-/proc/meta_gas_visibility_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = initial(gas.moles_visible)
-
-/proc/meta_gas_overlay_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = 0 //gotta make sure if(GLOB.meta_gas_overlays[gaspath]) doesn't break
- if(initial(gas.moles_visible) != null)
- .[initial(gas.id)] = new /list(FACTOR_GAS_VISIBLE_MAX)
+/datum/auxgm/add_gas(datum/gas/gas)
+ var/g = gas.id
+ if(g)
+ datums[g] = gas
+ specific_heats[g] = gas.specific_heat
+ names[g] = gas.name
+ if(gas.moles_visible)
+ visibility[g] = gas.moles_visible
+ overlays[g] = new /list(FACTOR_GAS_VISIBLE_MAX)
for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX)
- .[initial(gas.id)][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), i * 255 / FACTOR_GAS_VISIBLE_MAX)
+ overlays[g][i] = new /obj/effect/overlay/gas(gas.gas_overlay, i * 255 / FACTOR_GAS_VISIBLE_MAX)
+ else
+ visibility[g] = 0
+ overlays[g] = 0
+ flags[g] = gas.flags
+ ids[g] = g
+ typepaths[g] = gas_path
+ fusion_powers[g] = gas.fusion_power
+ _auxtools_register_gas(gas)
-/proc/meta_gas_flags_list()
- . = list()
+/datum/auxgm/New()
for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = initial(gas.flags)
+ var/datum/gas/gas = new gas_path
+ add_gas(gas)
-/proc/meta_gas_id_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = initial(gas.id)
+GLOBAL_DATUM_INIT(gas_data, /datum/auxgm, new)
-/proc/meta_gas_fusion_list()
- . = list()
- for(var/gas_path in subtypesof(/datum/gas))
- var/datum/gas/gas = gas_path
- .[initial(gas.id)] = initial(gas.fusion_power)
+/datum/breath_info
+ var/breathing_power = 1 // how much this gas counts for good-breath
+ var/breathing_class = null // what type of breath this is; lungs can also use gas IDs directly
+ var/breath_results = GAS_CO2 // what breathing a mole of this results in
+
+/datum/oxidation_info
+ var/oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST // temperature above which this gas is an oxidizer
+ var/list/oxidation_provides = list() // a list of elements this gas provides in combustion
/datum/gas
var/id = ""
@@ -75,27 +68,36 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
var/gas_overlay = "" //icon_state in icons/effects/atmospherics.dmi
var/moles_visible = null
var/flags = NONE //currently used by canisters
- var/fusion_power = 0 //How much the gas accelerates a fusion reaction
- var/rarity = 0 // relative rarity compared to other gases, used when setting up the reactions list.
+ var/fusion_power = 0 // How much the gas destabilizes a fusion reaction
+ var/breathing_power = 1 // how much this gas counts for good-breath
+ var/breathing_class = null // what type of breath this is; lungs can also use gas IDs directly
+ var/breath_results = GAS_CO2 // what breathing a mole of this results in
+ var/oxidation_temperature = null // temperature above which this gas is an oxidizer; null for none
+ var/oxidation_rate = 1 // how many moles of this can oxidize how many moles of material
+ var/oxidation_energy_released = 0 // how many moles are released per mole burned
+ var/list/oxidation_products = null // extra results from oxidizing this (per mole); null for none
+ var/fire_temperature = null // temperature above which gas may catch fire; null for none
+ var/list/fire_provides = null // what elements this gas provides as fuel for combustion; null for none
+ var/fire_energy_released = 0 // how much energy is released per mole of fuel burned
+ var/fire_burn_rate = 1 // how many moles are burned per product released
/datum/gas/oxygen
id = GAS_O2
specific_heat = 20
name = "Oxygen"
- rarity = 900
+ breathing_class = BREATH_OXY
+ oxidation_temperature = T0C - 100 // it checks max of this and fire temperature, so rarely will things spontaneously combust
/datum/gas/nitrogen
id = GAS_N2
specific_heat = 20
name = "Nitrogen"
- rarity = 1000
/datum/gas/carbon_dioxide //what the fuck is this?
id = GAS_CO2
specific_heat = 30
name = "Carbon Dioxide"
fusion_power = 3
- rarity = 700
/datum/gas/plasma
id = GAS_PLASMA
@@ -104,7 +106,8 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
gas_overlay = "plasma"
moles_visible = MOLES_GAS_VISIBLE
flags = GAS_FLAG_DANGEROUS
- rarity = 800
+ breathing_class = BREATH_PLASMA
+ // no fire info cause it has its own bespoke reaction for trit generation reasons
/datum/gas/water_vapor
id = GAS_H2O
@@ -113,7 +116,6 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
gas_overlay = "water_vapor"
moles_visible = MOLES_GAS_VISIBLE
fusion_power = 8
- rarity = 500
/datum/gas/hypernoblium
id = GAS_HYPERNOB
@@ -121,7 +123,6 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
name = "Hyper-noblium"
gas_overlay = "freon"
moles_visible = MOLES_GAS_VISIBLE
- rarity = 50
/datum/gas/nitrous_oxide
id = GAS_NITROUS
@@ -130,7 +131,9 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
gas_overlay = "nitrous_oxide"
moles_visible = MOLES_GAS_VISIBLE * 2
flags = GAS_FLAG_DANGEROUS
- rarity = 600
+ oxidation_products = list(GAS_N2 = 1)
+ oxidation_rate = 0.5
+ oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + 100
/datum/gas/nitryl
id = GAS_NITRYL
@@ -140,7 +143,8 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
moles_visible = MOLES_GAS_VISIBLE
flags = GAS_FLAG_DANGEROUS
fusion_power = 15
- rarity = 100
+ oxidation_products = list(GAS_N2 = 0.5)
+ oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
/datum/gas/tritium
id = GAS_TRITIUM
@@ -150,7 +154,13 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
moles_visible = MOLES_GAS_VISIBLE
flags = GAS_FLAG_DANGEROUS
fusion_power = 1
- rarity = 300
+ /*
+ these are for when we add hydrogen, trit gets to keep its hardcoded fire for legacy reasons
+ fire_provides = list(GAS_H2O = 2)
+ fire_burn_rate = 2
+ fire_energy_released = FIRE_HYDROGEN_ENERGY_RELEASED
+ fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
+ */
/datum/gas/bz
id = GAS_BZ
@@ -158,21 +168,22 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
name = "BZ"
flags = GAS_FLAG_DANGEROUS
fusion_power = 8
- rarity = 400
/datum/gas/stimulum
id = GAS_STIMULUM
specific_heat = 5
name = "Stimulum"
fusion_power = 7
- rarity = 1
/datum/gas/pluoxium
id = GAS_PLUOXIUM
specific_heat = 80
name = "Pluoxium"
fusion_power = 10
- rarity = 200
+ breathing_power = 8
+ breathing_class = CLASS_OXY
+ oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + 100
+ oxidation_rate = 8
/datum/gas/miasma
id = GAS_MIASMA
@@ -181,20 +192,25 @@ GLOBAL_LIST_INIT(gas_data, meta_gas_info_list())
name = "Miasma"
gas_overlay = "miasma"
moles_visible = MOLES_GAS_VISIBLE * 60
- rarity = 250
/datum/gas/methane
id = GAS_METHANE
specific_heat = 30
name = "Methane"
- rarity = 320
+ fire_provides = list(GAS_CO2 = 1, GAS_H2O = 2)
+ fire_burn_rate = 0.5
+ fire_energy_released = FIRE_CARBON_ENERGY_RELEASED
+ fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
/datum/gas/methyl_bromide
id = GAS_METHYL_BROMIDE
specific_heat = 42
name = "Methyl Bromide"
flags = GAS_FLAG_DANGEROUS
- rarity = 310
+ fire_provides = list(GAS_CO2 = 1, GAS_H2O = 1.5, GAS_BZ = 0.5)
+ fire_energy_released = FIRE_CARBON_ENERGY_RELEASED
+ fire_burn_rate = 0.5
+ fire_temperature = 808 // its autoignition, it apparently doesn't spark readily, so i don't put it lower
/obj/effect/overlay/gas
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index e1295d740e..d523b2afda 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -241,6 +241,22 @@
return list("success" = FALSE, "message" = "Plasma fires aren't making trit!")
return ..()
+/datum/gas_reaction/genericfire
+ priority = -3 // very last reaction
+ name = "Combustion"
+ id = "genericfire"
+
+// no requirements, always runs
+// bad idea? maybe
+// this is overridden by auxmos but, hey, good idea to have it readable
+
+/datum/gas_reaction/genericfire/react(datum/gas_mixture/air, datum/holder)
+ var/temperature = air.return_temperature()
+ var/list/oxidation_temps = GLOB.gas_data.oxidation_temps
+ for(var/datum/gas/G in air.get_gases())
+
+
+
//fusion: a terrible idea that was fun but broken. Now reworked to be less broken and more interesting. Again (and again, and again). Again!
//Fusion Rework Counter: Please increment this if you make a major overhaul to this system again.
//6 reworks
@@ -291,7 +307,7 @@
var/scale_factor = (air.return_volume())/(PI) //We scale it down by volume/Pi because for fusion conditions, moles roughly = 2*volume, but we want it to be based off something constant between reactions.
var/toroidal_size = (2*PI)+TORADIANS(arctan((air.return_volume()-TOROID_VOLUME_BREAKEVEN)/TOROID_VOLUME_BREAKEVEN)) //The size of the phase space hypertorus
var/gas_power = 0
- var/list/gas_fusion_powers = GLOB.meta_gas_fusions
+ var/list/gas_fusion_powers = GLOB.gas_data.fusion_powers
for (var/gas_id in air.get_gases())
gas_power += (gas_fusion_powers[gas_id]*air.get_moles(gas_id))
var/instability = MODULUS((gas_power*INSTABILITY_GAS_POWER_FACTOR)**2,toroidal_size) //Instability effects how chaotic the behavior of the reaction is
diff --git a/code/modules/atmospherics/gasmixtures/zextools_broke.dm b/code/modules/atmospherics/gasmixtures/zextools_broke.dm
index 723336f2a2..fe7b1c462b 100644
--- a/code/modules/atmospherics/gasmixtures/zextools_broke.dm
+++ b/code/modules/atmospherics/gasmixtures/zextools_broke.dm
@@ -9,14 +9,14 @@
/datum/gas_mixture/heat_capacity() //joules per kelvin
var/list/cached_gases = gases
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ var/list/cached_gasheats = GLOB.gas_data.specific_heats
. = 0
for(var/id in cached_gases)
. += cached_gases[id] * cached_gasheats[id]
/datum/gas_mixture/turf/heat_capacity() // Same as above except vacuums return HEAT_CAPACITY_VACUUM
var/list/cached_gases = gases
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ var/list/cached_gasheats = GLOB.gas_data.specific_heats
for(var/id in cached_gases)
. += cached_gases[id] * cached_gasheats[id]
if(!.)
@@ -208,7 +208,7 @@
var/delta
var/gas_heat_capacity
//and also cache this shit rq because that results in sanic speed for reasons byond explanation
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ var/list/cached_gasheats = GLOB.gas_data.specific_heats
//GAS TRANSFER
for(var/id in cached_gases | sharer_gases) // transfer gases
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index b10ddbc701..73111fb431 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -298,7 +298,7 @@
continue
cur_tlv = TLV[gas_id]
data["environment_data"] += list(list(
- "name" = GLOB.meta_gas_names[gas_id],
+ "name" = GLOB.gas_data.names[gas_id],
"value" = environment.get_moles(gas_id) / total_moles * 100,
"unit" = "%",
"danger_level" = cur_tlv.get_danger_level(environment.get_moles(gas_id) * partial_pressure)
@@ -368,11 +368,11 @@
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1))
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2))
- for(var/gas_id in GLOB.meta_gas_names)
+ for(var/gas_id in GLOB.gas_data.names)
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
continue
selected = TLV[gas_id]
- thresholds += list(list("name" = GLOB.meta_gas_names[gas_id], "settings" = list()))
+ thresholds += list(list("name" = GLOB.gas_data.names[gas_id], "settings" = list()))
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min2", "selected" = selected.min2))
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "min1", "selected" = selected.min1))
thresholds[thresholds.len]["settings"] += list(list("env" = gas_id, "val" = "max1", "selected" = selected.max1))
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index 0a3125e116..7de9cd5745 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -125,7 +125,7 @@
data["filter_types"] = list()
data["filter_types"] += list(list("name" = "Nothing", "id" = "", "selected" = !filter_type))
for(var/id in GLOB.gas_data)
- data["filter_types"] += list(list("name" = GLOB.meta_gas_names[id], "id" = id, "selected" = (id == filter_type)))
+ data["filter_types"] += list(list("name" = GLOB.gas_data.names[id], "id" = id, "selected" = (id == filter_type)))
return data
@@ -156,9 +156,9 @@
filter_type = null
var/filter_name = "nothing"
var/gas = params["mode"]
- if(gas in GLOB.meta_gas_names)
+ if(gas in GLOB.gas_data.names)
filter_type = gas
- filter_name = GLOB.meta_gas_names[gas]
+ filter_name = GLOB.gas_data.names[gas]
investigate_log("was set to filter [filter_name] by [key_name(usr)]", INVESTIGATE_ATMOS)
. = TRUE
update_icon()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
index 2b0d4e4c96..8838631ab5 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
@@ -22,7 +22,7 @@
air_contents.set_temperature(T20C)
if(gas_type)
air_contents.set_moles(gas_type,AIR_CONTENTS)
- name = "[name] ([GLOB.meta_gas_names[gas_type]])"
+ name = "[name] ([GLOB.gas_data.names[gas_type]])"
setPipingLayer(piping_layer)
/obj/machinery/atmospherics/components/unary/tank/air
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
index f15b7243c7..90d5f077a5 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
@@ -94,8 +94,8 @@
return FALSE
var/list/f_types = list()
- for(var/path in GLOB.meta_gas_ids)
- f_types += list(list("gas_id" = GLOB.meta_gas_ids[path], "gas_name" = GLOB.meta_gas_names[path], "enabled" = (path in filter_types)))
+ for(var/id in GLOB.gas_data.ids)
+ f_types += list(list("gas_id" = id, "gas_name" = GLOB.gas_data.names[id], "enabled" = (id in filter_types)))
var/datum/signal/signal = new(list(
"tag" = id_tag,
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index e56258dd52..cf4456789a 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -433,10 +433,10 @@
var/list/danger = list()
for(var/id in air_contents.get_gases())
var/gas = air_contents.get_moles(id)
- if(!GLOB.meta_gas_flags[id] & GAS_FLAG_DANGEROUS)
+ if(!GLOB.gas_data.flags[id] & GAS_FLAG_DANGEROUS)
continue
- if(gas > (GLOB.meta_gas_visibility[id] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
- danger[GLOB.meta_gas_names[id]] = gas //ex. "plasma" = 20
+ if(gas > (GLOB.gas_data.visibility[id] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
+ danger[GLOB.gas_data.names[id]] = gas //ex. "plasma" = 20
if(danger.len)
message_admins("[ADMIN_LOOKUPFLW(usr)] opened a canister that contains the following at [ADMIN_VERBOSEJMP(src)]:")
diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm
index 672381280b..dc793cc3d5 100644
--- a/code/modules/atmospherics/machinery/portable/scrubber.dm
+++ b/code/modules/atmospherics/machinery/portable/scrubber.dm
@@ -70,7 +70,7 @@
data["id_tag"] = -1 //must be defined in order to reuse code between portable and vent scrubbers
data["filter_types"] = list()
for(var/id in GLOB.gas_data)
- data["filter_types"] += list(list("gas_id" = id, "gas_name" = GLOB.meta_gas_names[id], "enabled" = (id in scrubbing)))
+ data["filter_types"] += list(list("gas_id" = id, "gas_name" = GLOB.gas_data.names[id], "enabled" = (id in scrubbing)))
if(holding)
data["holding"] = list()
diff --git a/code/modules/integrated_electronics/subtypes/atmospherics.dm b/code/modules/integrated_electronics/subtypes/atmospherics.dm
index e7b0f27b27..600f5113e1 100644
--- a/code/modules/integrated_electronics/subtypes/atmospherics.dm
+++ b/code/modules/integrated_electronics/subtypes/atmospherics.dm
@@ -373,7 +373,7 @@
for(var/filtered_gas in removed.get_gases())
//Get the name of the gas and see if it is in the list
- if(GLOB.meta_gas_names[filtered_gas] in wanted)
+ if(GLOB.gas_data.names[filtered_gas] in wanted)
//The gas that is put in all the filtered out gases
filtered_out.set_temperature(removed.return_temperature())
filtered_out.set_moles(filtered_gas, removed.get_moles(filtered_gas))
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index 9abf5d86a0..f66931e253 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -1163,7 +1163,7 @@
var/list/gas_names = list()
var/list/gas_amounts = list()
for(var/id in air_contents.get_gases())
- var/name = GLOB.meta_gas_names[id]
+ var/name = GLOB.gas_data.names[id]
var/amt = round(air_contents.get_moles(id), 0.001)
gas_names.Add(name)
gas_amounts.Add(amt)
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 92f46e24bc..04665401c5 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -575,7 +575,7 @@
for(var/id in environment.get_gases())
var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0.01)
- dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100)]%
"
+ dat += "[GLOB.gas_data.names[id]]: [round(gas_level*100)]%
"
dat += "Temperature: [round(environment.return_temperature()-T0C)]°C
"
dat += "Refresh Reading
"
dat += "
"
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 824e262ae1..9070c1e8fb 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -70,7 +70,7 @@
t += "Temperature: [environment.return_temperature()] \n"
for(var/id in environment.get_gases())
if(environment.get_moles(id))
- t+="[GLOB.meta_gas_names[id]]: [environment.get_moles(id)] \n"
+ t+="[GLOB.gas_data.names[id]]: [environment.get_moles(id)] \n"
to_chat(usr, t)
diff --git a/code/modules/modular_computers/file_system/programs/atmosscan.dm b/code/modules/modular_computers/file_system/programs/atmosscan.dm
index 7c491712fe..1576a5b4b7 100644
--- a/code/modules/modular_computers/file_system/programs/atmosscan.dm
+++ b/code/modules/modular_computers/file_system/programs/atmosscan.dm
@@ -31,7 +31,7 @@
for(var/id in env_gases)
var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0)
- airlist += list(list("name" = "[GLOB.meta_gas_names[id]]", "percentage" = round(gas_level*100, 0.01)))
+ airlist += list(list("name" = "[GLOB.gas_data.names[id]]", "percentage" = round(gas_level*100, 0.01)))
data["AirData"] = airlist
else
data["AirPressure"] = 0
diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
index 7ef2f7416a..6c9ce59c72 100644
--- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm
+++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
@@ -139,13 +139,13 @@
var/amount = air.get_moles(gasid)
if(amount)
gasdata.Add(list(list(
- "name"= GLOB.meta_gas_names[gasid],
+ "name"= GLOB.gas_data.names[gasid],
"amount" = round(100*amount/air.total_moles(),0.01))))
else
for(var/gasid in air.get_gases())
gasdata.Add(list(list(
- "name"= GLOB.meta_gas_names[gasid],
+ "name"= GLOB.gas_data.names[gasid],
"amount" = 0)))
data["gases"] = gasdata