diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index b5ba44d956..e593cfef82 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -243,8 +243,7 @@
//HELPERS
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
-#define ADD_GAS(gas_id, out_list)\
- var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id]; out_list[gas_id] = tmp_gaslist.Copy();
+#define ADD_GAS(gas_id, out_list) out_list[gas_id] = 0;
#define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) };
@@ -253,9 +252,10 @@
#define TOTAL_MOLES(cached_gases, out_var)\
out_var = 0;\
for(var/total_moles_id in cached_gases){\
- out_var += cached_gases[total_moles_id][MOLES];\
+ out_var += cached_gases[total_moles_id];\
}
+#define ARCHIVE_TEMPERATURE(gas) gas.temperature_archived = gas.temperature
GLOBAL_LIST_INIT(pipe_paint_colors, list(
"amethyst" = rgb(130,43,255), //supplymain
diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm
index 0ace2ca8fd..9f3049dddd 100644
--- a/code/datums/diseases/advance/symptoms/heal.dm
+++ b/code/datums/diseases/advance/symptoms/heal.dm
@@ -364,15 +364,15 @@
/datum/symptom/heal/plasma/CanHeal(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
var/datum/gas_mixture/environment
- var/list/gases
+ var/plasmamount
. = 0
if(M.loc)
environment = M.loc.return_air()
if(environment)
- gases = environment.gases
- if(gases["plasma"] && gases["plasma"][MOLES] > gases["plasma"][GAS_META][META_GAS_MOLES_VISIBLE]) //if there's enough plasma in the air to see
+ plasmamount = environment.gases["plasma"]
+ if(plasmamount && plasmamount > GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_MOLES_VISIBLE]) //if there's enough plasma in the air to see
. += power * 0.5
if(M.reagents.has_reagent("plasma"))
. += power * 0.75
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index d673cdb16d..0623e2f5f9 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -103,11 +103,11 @@
// Can most things breathe?
if(trace_gases)
continue
- if(!(A_gases[/datum/gas/oxygen] && A_gases[/datum/gas/oxygen][MOLES] >= 16))
+ if(A_gases[/datum/gas/oxygen] >= 16)
continue
if(A_gases[/datum/gas/plasma])
continue
- if(A_gases[/datum/gas/carbon_dioxide] && A_gases[/datum/gas/carbon_dioxide][MOLES] >= 10)
+ if(A_gases[/datum/gas/carbon_dioxide] >= 10)
continue
// Aim for goldilocks temperatures and pressure
diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm
index 6603bb3604..e56495d808 100644
--- a/code/game/gamemodes/objective_items.dm
+++ b/code/game/gamemodes/objective_items.dm
@@ -124,7 +124,7 @@
/datum/objective_item/steal/plasma/check_special_completion(obj/item/tank/T)
var/target_amount = text2num(name)
var/found_amount = 0
- found_amount += T.air_contents.gases[/datum/gas/plasma] ? T.air_contents.gases[/datum/gas/plasma][MOLES] : 0
+ found_amount += T.air_contents.gases[/datum/gas/plasma]
return found_amount>=target_amount
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index baa6fa577e..191498e4e9 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -59,8 +59,8 @@
var/total_moles = air_sample.total_moles()
if(total_moles)
for(var/gas_id in air_sample.gases)
- var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME]
- signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100
+ var/gas_name = GLOB.meta_gas_info[gas_id][META_GAS_NAME]
+ signal.data["gases"][gas_name] = air_sample.gases[gas_id] / total_moles * 100
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm
index 1a3886c3df..e118ca81fd 100644
--- a/code/game/mecha/equipment/tools/other_tools.dm
+++ b/code/game/mecha/equipment/tools/other_tools.dm
@@ -423,12 +423,12 @@
var/datum/gas_mixture/GM = new
GM.add_gas(/datum/gas/plasma)
if(prob(10))
- GM.gases[/datum/gas/plasma][MOLES] += 100
+ GM.gases[/datum/gas/plasma] += 100
GM.temperature = 1500+T0C //should be enough to start a fire
T.visible_message("[src] suddenly disgorges a cloud of heated plasma.")
qdel(src)
else
- GM.gases[/datum/gas/plasma][MOLES] += 5
+ GM.gases[/datum/gas/plasma] += 5
GM.temperature = istype(T) ? T.air.return_temperature() : T20C
T.visible_message("[src] suddenly disgorges a cloud of plasma.")
T.assume_air(GM)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index d5de4a4898..ecd0cbe922 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -238,8 +238,8 @@
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
- cabin_air.gases[/datum/gas/oxygen][MOLES] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
- cabin_air.gases[/datum/gas/nitrogen][MOLES] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
+ cabin_air.gases[/datum/gas/oxygen] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
+ cabin_air.gases[/datum/gas/nitrogen] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
return cabin_air
/obj/mecha/proc/add_radio()
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 264715e2ac..1118ff3609 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -40,8 +40,8 @@
if(hotspot && istype(T) && T.air)
qdel(hotspot)
var/datum/gas_mixture/G = T.air
- var/plas_amt = min(30,G.gases[/datum/gas/plasma][MOLES]) //Absorb some plasma
- G.gases[/datum/gas/plasma][MOLES] -= plas_amt
+ var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma
+ G.gases[/datum/gas/plasma] -= plas_amt
absorbed_plasma += plas_amt
if(G.temperature > T20C)
G.temperature = max(G.temperature/2,T20C)
@@ -324,7 +324,7 @@
for(var/I in G_gases)
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
continue
- G_gases[I][MOLES] = 0
+ G_gases[I] = 0
G.garbage_collect()
O.air_update_turf()
for(var/obj/machinery/atmospherics/components/unary/U in O)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index e8e833890b..9933d49e0d 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -173,8 +173,8 @@
var/list/G_gases = G.gases
if(G_gases[/datum/gas/plasma])
G.assert_gas(/datum/gas/nitrogen)
- G_gases[/datum/gas/nitrogen][MOLES] += (G_gases[/datum/gas/plasma][MOLES])
- G_gases[/datum/gas/plasma][MOLES] = 0
+ G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma])
+ G_gases[/datum/gas/plasma] = 0
G.garbage_collect()
if (weldvents)
for(var/obj/machinery/atmospherics/components/unary/U in T)
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index b1bb3e6b4d..0d3818ff5f 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -20,11 +20,11 @@
var/obj/item/tank/internals/oxygen/OT = new(V)
PT.air_contents.assert_gas(/datum/gas/plasma)
- PT.air_contents.gases[/datum/gas/plasma][MOLES] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
+ PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
OT.air_contents.assert_gas(/datum/gas/oxygen)
- OT.air_contents.gases[/datum/gas/oxygen][MOLES] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
+ OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
V.tank_one = PT
diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm
index f7c37715aa..57d30fede6 100644
--- a/code/game/objects/items/chrono_eraser.dm
+++ b/code/game/objects/items/chrono_eraser.dm
@@ -249,8 +249,8 @@
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
var/datum/gas_mixture/GM = new
GM.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
- GM.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD
- GM.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD
+ GM.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
+ GM.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
GM.temperature = T20C
return GM
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 9ff717816c..29cd150fd3 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -358,9 +358,9 @@ GLOBAL_LIST_EMPTY(PDAs)
if (total_moles)
for(var/id in env_gases)
- var/gas_level = env_gases[id][MOLES]/total_moles
+ var/gas_level = env_gases[id]/total_moles
if(gas_level > 0)
- dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100, 0.01)]%
"
+ dat += "[GLOB.meta_gas_info[id][META_GAS_NAME]]: [round(gas_level*100, 0.01)]%
"
dat += "Temperature: [round(environment.temperature-T0C)]°C
"
dat += "
"
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 5a68a8423a..3cbb9dfe93 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -420,38 +420,38 @@ SLIME SCANNER
var/list/env_gases = environment.gases
environment.assert_gases(arglist(GLOB.hardcoded_gases))
- var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles
- var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles
- var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles
- var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles
+ var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
+ var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
+ var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
+ var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
if(abs(n2_concentration - N2STANDARD) < 20)
- to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)")
+ to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)")
else
- to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)")
+ to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)")
if(abs(o2_concentration - O2STANDARD) < 2)
- to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)")
+ to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)")
else
- to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)")
+ to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)")
if(co2_concentration > 0.01)
- to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)")
+ to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)")
else
- to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)")
+ to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)")
if(plasma_concentration > 0.005)
- to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)")
+ to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)")
else
- to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)")
+ to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)")
environment.garbage_collect()
for(var/id in env_gases)
if(id in GLOB.hardcoded_gases)
continue
- var/gas_concentration = env_gases[id][MOLES]/total_moles
- to_chat(user, "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id][MOLES], 0.01)] mol)")
+ var/gas_concentration = env_gases[id]/total_moles
+ to_chat(user, "[GLOB.meta_gas_info[id][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)")
to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)")
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
@@ -541,8 +541,8 @@ SLIME SCANNER
var/list/cached_gases = air_contents.gases
for(var/id in cached_gases)
- var/gas_concentration = cached_gases[id][MOLES]/total_moles
- to_chat(user, "[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id][MOLES], 0.01)] mol)")
+ var/gas_concentration = cached_gases[id]/total_moles
+ to_chat(user, "[GLOB.meta_gas_info[id][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)")
to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)")
else
diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm
index 2635955a15..fd51ecf26b 100644
--- a/code/game/objects/items/flamethrower.dm
+++ b/code/game/objects/items/flamethrower.dm
@@ -205,7 +205,7 @@
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
if(air_transfer.gases[/datum/gas/plasma])
- air_transfer.gases[/datum/gas/plasma][MOLES] *= 5
+ air_transfer.gases[/datum/gas/plasma] *= 5
target.assume_air(air_transfer)
//Burn it based on transfered gas
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm
index b3ee748d13..0707913bd5 100644
--- a/code/game/objects/items/tanks/jetpack.dm
+++ b/code/game/objects/items/tanks/jetpack.dm
@@ -18,7 +18,7 @@
..()
if(gas_type)
air_contents.assert_gas(gas_type)
- air_contents.gases[gas_type][MOLES] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
+ air_contents.gases[gas_type] = (6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)
ion_trail = new
ion_trail.set_up(src)
diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm
index f4eb763847..3fcd8a7656 100644
--- a/code/game/objects/items/tanks/tank_types.dm
+++ b/code/game/objects/items/tanks/tank_types.dm
@@ -22,7 +22,7 @@
/obj/item/tank/internals/oxygen/New()
..()
air_contents.assert_gas(/datum/gas/oxygen)
- air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -50,8 +50,8 @@
/obj/item/tank/internals/anesthetic/New()
..()
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrous_oxide)
- air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
- air_contents.gases[/datum/gas/nitrous_oxide][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
+ air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
+ air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
@@ -68,8 +68,8 @@
/obj/item/tank/internals/air/New()
..()
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
- air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
- air_contents.gases[/datum/gas/nitrogen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
+ air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
+ air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
@@ -88,7 +88,7 @@
/obj/item/tank/internals/plasma/New()
..()
air_contents.assert_gas(/datum/gas/plasma)
- air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
@@ -106,7 +106,7 @@
/obj/item/tank/internals/plasma/full/New()
..() // Plasma asserted in parent
- air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -125,12 +125,12 @@
/obj/item/tank/internals/plasmaman/New()
..()
air_contents.assert_gas(/datum/gas/plasma)
- air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..() // Plasma asserted in parent
- air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -144,7 +144,7 @@
/obj/item/tank/internals/plasmaman/belt/full/New()
..() // Plasma asserted in parent
- air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -167,7 +167,7 @@
/obj/item/tank/internals/emergency_oxygen/New()
..()
air_contents.assert_gas(/datum/gas/oxygen)
- air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/emergency_oxygen/engi
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index 6015cf9f4a..c386726f34 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -152,8 +152,8 @@
pod_moving = 0
if(!QDELETED(pod))
var/datum/gas_mixture/floor_mixture = loc.return_air()
- floor_mixture.archive()
- pod.air_contents.archive()
+ ARCHIVE_TEMPERATURE(floor_mixture)
+ ARCHIVE_TEMPERATURE(pod.air_contents)
pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on
air_update_turf()
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
index 03082cd4ba..30d6edbd12 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -12,8 +12,8 @@
/obj/structure/transit_tube_pod/Initialize()
. = ..()
air_contents.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
- air_contents.gases[/datum/gas/oxygen][MOLES] = MOLES_O2STANDARD
- air_contents.gases[/datum/gas/nitrogen][MOLES] = MOLES_N2STANDARD
+ air_contents.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
+ air_contents.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
air_contents.temperature = T20C
diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm
index f108a536d2..3834612466 100644
--- a/code/game/turfs/change_turf.dm
+++ b/code/game/turfs/change_turf.dm
@@ -298,14 +298,14 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
var/list/S_gases = S.air.gases
for(var/id in S_gases)
ASSERT_GAS(id, total)
- total_gases[id][MOLES] += S_gases[id][MOLES]
+ total_gases[id] += S_gases[id]
total.temperature += S.air.temperature
air.copy_from(total)
var/list/air_gases = air.gases
for(var/id in air_gases)
- air_gases[id][MOLES] /= turf_count //Averages contents of the turfs, ignoring walls and the like
+ air_gases[id] /= turf_count //Averages contents of the turfs, ignoring walls and the like
air.temperature /= turf_count
SSair.add_to_active(src)
diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm
index 63b5f4b160..2873ab8bf5 100644
--- a/code/game/turfs/open.dm
+++ b/code/game/turfs/open.dm
@@ -289,9 +289,9 @@
/turf/open/rad_act(pulse_strength)
. = ..()
if (air.gases[/datum/gas/carbon_dioxide] && air.gases[/datum/gas/oxygen])
- pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide][MOLES]*1000,air.gases[/datum/gas/oxygen][MOLES]*2000) //Ensures matter is conserved properly
- air.gases[/datum/gas/carbon_dioxide][MOLES]=max(air.gases[/datum/gas/carbon_dioxide][MOLES]-(pulse_strength/1000),0)
- air.gases[/datum/gas/oxygen][MOLES]=max(air.gases[/datum/gas/oxygen][MOLES]-(pulse_strength/2000),0)
+ pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide]*1000,air.gases[/datum/gas/oxygen]*2000) //Ensures matter is conserved properly
+ air.gases[/datum/gas/carbon_dioxide]=max(air.gases[/datum/gas/carbon_dioxide]-(pulse_strength/1000),0)
+ air.gases[/datum/gas/oxygen]=max(air.gases[/datum/gas/oxygen]-(pulse_strength/2000),0)
air.assert_gas(/datum/gas/pluoxium)
- air.gases[/datum/gas/pluoxium][MOLES]+=(pulse_strength/4000)
+ air.gases[/datum/gas/pluoxium]+=(pulse_strength/4000)
air.garbage_collect()
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 67b33afcc6..6052bc1d79 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -842,7 +842,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!Rad.loaded_tank)
var/obj/item/tank/internals/plasma/Plasma = new/obj/item/tank/internals/plasma(Rad)
Plasma.air_contents.assert_gas(/datum/gas/plasma)
- Plasma.air_contents.gases[/datum/gas/plasma][MOLES] = 70
+ Plasma.air_contents.gases[/datum/gas/plasma] = 70
Rad.drainratio = 0
Rad.loaded_tank = Plasma
Plasma.forceMove(Rad)
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 39aff33953..83651f81a7 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -9,10 +9,9 @@
var/list/lines = list("[AREACOORD(target)]: [env.temperature] K ([env.temperature - T0C] C), [env.return_pressure()] kPa[(burning)?(", burning"):(null)]")
for(var/id in env_gases)
- var/gas = env_gases[id]
- var/moles = gas[MOLES]
+ var/moles = env_gases[id]
if (moles >= 0.00001)
- lines += "[gas[GAS_META][META_GAS_NAME]]: [moles] mol"
+ lines += "[GLOB.meta_gas_info[id][META_GAS_NAME]]: [moles] mol"
to_chat(usr, lines.Join("\n"))
/client/proc/air_status(turf/target)
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index d40666babb..24ad850c74 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -144,7 +144,7 @@
/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode
air_contents.assert_gases(/datum/gas/plasma, /datum/gas/oxygen)
- var/fuel_moles = air_contents.gases[/datum/gas/plasma][MOLES] + air_contents.gases[/datum/gas/oxygen][MOLES]/6
+ var/fuel_moles = air_contents.gases[/datum/gas/plasma] + air_contents.gases[/datum/gas/oxygen]/6
air_contents.garbage_collect()
var/datum/gas_mixture/bomb_mixture = air_contents.copy()
var/strength = 1
diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm
index bf5d8efb13..d1da05e42d 100644
--- a/code/modules/atmospherics/environmental/LINDA_fire.dm
+++ b/code/modules/atmospherics/environmental/LINDA_fire.dm
@@ -14,9 +14,9 @@
if(!air_contents)
return 0
- var/oxy = air_contents.gases[/datum/gas/oxygen] ? air_contents.gases[/datum/gas/oxygen][MOLES] : 0
- var/tox = air_contents.gases[/datum/gas/plasma] ? air_contents.gases[/datum/gas/plasma][MOLES] : 0
- var/trit = air_contents.gases[/datum/gas/tritium] ? air_contents.gases[/datum/gas/tritium][MOLES] : 0
+ var/oxy = air_contents.gases[/datum/gas/oxygen]
+ var/tox = air_contents.gases[/datum/gas/plasma]
+ var/trit = air_contents.gases[/datum/gas/tritium]
if(active_hotspot)
if(soh)
if((tox > 0.5 || trit > 0.5) && oxy > 0.5)
@@ -162,7 +162,7 @@
color = list(LERP(0.3, 1, 1-greyscale_fire) * heat_r,0.3 * heat_g * greyscale_fire,0.3 * heat_b * greyscale_fire, 0.59 * heat_r * greyscale_fire,LERP(0.59, 1, 1-greyscale_fire) * heat_g,0.59 * heat_b * greyscale_fire, 0.11 * heat_r * greyscale_fire,0.11 * heat_g * greyscale_fire,LERP(0.11, 1, 1-greyscale_fire) * heat_b, 0,0,0)
alpha = heat_a
-#define INSUFFICIENT(path) (!location.air.gases[path] || location.air.gases[path][MOLES] < 0.5)
+#define INSUFFICIENT(path) (location.air.gases[path] < 0.5)
/obj/effect/hotspot/process()
if(just_spawned)
just_spawned = FALSE
@@ -184,7 +184,7 @@
return
//Not enough to burn
- if(((!location.air.gases[/datum/gas/plasma] || location.air.gases[/datum/gas/plasma][MOLES] < 0.5) && (!location.air.gases[/datum/gas/tritium] || location.air.gases[/datum/gas/tritium][MOLES] < 0.5)) || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5)
+ if((location.air.gases[/datum/gas/plasma] < 0.5 && location.air.gases[/datum/gas/tritium] < 0.5) || location.air.gases[/datum/gas/oxygen] < 0.5)
qdel(src)
return
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index 45bb47ab58..0fa81970d3 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -88,7 +88,7 @@
temperature_archived = temperature
/turf/open/archive()
- air.archive()
+ ARCHIVE_TEMPERATURE(air)
archived_cycle = SSair.times_fired
temperature_archived = temperature
@@ -121,10 +121,10 @@
if (nonoverlaying_gases[id])
continue
var/gas = gases[id]
- var/gas_meta = gas[GAS_META]
+ var/gas_meta = GLOB.meta_gas_info[id]
var/gas_overlay = gas_meta[META_GAS_OVERLAY]
- if(gas_overlay && gas[MOLES] > gas_meta[META_GAS_MOLES_VISIBLE])
- . += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas[MOLES] / MOLES_GAS_VISIBLE_STEP, 1))]
+ if(gas_overlay && gas > gas_meta[META_GAS_MOLES_VISIBLE])
+ . += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas / MOLES_GAS_VISIBLE_STEP, 1))]
/proc/typecache_of_gases_with_no_overlays()
. = list()
@@ -215,7 +215,7 @@
if (planet_atmos) //share our air with the "atmosphere" "above" the turf
var/datum/gas_mixture/G = new
G.copy_from_turf(src)
- G.archive()
+ ARCHIVE_TEMPERATURE(G)
if(our_air.compare(G))
if(!our_excited_group)
var/datum/excited_group/EG = new
@@ -327,7 +327,7 @@
A.merge(T.air)
for(var/id in A_gases)
- A_gases[id][MOLES] /= turflen
+ A_gases[id] /= turflen
for(var/t in turf_list)
var/turf/open/T = t
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index 0304946111..156798bb0d 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -8,19 +8,6 @@ What are the archived variables for?
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm
-GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
-
-/proc/init_gaslist_cache()
- . = list()
- for(var/id in GLOB.meta_gas_info)
- var/list/cached_gas = new(3)
-
- .[id] = cached_gas
-
- cached_gas[MOLES] = 0
- cached_gas[ARCHIVE] = 0
- cached_gas[GAS_META] = GLOB.meta_gas_info[id]
-
/datum/gas_mixture
var/list/gases
var/temperature = 0 //kelvins
@@ -70,7 +57,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
/datum/gas_mixture/proc/garbage_collect(list/tocheck)
var/list/cached_gases = gases
for(var/id in (tocheck || cached_gases))
- if(QUANTIZE(cached_gases[id][MOLES]) <= 0 && QUANTIZE(cached_gases[id][ARCHIVE]) <= 0)
+ if(QUANTIZE(cached_gases[id]) <= 0)
cached_gases -= id
//PV = nRT
@@ -79,8 +66,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
var/list/cached_gases = gases
. = 0
for(var/id in cached_gases)
- var/gas_data = cached_gases[id]
- . += gas_data[data] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
+ . += cached_gases[id] * GLOB.meta_gas_info[id][META_GAS_SPECIFIC_HEAT]
/datum/gas_mixture/turf/heat_capacity()
. = ..()
@@ -108,10 +94,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
/datum/gas_mixture/proc/thermal_energy() //joules
return THERMAL_ENERGY(src) //see code/__DEFINES/atmospherics.dm; use the define in performance critical areas
-/datum/gas_mixture/proc/archive()
- //Update archived versions of variables
- //Returns: 1 in all cases
-
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
//Merges all air from giver into self. Deletes giver.
//Returns: 1 if we are mutable, 0 otherwise
@@ -156,14 +138,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
//Performs various reactions such as combustion or fusion (LOL)
//Returns: 1 if any reaction took place; 0 otherwise
-/datum/gas_mixture/archive()
- var/list/cached_gases = gases
-
- temperature_archived = temperature
- for(var/id in cached_gases)
- cached_gases[id][ARCHIVE] = cached_gases[id][MOLES]
-
- return 1
/datum/gas_mixture/merge(datum/gas_mixture/giver)
if(!giver)
@@ -182,7 +156,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
//gas transfer
for(var/giver_id in giver_gases)
ASSERT_GAS(giver_id, src)
- cached_gases[giver_id][MOLES] += giver_gases[giver_id][MOLES]
+ cached_gases[giver_id] += giver_gases[giver_id]
return 1
@@ -199,8 +173,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
removed.temperature = temperature
for(var/id in cached_gases)
ADD_GAS(id, removed.gases)
- removed_gases[id][MOLES] = QUANTIZE((cached_gases[id][MOLES] / sum) * amount)
- cached_gases[id][MOLES] -= removed_gases[id][MOLES]
+ removed_gases[id] = QUANTIZE((cached_gases[id] / sum) * amount)
+ cached_gases[id] -= removed_gases[id]
garbage_collect()
return removed
@@ -217,8 +191,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
removed.temperature = temperature
for(var/id in cached_gases)
ADD_GAS(id, removed.gases)
- removed_gases[id][MOLES] = QUANTIZE(cached_gases[id][MOLES] * ratio)
- cached_gases[id][MOLES] -= removed_gases[id][MOLES]
+ removed_gases[id] = QUANTIZE(cached_gases[id] * ratio)
+ cached_gases[id] -= removed_gases[id]
garbage_collect()
@@ -232,7 +206,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
copy.temperature = temperature
for(var/id in cached_gases)
ADD_GAS(id, copy.gases)
- copy_gases[id][MOLES] = cached_gases[id][MOLES]
+ copy_gases[id] = cached_gases[id]
return copy
@@ -244,7 +218,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
temperature = sample.temperature
for(var/id in sample_gases)
ASSERT_GAS(id,src)
- cached_gases[id][MOLES] = sample_gases[id][MOLES]
+ cached_gases[id] = sample_gases[id]
//remove all gases not in the sample
cached_gases &= sample_gases
@@ -273,7 +247,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
if(!ispath(path))
path = gas_id2path(path) //a lot of these strings can't have embedded expressions (especially for mappers), so support for IDs needs to stick around
ADD_GAS(path, gases)
- gases[path][MOLES] = text2num(gas[id])
+ gases[path] = text2num(gas[id])
return 1
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
@@ -302,20 +276,17 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
for(var/id in cached_gases) // transfer gases
ASSERT_GAS(id, sharer)
- var/gas = cached_gases[id]
- var/sharergas = sharer_gases[id]
-
- var/delta = QUANTIZE(gas[ARCHIVE] - sharergas[ARCHIVE])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures
+ var/delta = QUANTIZE(cached_gases[id] - sharer_gases[id])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures
if(delta && abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
- var/gas_heat_capacity = delta * gas[GAS_META][META_GAS_SPECIFIC_HEAT]
+ var/gas_heat_capacity = delta * GLOB.meta_gas_info[id][META_GAS_SPECIFIC_HEAT]
if(delta > 0)
heat_capacity_self_to_sharer += gas_heat_capacity
else
heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative.
- gas[MOLES] -= delta
- sharergas[MOLES] += delta
+ cached_gases[id] -= delta
+ sharer_gases[id] += delta
moved_moles += delta
abs_moved_moles += abs(delta)
@@ -356,8 +327,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
sharer_temperature = sharer.temperature_archived
var/temperature_delta = temperature_archived - sharer_temperature
if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
- var/self_heat_capacity = heat_capacity(ARCHIVE)
- sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity(ARCHIVE)
+ var/self_heat_capacity = heat_capacity()
+ sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity()
if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
var/heat = conduction_coefficient*temperature_delta* \
@@ -376,9 +347,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
for(var/id in cached_gases | sample_gases) // compare gases from either mixture
var/gas_moles = cached_gases[id]
- gas_moles = gas_moles ? gas_moles[MOLES] : 0
var/sample_moles = sample_gases[id]
- sample_moles = sample_moles ? sample_moles[MOLES] : 0
var/delta = abs(gas_moles - sample_moles)
if(delta > MINIMUM_MOLES_DELTA_TO_MOVE && \
delta > gas_moles * MINIMUM_AIR_RATIO_TO_MOVE)
@@ -425,7 +394,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
for(var/id in min_reqs)
if (id == "TEMP" || id == "ENER")
continue
- if(!cached_gases[id] || cached_gases[id][MOLES] < min_reqs[id])
+ if(cached_gases[id] < min_reqs[id])
continue reaction_loop
//at this point, all minimum requirements for the reaction are satisfied.
diff --git a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
index 08f64b5f4a..df912ff478 100644
--- a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
+++ b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
@@ -14,9 +14,6 @@
temperature_archived = initial_temperature
gases.Cut()
-/datum/gas_mixture/immutable/archive()
- return 1 //nothing changes, so we do nothing and the archive is successful
-
/datum/gas_mixture/immutable/merge()
return 0 //we're immutable.
@@ -65,7 +62,7 @@
/datum/gas_mixture/immutable/cloner/garbage_collect()
..()
ADD_GAS(/datum/gas/nitrogen, gases)
- gases[/datum/gas/nitrogen][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
+ gases[/datum/gas/nitrogen] = MOLES_O2STANDARD + MOLES_N2STANDARD
/datum/gas_mixture/immutable/cloner/heat_capacity()
return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index 84ad1e9258..ff1c27805e 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -60,7 +60,7 @@
if(location && location.freon_gas_act())
. = REACTING
else if(location && location.water_vapor_gas_act())
- air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_GAS_VISIBLE
+ air.gases[/datum/gas/water_vapor] -= MOLES_GAS_VISIBLE
. = REACTING
//tritium combustion: combustion of oxygen and tritium (treated as hydrocarbons). creates hotspots. exothermic
@@ -86,13 +86,13 @@
var/turf/open/location = isturf(holder) ? holder : null
var/burned_fuel = 0
- if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/tritium][MOLES])
- burned_fuel = cached_gases[/datum/gas/oxygen][MOLES]/TRITIUM_BURN_OXY_FACTOR
- cached_gases[/datum/gas/tritium][MOLES] -= burned_fuel
+ if(cached_gases[/datum/gas/oxygen] < cached_gases[/datum/gas/tritium])
+ burned_fuel = cached_gases[/datum/gas/oxygen]/TRITIUM_BURN_OXY_FACTOR
+ cached_gases[/datum/gas/tritium] -= burned_fuel
else
- burned_fuel = cached_gases[/datum/gas/tritium][MOLES]*TRITIUM_BURN_TRIT_FACTOR
- cached_gases[/datum/gas/tritium][MOLES] -= cached_gases[/datum/gas/tritium][MOLES]/TRITIUM_BURN_TRIT_FACTOR
- cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/tritium][MOLES]
+ burned_fuel = cached_gases[/datum/gas/tritium]*TRITIUM_BURN_TRIT_FACTOR
+ cached_gases[/datum/gas/tritium] -= cached_gases[/datum/gas/tritium]/TRITIUM_BURN_TRIT_FACTOR
+ cached_gases[/datum/gas/oxygen] -= cached_gases[/datum/gas/tritium]
if(burned_fuel)
energy_released += FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel
@@ -100,7 +100,7 @@
radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
ASSERT_GAS(/datum/gas/water_vapor, air) //oxygen+more-or-less hydrogen=H2O
- cached_gases[/datum/gas/water_vapor][MOLES] += burned_fuel/TRITIUM_BURN_OXY_FACTOR
+ cached_gases[/datum/gas/water_vapor] += burned_fuel/TRITIUM_BURN_OXY_FACTOR
cached_results["fire"] += burned_fuel
@@ -157,23 +157,23 @@
temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE)
if(temperature_scale > 0)
oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale
- if(cached_gases[/datum/gas/oxygen][MOLES] / cached_gases[/datum/gas/plasma][MOLES] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
+ if(cached_gases[/datum/gas/oxygen] / cached_gases[/datum/gas/plasma] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
super_saturation = TRUE
- if(cached_gases[/datum/gas/oxygen][MOLES] > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN)
- plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA
+ if(cached_gases[/datum/gas/oxygen] > cached_gases[/datum/gas/plasma]*PLASMA_OXYGEN_FULLBURN)
+ plasma_burn_rate = (cached_gases[/datum/gas/plasma]*temperature_scale)/PLASMA_BURN_RATE_DELTA
else
- plasma_burn_rate = (temperature_scale*(cached_gases[/datum/gas/oxygen][MOLES]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
+ plasma_burn_rate = (temperature_scale*(cached_gases[/datum/gas/oxygen]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
- plasma_burn_rate = min(plasma_burn_rate,cached_gases[/datum/gas/plasma][MOLES],cached_gases[/datum/gas/oxygen][MOLES]/oxygen_burn_rate) //Ensures matter is conserved properly
- cached_gases[/datum/gas/plasma][MOLES] = QUANTIZE(cached_gases[/datum/gas/plasma][MOLES] - plasma_burn_rate)
- cached_gases[/datum/gas/oxygen][MOLES] = QUANTIZE(cached_gases[/datum/gas/oxygen][MOLES] - (plasma_burn_rate * oxygen_burn_rate))
+ plasma_burn_rate = min(plasma_burn_rate,cached_gases[/datum/gas/plasma],cached_gases[/datum/gas/oxygen]/oxygen_burn_rate) //Ensures matter is conserved properly
+ cached_gases[/datum/gas/plasma] = QUANTIZE(cached_gases[/datum/gas/plasma] - plasma_burn_rate)
+ cached_gases[/datum/gas/oxygen] = QUANTIZE(cached_gases[/datum/gas/oxygen] - (plasma_burn_rate * oxygen_burn_rate))
if (super_saturation)
ASSERT_GAS(/datum/gas/tritium,air)
- cached_gases[/datum/gas/tritium][MOLES] += plasma_burn_rate
+ cached_gases[/datum/gas/tritium] += plasma_burn_rate
else
ASSERT_GAS(/datum/gas/carbon_dioxide,air)
- cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate
+ cached_gases[/datum/gas/carbon_dioxide] += plasma_burn_rate
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
@@ -231,21 +231,21 @@
var/old_heat_capacity = air.heat_capacity()
var/reaction_energy = 0
- var/mediation = FUSION_MEDIATION_FACTOR*(air.heat_capacity()-(cached_gases[/datum/gas/plasma][MOLES]*cached_gases[/datum/gas/plasma][GAS_META][META_GAS_SPECIFIC_HEAT]))/(air.total_moles()-cached_gases[/datum/gas/plasma][MOLES]) //This is the average specific heat of the mixture,not including plasma.
+ var/mediation = FUSION_MEDIATION_FACTOR*(air.heat_capacity()-(cached_gases[/datum/gas/plasma]*GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT]))/(air.total_moles()-cached_gases[/datum/gas/plasma]) //This is the average specific heat of the mixture,not including plasma.
- var/gases_fused = air.total_moles() - cached_gases[/datum/gas/plasma][MOLES]
- var/plasma_differential = (cached_gases[/datum/gas/plasma][MOLES] - gases_fused) / air.total_moles()
+ var/gases_fused = air.total_moles() - cached_gases[/datum/gas/plasma]
+ var/plasma_differential = (cached_gases[/datum/gas/plasma] - gases_fused) / air.total_moles()
var/reaction_efficiency = FUSION_EFFICIENCY_BASE ** -((plasma_differential ** 2) / FUSION_EFFICIENCY_DIVISOR) //https://www.desmos.com/calculator/6jjx3vdrvx
var/gas_power = 0
for (var/gas_id in cached_gases)
- gas_power += reaction_efficiency * (cached_gases[gas_id][GAS_META][META_GAS_FUSION_POWER]*cached_gases[gas_id][MOLES])
+ gas_power += reaction_efficiency * (GLOB.meta_gas_info[gas_id][META_GAS_FUSION_POWER]*cached_gases[gas_id])
var/power_ratio = gas_power/mediation
cached_scan_results[id] = power_ratio //used for analyzer feedback
for (var/gas_id in cached_gases) //and now we fuse
- cached_gases[gas_id][MOLES] = 0
+ cached_gases[gas_id] = 0
var/radiation_power = (FUSION_RADIATION_FACTOR * power_ratio) / (power_ratio + FUSION_RADIATION_CONSTANT) //https://www.desmos.com/calculator/4i1f296phl
var/zap_power = ((FUSION_ZAP_POWER_ASYMPTOTE * power_ratio) / (power_ratio + FUSION_ZAP_POWER_CONSTANT)) + FUSION_ZAP_POWER_BASE //https://www.desmos.com/calculator/n0zkdpxnrr
@@ -255,7 +255,7 @@
if (power_ratio > FUSION_SUPER_TIER_THRESHOLD) //power ratio 50+: SUPER TIER. The gases become so energized that they fuse into a ton of tritium, which is pretty nice! Until you consider the fact that everything just exploded, the canister is probably going to break and you're irradiated.
reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_SUPER * (power_ratio / FUSION_ENERGY_DIVISOR_SUPER)
- cached_gases[/datum/gas/tritium][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_TRITIUM //60% of the gas is converted to energy, 40% to trit
+ cached_gases[/datum/gas/tritium] += gases_fused * FUSION_GAS_CREATION_FACTOR_TRITIUM //60% of the gas is converted to energy, 40% to trit
fusion_prepare_to_die_edition_rng = 100 //Wait a minute..
do_explosion = TRUE
zap_range = FUSION_ZAP_RANGE_SUPER
@@ -263,8 +263,8 @@
else if (power_ratio > FUSION_HIGH_TIER_THRESHOLD) //power ratio 20-50; High tier. The reaction is so energized that it fuses into a small amount of stimulum, and some pluoxium. Very dangerous, but super cool and super useful.
reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_HIGH * (power_ratio / FUSION_ENERGY_DIVISOR_HIGH)
air.assert_gases(/datum/gas/stimulum, /datum/gas/pluoxium)
- cached_gases[/datum/gas/stimulum][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_STIM //40% of the gas is converted to energy, 60% to stim and pluox
- cached_gases[/datum/gas/pluoxium][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_PLUOX
+ cached_gases[/datum/gas/stimulum] += gases_fused * FUSION_GAS_CREATION_FACTOR_STIM //40% of the gas is converted to energy, 60% to stim and pluox
+ cached_gases[/datum/gas/pluoxium] += gases_fused * FUSION_GAS_CREATION_FACTOR_PLUOX
fusion_prepare_to_die_edition_rng = power_ratio //Now we're getting into dangerous territory
do_explosion = TRUE
zap_range = FUSION_ZAP_RANGE_HIGH
@@ -272,16 +272,16 @@
else if (power_ratio > FUSION_MID_TIER_THRESHOLD) //power_ratio 5 to 20; Mediation is overpowered, fusion reaction starts to break down.
reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_MID * (power_ratio / FUSION_ENERGY_DIVISOR_MID)
air.assert_gases(/datum/gas/nitryl,/datum/gas/nitrous_oxide)
- cached_gases[/datum/gas/nitryl][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_NITRYL //20% of the gas is converted to energy, 80% to nitryl and N2O
- cached_gases[/datum/gas/nitrous_oxide][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_N2O
+ cached_gases[/datum/gas/nitryl] += gases_fused * FUSION_GAS_CREATION_FACTOR_NITRYL //20% of the gas is converted to energy, 80% to nitryl and N2O
+ cached_gases[/datum/gas/nitrous_oxide] += gases_fused * FUSION_GAS_CREATION_FACTOR_N2O
fusion_prepare_to_die_edition_rng = power_ratio * FUSION_MID_TIER_RAD_PROB_FACTOR //Still unlikely, but don't stand next to the reaction unprotected
zap_range = FUSION_ZAP_RANGE_MID
else //power ratio 0 to 5; Gas power is overpowered. Fusion isn't nearly as powerful.
reaction_energy += gases_fused * FUSION_RELEASE_ENERGY_LOW * (power_ratio / FUSION_ENERGY_DIVISOR_LOW)
air.assert_gases(/datum/gas/bz, /datum/gas/carbon_dioxide)
- cached_gases[/datum/gas/bz][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_BZ //10% of the gas is converted to energy, 90% to BZ and CO2
- cached_gases[/datum/gas/carbon_dioxide][MOLES] += gases_fused * FUSION_GAS_CREATION_FACTOR_CO2
+ cached_gases[/datum/gas/bz] += gases_fused * FUSION_GAS_CREATION_FACTOR_BZ //10% of the gas is converted to energy, 90% to BZ and CO2
+ cached_gases[/datum/gas/carbon_dioxide] += gases_fused * FUSION_GAS_CREATION_FACTOR_CO2
fusion_prepare_to_die_edition_rng = power_ratio * FUSION_LOW_TIER_RAD_PROB_FACTOR //Low, but still something to look out for
zap_range = FUSION_ZAP_RANGE_LOW
@@ -322,14 +322,14 @@
var/temperature = air.temperature
var/old_heat_capacity = air.heat_capacity()
- var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),cached_gases[/datum/gas/oxygen][MOLES],cached_gases[/datum/gas/nitrogen][MOLES])
+ var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),cached_gases[/datum/gas/oxygen],cached_gases[/datum/gas/nitrogen])
var/energy_used = heat_efficency*NITRYL_FORMATION_ENERGY
ASSERT_GAS(/datum/gas/nitryl,air)
- if ((cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency < 0 )|| (cached_gases[/datum/gas/nitrogen][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing.
+ if ((cached_gases[/datum/gas/oxygen] - heat_efficency < 0 )|| (cached_gases[/datum/gas/nitrogen] - heat_efficency < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
- cached_gases[/datum/gas/oxygen][MOLES] -= heat_efficency
- cached_gases[/datum/gas/nitrogen][MOLES] -= heat_efficency
- cached_gases[/datum/gas/nitryl][MOLES] += heat_efficency*2
+ cached_gases[/datum/gas/oxygen] -= heat_efficency
+ cached_gases[/datum/gas/nitrogen] -= heat_efficency
+ cached_gases[/datum/gas/nitryl] += heat_efficency*2
if(energy_used > 0)
var/new_heat_capacity = air.heat_capacity()
@@ -355,14 +355,14 @@
var/pressure = air.return_pressure()
var/old_heat_capacity = air.heat_capacity()
- var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/nitrous_oxide][MOLES],1))),cached_gases[/datum/gas/nitrous_oxide][MOLES],cached_gases[/datum/gas/plasma][MOLES]/2)
+ var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2)
var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED
- if ((cached_gases[/datum/gas/nitrous_oxide][MOLES] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing.
+ if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
ASSERT_GAS(/datum/gas/bz,air)
- cached_gases[/datum/gas/bz][MOLES] += reaction_efficency
- cached_gases[/datum/gas/nitrous_oxide][MOLES] -= reaction_efficency
- cached_gases[/datum/gas/plasma][MOLES] -= 2*reaction_efficency
+ cached_gases[/datum/gas/bz] += reaction_efficency
+ cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency
+ cached_gases[/datum/gas/plasma] -= 2*reaction_efficency
if(energy_released > 0)
@@ -388,16 +388,16 @@
var/list/cached_gases = air.gases
var/old_heat_capacity = air.heat_capacity()
- var/heat_scale = min(air.temperature/STIMULUM_HEAT_SCALE,cached_gases[/datum/gas/tritium][MOLES],cached_gases[/datum/gas/plasma][MOLES],cached_gases[/datum/gas/nitryl][MOLES])
+ var/heat_scale = min(air.temperature/STIMULUM_HEAT_SCALE,cached_gases[/datum/gas/tritium],cached_gases[/datum/gas/plasma],cached_gases[/datum/gas/nitryl])
var/stim_energy_change = heat_scale + STIMULUM_FIRST_RISE*(heat_scale**2) - STIMULUM_FIRST_DROP*(heat_scale**3) + STIMULUM_SECOND_RISE*(heat_scale**4) - STIMULUM_ABSOLUTE_DROP*(heat_scale**5)
ASSERT_GAS(/datum/gas/stimulum,air)
- if ((cached_gases[/datum/gas/tritium][MOLES] - heat_scale < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - heat_scale < 0) || (cached_gases[/datum/gas/nitryl][MOLES] - heat_scale < 0)) //Shouldn't produce gas from nothing.
+ if ((cached_gases[/datum/gas/tritium] - heat_scale < 0 )|| (cached_gases[/datum/gas/plasma] - heat_scale < 0) || (cached_gases[/datum/gas/nitryl] - heat_scale < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
- cached_gases[/datum/gas/stimulum][MOLES]+= heat_scale/10
- cached_gases[/datum/gas/tritium][MOLES] -= heat_scale
- cached_gases[/datum/gas/plasma][MOLES] -= heat_scale
- cached_gases[/datum/gas/nitryl][MOLES] -= heat_scale
+ cached_gases[/datum/gas/stimulum]+= heat_scale/10
+ cached_gases[/datum/gas/tritium] -= heat_scale
+ cached_gases[/datum/gas/plasma] -= heat_scale
+ cached_gases[/datum/gas/nitryl] -= heat_scale
if(stim_energy_change)
var/new_heat_capacity = air.heat_capacity()
@@ -420,13 +420,13 @@
var/list/cached_gases = air.gases
air.assert_gases(/datum/gas/hypernoblium,/datum/gas/bz)
var/old_heat_capacity = air.heat_capacity()
- var/nob_formed = min((cached_gases[/datum/gas/nitrogen][MOLES]+cached_gases[/datum/gas/tritium][MOLES])/100,cached_gases[/datum/gas/tritium][MOLES]/10,cached_gases[/datum/gas/nitrogen][MOLES]/20)
- var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(cached_gases[/datum/gas/bz][MOLES],1)))
- if ((cached_gases[/datum/gas/tritium][MOLES] - 10*nob_formed < 0) || (cached_gases[/datum/gas/nitrogen][MOLES] - 20*nob_formed < 0))
+ var/nob_formed = min((cached_gases[/datum/gas/nitrogen]+cached_gases[/datum/gas/tritium])/100,cached_gases[/datum/gas/tritium]/10,cached_gases[/datum/gas/nitrogen]/20)
+ var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(cached_gases[/datum/gas/bz],1)))
+ if ((cached_gases[/datum/gas/tritium] - 10*nob_formed < 0) || (cached_gases[/datum/gas/nitrogen] - 20*nob_formed < 0))
return NO_REACTION
- cached_gases[/datum/gas/tritium][MOLES] -= 10*nob_formed
- cached_gases[/datum/gas/nitrogen][MOLES] -= 20*nob_formed
- cached_gases[/datum/gas/hypernoblium][MOLES]+= nob_formed
+ cached_gases[/datum/gas/tritium] -= 10*nob_formed
+ cached_gases[/datum/gas/nitrogen] -= 20*nob_formed
+ cached_gases[/datum/gas/hypernoblium]+= nob_formed
if (nob_formed)
@@ -449,14 +449,14 @@
/datum/gas_reaction/miaster/react(datum/gas_mixture/air, datum/holder)
var/list/cached_gases = air.gases
// As the name says it, it needs to be dry
- if(cached_gases[/datum/gas/water_vapor] && cached_gases[/datum/gas/water_vapor][MOLES]/air.total_moles() > 0.1)
+ if(cached_gases[/datum/gas/water_vapor] && cached_gases[/datum/gas/water_vapor]/air.total_moles() > 0.1)
return
//Replace miasma with oxygen
- var/cleaned_air = min(cached_gases[/datum/gas/miasma][MOLES], 20 + (air.temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
- cached_gases[/datum/gas/miasma][MOLES] -= cleaned_air
+ var/cleaned_air = min(cached_gases[/datum/gas/miasma], 20 + (air.temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
+ cached_gases[/datum/gas/miasma] -= cleaned_air
ASSERT_GAS(/datum/gas/oxygen,air)
- cached_gases[/datum/gas/oxygen][MOLES] += cleaned_air
+ cached_gases[/datum/gas/oxygen] += cleaned_air
//Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable
air.temperature += cleaned_air * 0.002
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 0a7b76cc79..5f4e79174b 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -282,10 +282,10 @@
continue
cur_tlv = TLV[gas_id]
data["environment_data"] += list(list(
- "name" = environment.gases[gas_id][GAS_META][META_GAS_NAME],
- "value" = environment.gases[gas_id][MOLES] / total_moles * 100,
+ "name" = GLOB.meta_gas_info[gas_id][META_GAS_NAME],
+ "value" = environment.gases[gas_id] / total_moles * 100,
"unit" = "%",
- "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id][MOLES] * partial_pressure)
+ "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure)
))
if(!locked || user.has_unlimited_silicon_privilege)
@@ -692,7 +692,7 @@
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
continue
cur_tlv = TLV[gas_id]
- gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id][MOLES] * partial_pressure))
+ gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id] * partial_pressure))
environment.garbage_collect()
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index 4101deb00c..4d00cdf58e 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -160,9 +160,9 @@
filtered_out.temperature = removed.temperature
filtered_out.add_gas(filter_type)
- filtered_out.gases[filter_type][MOLES] = removed.gases[filter_type][MOLES]
+ filtered_out.gases[filter_type] = removed.gases[filter_type]
- removed.gases[filter_type][MOLES] = 0
+ removed.gases[filter_type] = 0
removed.garbage_collect()
var/datum/gas_mixture/target = (air2.return_pressure() < target_pressure ? air2 : air1) //if there's no room for the filtered gas; just leave it in air1
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index 9b69b2fa6f..8729f30fb0 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -183,7 +183,7 @@
if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic.
beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents.
beaker.reagents.reaction(occupant, VAPOR)
- air1.gases[/datum/gas/oxygen][MOLES] -= max(0,air1.gases[/datum/gas/oxygen][MOLES] - 2 / efficiency) //Let's use gas for this
+ air1.gases[/datum/gas/oxygen] -= max(0,air1.gases[/datum/gas/oxygen] - 2 / efficiency) //Let's use gas for this
air1.garbage_collect()
if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker).
reagent_transfer = 0
@@ -198,7 +198,7 @@
var/datum/gas_mixture/air1 = airs[1]
- if(!nodes[1] || !airs[1] || !air1.gases.len || air1.gases[/datum/gas/oxygen][MOLES] < 5) // Turn off if the machine won't work.
+ if(!nodes[1] || !airs[1] || !air1.gases.len || air1.gases[/datum/gas/oxygen] < 5) // Turn off if the machine won't work.
on = FALSE
update_icon()
return
@@ -220,7 +220,7 @@
air1.temperature = max(air1.temperature - heat / air_heat_capacity, TCMB)
mob_occupant.adjust_bodytemperature(heat / heat_capacity, TCMB)
- air1.gases[/datum/gas/oxygen][MOLES] = max(0,air1.gases[/datum/gas/oxygen][MOLES] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic.
+ air1.gases[/datum/gas/oxygen] = max(0,air1.gases[/datum/gas/oxygen] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic.
air1.garbage_collect()
/obj/machinery/atmospherics/components/unary/cryo_cell/power_change()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
index 1a9d1cff30..6bde4fd9e7 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
@@ -18,8 +18,8 @@
air_contents.temperature = T20C
if(gas_type)
air_contents.assert_gas(gas_type)
- air_contents.gases[gas_type][MOLES] = AIR_CONTENTS
- name = "[name] ([air_contents.gases[gas_type][GAS_META][META_GAS_NAME]])"
+ air_contents.gases[gas_type] = AIR_CONTENTS
+ name = "[name] ([GLOB.meta_gas_info[gas_type][META_GAS_NAME]])"
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = /datum/gas/carbon_dioxide
@@ -45,5 +45,5 @@
..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
- air_contents.gases[/datum/gas/oxygen][MOLES] = AIR_CONTENTS * 0.2
- air_contents.gases[/datum/gas/nitrogen][MOLES] = AIR_CONTENTS * 0.8
+ air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2
+ air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8
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 ee819d4f74..485d082662 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
@@ -198,8 +198,8 @@
for(var/gas in filter_types & removed_gases)
filtered_out.add_gas(gas)
- filtered_gases[gas][MOLES] = removed_gases[gas][MOLES]
- removed_gases[gas][MOLES] = 0
+ filtered_gases[gas] = removed_gases[gas]
+ removed_gases[gas] = 0
removed.garbage_collect()
diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm
index c4fa387ab0..38178a4339 100644
--- a/code/modules/atmospherics/machinery/datum_pipeline.dm
+++ b/code/modules/atmospherics/machinery/datum_pipeline.dm
@@ -145,7 +145,7 @@
var/member_gases = member.air_temporary.gases
for(var/id in member_gases)
- member_gases[id][MOLES] *= member.volume/air.volume
+ member_gases[id] *= member.volume/air.volume
member.air_temporary.temperature = air.temperature
@@ -254,4 +254,4 @@
G.copy_from(total_gas_mixture)
var/list/G_gases = G.gases
for(var/id in G_gases)
- G_gases[id][MOLES] *= G.volume/total_gas_mixture.volume
+ G_gases[id] *= G.volume/total_gas_mixture.volume
diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm
index 20251418bc..7c534303d1 100644
--- a/code/modules/atmospherics/machinery/other/miner.dm
+++ b/code/modules/atmospherics/machinery/other/miner.dm
@@ -132,7 +132,7 @@
return FALSE
var/datum/gas_mixture/merger = new
merger.assert_gas(spawn_id)
- merger.gases[spawn_id][MOLES] = (spawn_mol)
+ merger.gases[spawn_id] = (spawn_mol)
merger.temperature = spawn_temp
O.assume_air(merger)
O.air_update_turf(TRUE)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index d23a5df958..33f6a73c6b 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -207,13 +207,13 @@
air_contents.add_gas(gas_type)
if(starter_temp)
air_contents.temperature = starter_temp
- air_contents.gases[gas_type][MOLES] = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
+ air_contents.gases[gas_type] = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
if(starter_temp)
air_contents.temperature = starter_temp
/obj/machinery/portable_atmospherics/canister/air/create_gas()
air_contents.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
- air_contents.gases[/datum/gas/oxygen][MOLES] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
- air_contents.gases[/datum/gas/nitrogen][MOLES] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
+ air_contents.gases[/datum/gas/oxygen] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
+ air_contents.gases[/datum/gas/nitrogen] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
#define HOLDING (1<<0)
#define CONNECTED (1<<1)
@@ -439,10 +439,10 @@
var/list/danger = list()
for(var/id in air_contents.gases)
var/gas = air_contents.gases[id]
- if(!gas[GAS_META][META_GAS_DANGER])
+ if(!GLOB.meta_gas_info[id][META_GAS_DANGER])
continue
- if(gas[MOLES] > (gas[GAS_META][META_GAS_MOLES_VISIBLE] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
- danger[gas[GAS_META][META_GAS_NAME]] = gas[MOLES] //ex. "plasma" = 20
+ if(gas > (GLOB.meta_gas_info[id][META_GAS_MOLES_VISIBLE] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
+ danger[GLOB.meta_gas_info[id][META_GAS_NAME]] = 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 29a454f59a..800ac78713 100644
--- a/code/modules/atmospherics/machinery/portable/scrubber.dm
+++ b/code/modules/atmospherics/machinery/portable/scrubber.dm
@@ -46,8 +46,8 @@
filtered.temperature = filtering.temperature
for(var/gas in filtering.gases & scrubbing)
filtered.add_gas(gas)
- filtered.gases[gas][MOLES] = filtering.gases[gas][MOLES] // Shuffle the "bad" gasses to the filtered mixture.
- filtering.gases[gas][MOLES] = 0
+ filtered.gases[gas] = filtering.gases[gas] // Shuffle the "bad" gasses to the filtered mixture.
+ filtering.gases[gas] = 0
filtering.garbage_collect() // Now that the gasses are set to 0, clean up the mixture.
air_contents.merge(filtered) // Store filtered out gasses.
diff --git a/code/modules/cargo/bounties/engineering.dm b/code/modules/cargo/bounties/engineering.dm
index eb1764d482..e10d48f3bf 100644
--- a/code/modules/cargo/bounties/engineering.dm
+++ b/code/modules/cargo/bounties/engineering.dm
@@ -12,7 +12,7 @@
var/obj/item/tank/T = O
if(!T.air_contents.gases[gas_type])
return FALSE
- return T.air_contents.gases[gas_type][MOLES] >= moles_required
+ return T.air_contents.gases[gas_type] >= moles_required
/datum/bounty/item/engineering/gas/nitryl_tank
name = "Full Tank of Nitryl"
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 966d5cc0d8..53f3832c7a 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -172,7 +172,7 @@
var/datum/gas_mixture/GM = T.air
if(!GM.gases[/datum/gas/oxygen])
return
- GM.gases[/datum/gas/oxygen][MOLES] = max(GM.gases[/datum/gas/oxygen][MOLES] - severity * holder.energy, 0)
+ GM.gases[/datum/gas/oxygen] = max(GM.gases[/datum/gas/oxygen] - severity * holder.energy, 0)
GM.garbage_collect()
/datum/spacevine_mutation/nitro_eater
@@ -187,7 +187,7 @@
var/datum/gas_mixture/GM = T.air
if(!GM.gases[/datum/gas/nitrogen])
return
- GM.gases[/datum/gas/nitrogen][MOLES] = max(GM.gases[/datum/gas/nitrogen][MOLES] - severity * holder.energy, 0)
+ GM.gases[/datum/gas/nitrogen] = max(GM.gases[/datum/gas/nitrogen] - severity * holder.energy, 0)
GM.garbage_collect()
/datum/spacevine_mutation/carbondioxide_eater
@@ -202,7 +202,7 @@
var/datum/gas_mixture/GM = T.air
if(!GM.gases[/datum/gas/carbon_dioxide])
return
- GM.gases[/datum/gas/carbon_dioxide][MOLES] = max(GM.gases[/datum/gas/carbon_dioxide][MOLES] - severity * holder.energy, 0)
+ GM.gases[/datum/gas/carbon_dioxide] = max(GM.gases[/datum/gas/carbon_dioxide] - severity * holder.energy, 0)
GM.garbage_collect()
/datum/spacevine_mutation/plasma_eater
@@ -217,7 +217,7 @@
var/datum/gas_mixture/GM = T.air
if(!GM.gases[/datum/gas/plasma])
return
- GM.gases[/datum/gas/plasma][MOLES] = max(GM.gases[/datum/gas/plasma][MOLES] - severity * holder.energy, 0)
+ GM.gases[/datum/gas/plasma] = max(GM.gases[/datum/gas/plasma] - severity * holder.energy, 0)
GM.garbage_collect()
/datum/spacevine_mutation/thorns
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index 3fe5a2dfca..23f178edc9 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -187,7 +187,7 @@
var/turf/open/O = loc
if(O.air)
var/loc_gases = O.air.gases
- if(loc_gases[/datum/gas/oxygen][MOLES] > 13)
+ if(loc_gases[/datum/gas/oxygen] > 13)
return TRUE
return FALSE
diff --git a/code/modules/integrated_electronics/subtypes/atmospherics.dm b/code/modules/integrated_electronics/subtypes/atmospherics.dm
index 1715223fa2..be4b15610f 100644
--- a/code/modules/integrated_electronics/subtypes/atmospherics.dm
+++ b/code/modules/integrated_electronics/subtypes/atmospherics.dm
@@ -371,14 +371,14 @@ obj/item/integrated_circuit/atmospherics/connector/portableConnectorReturnAir()
for(var/filtered_gas in removed.gases)
//Get the name of the gas and see if it is in the list
- if(removed.gases[filtered_gas][GAS_META][META_GAS_NAME] in wanted)
+ if(GLOB.meta_gas_info[filtered_gas][META_GAS_NAME] in wanted)
//The gas that is put in all the filtered out gases
filtered_out.temperature = removed.temperature
filtered_out.add_gas(filtered_gas)
- filtered_out.gases[filtered_gas][MOLES] = removed.gases[filtered_gas][MOLES]
+ filtered_out.gases[filtered_gas] = removed.gases[filtered_gas]
//The filtered out gas is entirely removed from the currently filtered gases
- removed.gases[filtered_gas][MOLES] = 0
+ removed.gases[filtered_gas] = 0
removed.garbage_collect()
//Check if the pressure is high enough to put stuff in filtered, or else just put it back in the source
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index 6e8b0cb777..040f4d1e4a 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -1165,8 +1165,8 @@
var/list/gas_names = list()
var/list/gas_amounts = list()
for(var/id in gases)
- var/name = gases[id][GAS_META][META_GAS_NAME]
- var/amt = round(gases[id][MOLES], 0.001)
+ var/name = GLOB.meta_gas_info[id][META_GAS_NAME]
+ var/amt = round(gases[id], 0.001)
gas_names.Add(name)
gas_amounts.Add(amt)
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index 543fda9fd0..ea1dbab85e 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -18,20 +18,20 @@
breath.assert_gases(/datum/gas/plasma, /datum/gas/oxygen)
//Partial pressure of the toxins in our breath
- var/Toxins_pp = (breath_gases[/datum/gas/plasma][MOLES]/breath.total_moles())*breath_pressure
+ var/Toxins_pp = (breath_gases[/datum/gas/plasma]/breath.total_moles())*breath_pressure
if(Toxins_pp > tox_detect_threshold) // Detect toxins in air
- adjustPlasma(breath_gases[/datum/gas/plasma][MOLES]*250)
+ adjustPlasma(breath_gases[/datum/gas/plasma]*250)
throw_alert("alien_tox", /obj/screen/alert/alien_tox)
- toxins_used = breath_gases[/datum/gas/plasma][MOLES]
+ toxins_used = breath_gases[/datum/gas/plasma]
else
clear_alert("alien_tox")
//Breathe in toxins and out oxygen
- breath_gases[/datum/gas/plasma][MOLES] -= toxins_used
- breath_gases[/datum/gas/oxygen][MOLES] += toxins_used
+ breath_gases[/datum/gas/plasma] -= toxins_used
+ breath_gases[/datum/gas/oxygen] += toxins_used
breath.garbage_collect()
diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
index 6f5ae6f4eb..a13bb5db6d 100644
--- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
@@ -33,7 +33,7 @@
if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed)
if(environment)
if(environment.total_moles())
- if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire
+ if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen]) >= 1) //Same threshhold that extinguishes fire
H.adjust_fire_stacks(0.5)
if(!H.on_fire && H.fire_stacks > 0)
H.visible_message("[H]'s body reacts with the atmosphere and bursts into flames!","Your body reacts with the atmosphere and bursts into flame!")
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 48a401802b..80c20dbbf5 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -151,9 +151,9 @@
var/list/breath_gases = breath.gases
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz)
- var/O2_partialpressure = (breath_gases[/datum/gas/oxygen][MOLES]/breath.total_moles())*breath_pressure
- var/Toxins_partialpressure = (breath_gases[/datum/gas/plasma][MOLES]/breath.total_moles())*breath_pressure
- var/CO2_partialpressure = (breath_gases[/datum/gas/carbon_dioxide][MOLES]/breath.total_moles())*breath_pressure
+ var/O2_partialpressure = (breath_gases[/datum/gas/oxygen]/breath.total_moles())*breath_pressure
+ var/Toxins_partialpressure = (breath_gases[/datum/gas/plasma]/breath.total_moles())*breath_pressure
+ var/CO2_partialpressure = (breath_gases[/datum/gas/carbon_dioxide]/breath.total_moles())*breath_pressure
//OXYGEN
@@ -177,7 +177,7 @@
var/ratio = 1 - O2_partialpressure/safe_oxy_min
adjustOxyLoss(min(5*ratio, 3))
failed_last_breath = 1
- oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]*ratio
+ oxygen_used = breath_gases[/datum/gas/oxygen]*ratio
else
adjustOxyLoss(3)
failed_last_breath = 1
@@ -189,12 +189,12 @@
o2overloadtime = 0 //reset our counter for this too
if(health >= crit_threshold)
adjustOxyLoss(-5)
- oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]
+ oxygen_used = breath_gases[/datum/gas/oxygen]
clear_alert("not_enough_oxy")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "suffocation")
- breath_gases[/datum/gas/oxygen][MOLES] -= oxygen_used
- breath_gases[/datum/gas/carbon_dioxide][MOLES] += oxygen_used
+ breath_gases[/datum/gas/oxygen] -= oxygen_used
+ breath_gases[/datum/gas/carbon_dioxide] += oxygen_used
//CARBON DIOXIDE
if(CO2_partialpressure > safe_co2_max)
@@ -213,7 +213,7 @@
//TOXINS/PLASMA
if(Toxins_partialpressure > safe_tox_max)
- var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_tox_max) * 10
+ var/ratio = (breath_gases[/datum/gas/plasma]/safe_tox_max) * 10
adjustToxLoss(CLAMP(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
else
@@ -221,7 +221,7 @@
//NITROUS OXIDE
if(breath_gases[/datum/gas/nitrous_oxide])
- var/SA_partialpressure = (breath_gases[/datum/gas/nitrous_oxide][MOLES]/breath.total_moles())*breath_pressure
+ var/SA_partialpressure = (breath_gases[/datum/gas/nitrous_oxide]/breath.total_moles())*breath_pressure
if(SA_partialpressure > SA_para_min)
Unconscious(60)
if(SA_partialpressure > SA_sleep_min)
@@ -232,7 +232,7 @@
//BZ (Facepunch port of their Agent B)
if(breath_gases[/datum/gas/bz])
- var/bz_partialpressure = (breath_gases[/datum/gas/bz][MOLES]/breath.total_moles())*breath_pressure
+ var/bz_partialpressure = (breath_gases[/datum/gas/bz]/breath.total_moles())*breath_pressure
if(bz_partialpressure > 1)
hallucination += 10
else if(bz_partialpressure > 0.01)
@@ -240,17 +240,17 @@
//TRITIUM
if(breath_gases[/datum/gas/tritium])
- var/tritium_partialpressure = (breath_gases[/datum/gas/tritium][MOLES]/breath.total_moles())*breath_pressure
+ var/tritium_partialpressure = (breath_gases[/datum/gas/tritium]/breath.total_moles())*breath_pressure
radiation += tritium_partialpressure/10
//NITRYL
if(breath_gases[/datum/gas/nitryl])
- var/nitryl_partialpressure = (breath_gases[/datum/gas/nitryl][MOLES]/breath.total_moles())*breath_pressure
+ var/nitryl_partialpressure = (breath_gases[/datum/gas/nitryl]/breath.total_moles())*breath_pressure
adjustFireLoss(nitryl_partialpressure/4)
//MIASMA
if(breath_gases[/datum/gas/miasma])
- var/miasma_partialpressure = (breath_gases[/datum/gas/miasma][MOLES]/breath.total_moles())*breath_pressure
+ var/miasma_partialpressure = (breath_gases[/datum/gas/miasma]/breath.total_moles())*breath_pressure
if(prob(1 * miasma_partialpressure))
var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3)
@@ -346,7 +346,7 @@
var/list/cached_gases = miasma_turf.air.gases
ASSERT_GAS(/datum/gas/miasma, miasma_turf.air)
- cached_gases[/datum/gas/miasma][MOLES] += 0.02
+ cached_gases[/datum/gas/miasma] += 0.02
/mob/living/carbon/proc/handle_blood()
return
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 9ef4c1567a..cb7b9a469c 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -109,7 +109,7 @@
ExtinguishMob()
return
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
- if(!G.gases[/datum/gas/oxygen] || G.gases[/datum/gas/oxygen][MOLES] < 1)
+ if(G.gases[/datum/gas/oxygen] < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return
var/turf/location = get_turf(src)
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index 90070f1d5d..2ab1c9da35 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -544,9 +544,9 @@
if (total_moles)
for(var/id in env_gases)
- var/gas_level = env_gases[id][MOLES]/total_moles
+ var/gas_level = env_gases[id]/total_moles
if(gas_level > 0.01)
- dat += "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_level*100)]%
"
+ dat += "[GLOB.meta_gas_info[id][META_GAS_NAME]]: [round(gas_level*100)]%
"
dat += "Temperature: [round(environment.temperature-T0C)]°C
"
dat += "Refresh Reading
"
dat += "
"
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 3d10bfd121..fc51b9afe4 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -1,71 +1,71 @@
-/mob/living/simple_animal/hostile/tree
- name = "pine tree"
- desc = "A pissed off tree-like alien. It seems annoyed with the festivities..."
- icon = 'icons/obj/flora/pinetrees.dmi'
- icon_state = "pine_1"
- icon_living = "pine_1"
- icon_dead = "pine_1"
- icon_gib = "pine_1"
- gender = NEUTER
- speak_chance = 0
- turns_per_move = 5
- response_help = "brushes"
- response_disarm = "pushes"
- response_harm = "hits"
- speed = 1
- maxHealth = 250
- health = 250
- mob_size = MOB_SIZE_LARGE
-
- pixel_x = -16
-
- harm_intent_damage = 5
- melee_damage_lower = 8
- melee_damage_upper = 12
- attacktext = "bites"
- attack_sound = 'sound/weapons/bite.ogg'
- speak_emote = list("pines")
- emote_taunt = list("growls")
- taunt_chance = 20
-
- atmos_requirements = list("min_oxy" = 2, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 5
- minbodytemp = 0
- maxbodytemp = 1200
-
- faction = list("hostile")
- deathmessage = "is hacked into pieces!"
- loot = list(/obj/item/stack/sheet/mineral/wood)
- gold_core_spawnable = HOSTILE_SPAWN
- del_on_death = 1
-
-/mob/living/simple_animal/hostile/tree/Life()
- ..()
- if(isopenturf(loc))
- var/turf/open/T = src.loc
- if(T.air && T.air.gases[/datum/gas/carbon_dioxide])
- var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES]
- if(co2 > 0)
- if(prob(25))
- var/amt = min(co2, 9)
- T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt
- T.atmos_spawn_air("o2=[amt]")
-
-/mob/living/simple_animal/hostile/tree/AttackingTarget()
- . = ..()
- if(iscarbon(target))
- var/mob/living/carbon/C = target
- if(prob(15))
- C.Knockdown(60)
- C.visible_message("\The [src] knocks down \the [C]!", \
- "\The [src] knocks you down!")
-
-/mob/living/simple_animal/hostile/tree/festivus
- name = "festivus pole"
- desc = "Serenity now... SERENITY NOW!"
- icon_state = "festivus_pole"
- icon_living = "festivus_pole"
- icon_dead = "festivus_pole"
- icon_gib = "festivus_pole"
- loot = list(/obj/item/stack/rods)
- speak_emote = list("polls")
+/mob/living/simple_animal/hostile/tree
+ name = "pine tree"
+ desc = "A pissed off tree-like alien. It seems annoyed with the festivities..."
+ icon = 'icons/obj/flora/pinetrees.dmi'
+ icon_state = "pine_1"
+ icon_living = "pine_1"
+ icon_dead = "pine_1"
+ icon_gib = "pine_1"
+ gender = NEUTER
+ speak_chance = 0
+ turns_per_move = 5
+ response_help = "brushes"
+ response_disarm = "pushes"
+ response_harm = "hits"
+ speed = 1
+ maxHealth = 250
+ health = 250
+ mob_size = MOB_SIZE_LARGE
+
+ pixel_x = -16
+
+ harm_intent_damage = 5
+ melee_damage_lower = 8
+ melee_damage_upper = 12
+ attacktext = "bites"
+ attack_sound = 'sound/weapons/bite.ogg'
+ speak_emote = list("pines")
+ emote_taunt = list("growls")
+ taunt_chance = 20
+
+ atmos_requirements = list("min_oxy" = 2, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
+ unsuitable_atmos_damage = 5
+ minbodytemp = 0
+ maxbodytemp = 1200
+
+ faction = list("hostile")
+ deathmessage = "is hacked into pieces!"
+ loot = list(/obj/item/stack/sheet/mineral/wood)
+ gold_core_spawnable = HOSTILE_SPAWN
+ del_on_death = 1
+
+/mob/living/simple_animal/hostile/tree/Life()
+ ..()
+ if(isopenturf(loc))
+ var/turf/open/T = src.loc
+ if(T.air && T.air.gases[/datum/gas/carbon_dioxide])
+ var/co2 = T.air.gases[/datum/gas/carbon_dioxide]
+ if(co2 > 0)
+ if(prob(25))
+ var/amt = min(co2, 9)
+ T.air.gases[/datum/gas/carbon_dioxide] -= amt
+ T.atmos_spawn_air("o2=[amt]")
+
+/mob/living/simple_animal/hostile/tree/AttackingTarget()
+ . = ..()
+ if(iscarbon(target))
+ var/mob/living/carbon/C = target
+ if(prob(15))
+ C.Knockdown(60)
+ C.visible_message("\The [src] knocks down \the [C]!", \
+ "\The [src] knocks you down!")
+
+/mob/living/simple_animal/hostile/tree/festivus
+ name = "festivus pole"
+ desc = "Serenity now... SERENITY NOW!"
+ icon_state = "festivus_pole"
+ icon_living = "festivus_pole"
+ icon_dead = "festivus_pole"
+ icon_gib = "festivus_pole"
+ loot = list(/obj/item/stack/rods)
+ speak_emote = list("polls")
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index fcb201d0ad..c33f667f24 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -209,10 +209,10 @@
var/ST_gases = ST.air.gases
ST.air.assert_gases(arglist(GLOB.hardcoded_gases))
- var/tox = ST_gases[/datum/gas/plasma][MOLES]
- var/oxy = ST_gases[/datum/gas/oxygen][MOLES]
- var/n2 = ST_gases[/datum/gas/nitrogen][MOLES]
- var/co2 = ST_gases[/datum/gas/carbon_dioxide][MOLES]
+ var/tox = ST_gases[/datum/gas/plasma]
+ var/oxy = ST_gases[/datum/gas/oxygen]
+ var/n2 = ST_gases[/datum/gas/nitrogen]
+ var/co2 = ST_gases[/datum/gas/carbon_dioxide]
ST.air.garbage_collect()
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 161362c187..ebb34fe77a 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -132,7 +132,7 @@
if(stat != DEAD)
var/bz_percentage =0
if(environment.gases[/datum/gas/bz])
- bz_percentage = environment.gases[/datum/gas/bz][MOLES] / environment.total_moles()
+ bz_percentage = environment.gases[/datum/gas/bz] / environment.total_moles()
var/stasis = (bz_percentage >= 0.05 && bodytemperature < (T0C + 100)) || force_stasis
if(stat == CONSCIOUS && stasis)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 9d662b1673..deefe00a9b 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -67,8 +67,8 @@
t += "Temperature: [environment.temperature] \n"
for(var/id in environment.gases)
var/gas = environment.gases[id]
- if(gas[MOLES])
- t+="[gas[GAS_META][META_GAS_NAME]]: [gas[MOLES]] \n"
+ if(gas)
+ t+="[GLOB.meta_gas_info[id][META_GAS_NAME]]: [gas] \n"
to_chat(usr, t)
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 138e8bb9dd..ca451beec4 100644
--- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm
+++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
@@ -81,13 +81,13 @@
if(air.total_moles())
for(var/gasid in air.gases)
gasdata.Add(list(list(
- "name"= air.gases[gasid][GAS_META][META_GAS_NAME],
- "amount" = round(100*air.gases[gasid][MOLES]/air.total_moles(),0.01))))
+ "name"= GLOB.meta_gas_info[gasid][META_GAS_NAME],
+ "amount" = round(100*air.gases[gasid]/air.total_moles(),0.01))))
else
for(var/gasid in air.gases)
gasdata.Add(list(list(
- "name"= air.gases[gasid][GAS_META][META_GAS_NAME],
+ "name"= GLOB.meta_gas_info[gasid][META_GAS_NAME],
"amount" = 0)))
data["gases"] = gasdata
diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm
index 3b9c3a549b..1fb8bee72b 100644
--- a/code/modules/power/singularity/collector.dm
+++ b/code/modules/power/singularity/collector.dm
@@ -43,10 +43,10 @@
playsound(src, 'sound/machines/ding.ogg', 50, 1)
eject()
else
- var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES])
- loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= gasdrained
+ var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.gases[/datum/gas/plasma])
+ loaded_tank.air_contents.gases[/datum/gas/plasma] -= gasdrained
loaded_tank.air_contents.assert_gas(/datum/gas/tritium)
- loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] += gasdrained
+ loaded_tank.air_contents.gases[/datum/gas/tritium] += gasdrained
loaded_tank.air_contents.garbage_collect()
var/power_produced = RAD_COLLECTOR_OUTPUT
@@ -58,10 +58,10 @@
eject()
else
var/gasdrained = bitcoinproduction_drain*drainratio
- loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] -= gasdrained
- loaded_tank.air_contents.gases[/datum/gas/oxygen][MOLES] -= gasdrained
+ loaded_tank.air_contents.gases[/datum/gas/tritium] -= gasdrained
+ loaded_tank.air_contents.gases[/datum/gas/oxygen] -= gasdrained
loaded_tank.air_contents.assert_gas(/datum/gas/carbon_dioxide)
- loaded_tank.air_contents.gases[/datum/gas/carbon_dioxide][MOLES] += gasdrained*2
+ loaded_tank.air_contents.gases[/datum/gas/carbon_dioxide] += gasdrained*2
loaded_tank.air_contents.garbage_collect()
var/bitcoins_mined = RAD_COLLECTOR_OUTPUT
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, bitcoins_mined*RAD_COLLECTOR_MINING_CONVERSION_RATE)
@@ -76,7 +76,6 @@
var/fuel
if(loaded_tank)
fuel = loaded_tank.air_contents.gases[/datum/gas/plasma]
- fuel = fuel ? fuel[MOLES] : 0
investigate_log("turned [active?"on":"off"] by [key_name(user)]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"It is empty"].", INVESTIGATE_SINGULO)
return
else
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index ad94d577ea..0cca568d5d 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -343,12 +343,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//calculating gas related values
combined_gas = max(removed.total_moles(), 0)
- plasmacomp = max(removed.gases[/datum/gas/plasma][MOLES]/combined_gas, 0)
- o2comp = max(removed.gases[/datum/gas/oxygen][MOLES]/combined_gas, 0)
- co2comp = max(removed.gases[/datum/gas/carbon_dioxide][MOLES]/combined_gas, 0)
+ plasmacomp = max(removed.gases[/datum/gas/plasma]/combined_gas, 0)
+ o2comp = max(removed.gases[/datum/gas/oxygen]/combined_gas, 0)
+ co2comp = max(removed.gases[/datum/gas/carbon_dioxide]/combined_gas, 0)
- n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0)
- n2comp = max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0)
+ n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide]/combined_gas, 0)
+ n2comp = max(removed.gases[/datum/gas/nitrogen]/combined_gas, 0)
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1)
@@ -400,9 +400,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
removed.temperature = max(0, min(removed.temperature, 2500 * dynamic_heat_modifier))
//Calculate how much gas to release
- removed.gases[/datum/gas/plasma][MOLES] += max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0)
+ removed.gases[/datum/gas/plasma] += max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0)
- removed.gases[/datum/gas/oxygen][MOLES] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
+ removed.gases[/datum/gas/oxygen] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
if(produces_gas)
env.merge(removed)
diff --git a/code/modules/research/xenobiology/crossbreeding/chilling.dm b/code/modules/research/xenobiology/crossbreeding/chilling.dm
index 25dbaa461f..40951fc35d 100644
--- a/code/modules/research/xenobiology/crossbreeding/chilling.dm
+++ b/code/modules/research/xenobiology/crossbreeding/chilling.dm
@@ -102,7 +102,7 @@ Chilling extracts:
var/datum/gas_mixture/G = T.air
if(istype(G))
G.assert_gas(/datum/gas/plasma)
- G.gases[/datum/gas/plasma][MOLES] = 0
+ G.gases[/datum/gas/plasma] = 0
filtered = TRUE
G.garbage_collect()
T.air_update_turf()
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index 1e22796b1b..f78a1043c9 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -87,10 +87,10 @@
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen, /datum/gas/tritium, /datum/gas/nitryl, /datum/gas/pluoxium, /datum/gas/stimulum)
//Partial pressures in our breath
- var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium][MOLES]))
- var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES])
- var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES])
- var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES])
+ var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen])+(8*breath.get_breath_partial_pressure(breath_gases[/datum/gas/pluoxium]))
+ var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen])
+ var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma])
+ var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide])
//-- OXY --//
@@ -98,7 +98,7 @@
//Too much oxygen! //Yes, some species may not like it.
if(safe_oxygen_max)
if((O2_pp > safe_oxygen_max) && safe_oxygen_max == 0) //I guess plasma men technically need to have a check.
- var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10
+ var/ratio = (breath_gases[/datum/gas/oxygen]/safe_oxygen_max) * 10
H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
@@ -121,18 +121,18 @@
//Too little oxygen!
if(safe_oxygen_min)
if(O2_pp < safe_oxygen_min)
- gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen][MOLES])
+ gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen])
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
- gas_breathed = breath_gases[/datum/gas/oxygen][MOLES]
+ gas_breathed = breath_gases[/datum/gas/oxygen]
H.clear_alert("not_enough_oxy")
//Exhale
- breath_gases[/datum/gas/oxygen][MOLES] -= gas_breathed
- breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
+ breath_gases[/datum/gas/oxygen] -= gas_breathed
+ breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
gas_breathed = 0
//-- Nitrogen --//
@@ -140,7 +140,7 @@
//Too much nitrogen!
if(safe_nitro_max)
if(N2_pp > safe_nitro_max)
- var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10
+ var/ratio = (breath_gases[/datum/gas/nitrogen]/safe_nitro_max) * 10
H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
H.losebreath += 2
@@ -150,18 +150,18 @@
//Too little nitrogen!
if(safe_nitro_min)
if(N2_pp < safe_nitro_min)
- gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen][MOLES])
+ gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen])
H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
- gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES]
+ gas_breathed = breath_gases[/datum/gas/nitrogen]
H.clear_alert("nitro")
//Exhale
- breath_gases[/datum/gas/nitrogen][MOLES] -= gas_breathed
- breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
+ breath_gases[/datum/gas/nitrogen] -= gas_breathed
+ breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
gas_breathed = 0
//-- CO2 --//
@@ -187,18 +187,18 @@
//Too little CO2!
if(safe_co2_min)
if(CO2_pp < safe_co2_min)
- gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide][MOLES])
+ gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide])
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
- gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES]
+ gas_breathed = breath_gases[/datum/gas/carbon_dioxide]
H.clear_alert("not_enough_co2")
//Exhale
- breath_gases[/datum/gas/carbon_dioxide][MOLES] -= gas_breathed
- breath_gases[/datum/gas/oxygen][MOLES] += gas_breathed
+ breath_gases[/datum/gas/carbon_dioxide] -= gas_breathed
+ breath_gases[/datum/gas/oxygen] += gas_breathed
gas_breathed = 0
@@ -207,7 +207,7 @@
//Too much toxins!
if(safe_toxins_max)
if(Toxins_pp > safe_toxins_max)
- var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_toxins_max) * 10
+ var/ratio = (breath_gases[/datum/gas/plasma]/safe_toxins_max) * 10
H.apply_damage_type(CLAMP(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
else
@@ -217,18 +217,18 @@
//Too little toxins!
if(safe_toxins_min)
if(Toxins_pp < safe_toxins_min)
- gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma][MOLES])
+ gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma])
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else
H.failed_last_breath = FALSE
if(H.health >= H.crit_threshold)
H.adjustOxyLoss(-5)
- gas_breathed = breath_gases[/datum/gas/plasma][MOLES]
+ gas_breathed = breath_gases[/datum/gas/plasma]
H.clear_alert("not_enough_tox")
//Exhale
- breath_gases[/datum/gas/plasma][MOLES] -= gas_breathed
- breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
+ breath_gases[/datum/gas/plasma] -= gas_breathed
+ breath_gases[/datum/gas/carbon_dioxide] += gas_breathed
gas_breathed = 0
@@ -238,7 +238,7 @@
// N2O
- var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide][MOLES])
+ var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide])
if(SA_pp > SA_para_min) // Enough to make us stunned for a bit
H.Unconscious(60) // 60 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
@@ -249,7 +249,7 @@
// BZ
- var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz][MOLES])
+ var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz])
if(bz_pp > BZ_trip_balls_min)
H.hallucination += 10
H.reagents.add_reagent("bz_metabolites",5)
@@ -262,14 +262,14 @@
// Tritium
- var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium][MOLES])
+ var/trit_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/tritium])
if (trit_pp > 50)
H.radiation += trit_pp/2 //If you're breathing in half an atmosphere of radioactive gas, you fucked up.
else
H.radiation += trit_pp/10
// Nitryl
- var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl][MOLES])
+ var/nitryl_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitryl])
if (prob(nitryl_pp))
to_chat(H, "Your mouth feels like it's burning!")
if (nitryl_pp >40)
@@ -280,22 +280,22 @@
H.silent = max(H.silent, 3)
else
H.adjustFireLoss(nitryl_pp/4)
- gas_breathed = breath_gases[/datum/gas/nitryl][MOLES]
+ gas_breathed = breath_gases[/datum/gas/nitryl]
if (gas_breathed > gas_stimulation_min)
H.reagents.add_reagent("no2",1)
- breath_gases[/datum/gas/nitryl][MOLES]-=gas_breathed
+ breath_gases[/datum/gas/nitryl]-=gas_breathed
// Stimulum
- gas_breathed = breath_gases[/datum/gas/stimulum][MOLES]
+ gas_breathed = breath_gases[/datum/gas/stimulum]
if (gas_breathed > gas_stimulation_min)
var/existing = H.reagents.get_reagent_amount("stimulum")
H.reagents.add_reagent("stimulum",max(0, 1 - existing))
- breath_gases[/datum/gas/stimulum][MOLES]-=gas_breathed
+ breath_gases[/datum/gas/stimulum]-=gas_breathed
// Miasma
if (breath_gases[/datum/gas/miasma])
- var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma][MOLES])
+ var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma])
//Miasma sickness
if(prob(0.5 * miasma_pp))
@@ -334,7 +334,7 @@
// Then again, this is a purely hypothetical scenario and hardly reachable
owner.adjust_disgust(0.1 * miasma_pp)
- breath_gases[/datum/gas/miasma][MOLES]-=gas_breathed
+ breath_gases[/datum/gas/miasma]-=gas_breathed
// Clear out moods when no miasma at all
else
diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
index f0e5c35a8b..5c58380d7b 100644
--- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
+++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
@@ -90,10 +90,10 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
var/list/env_gases = environment.gases
environment.assert_gases(arglist(GLOB.hardcoded_gases))
- var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles
- var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles
- var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles
- var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles
+ var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
+ var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
+ var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
+ var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
environment.garbage_collect()
if(abs(n2_concentration - N2STANDARD) < 20)
@@ -120,8 +120,8 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
for(var/id in env_gases)
if(id in GLOB.hardcoded_gases)
continue
- var/gas_concentration = env_gases[id][MOLES]/total_moles
- to_chat(user, "[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %")
+ var/gas_concentration = env_gases[id]/total_moles
+ to_chat(user, "[GLOB.meta_gas_info[id][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %")
to_chat(user, "Temperature: [round(environment.temperature-T0C)] °C")
/obj/item/analyzer/nose/AltClick(mob/user) //Barometer output for measuring when the next storm happens