diff --git a/baystation12.dme b/baystation12.dme
index 9e229bc0498..b5702e3068f 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -3289,6 +3289,7 @@
#include "code\modules\tgs\includes.dm"
#include "code\modules\trading_stations\_faction.dm"
#include "code\modules\trading_stations\_trading_station.dm"
+#include "code\modules\trading_stations\trading_station_types\0_always_spawn\atmos.dm"
#include "code\modules\trading_stations\trading_station_types\0_always_spawn\engineering.dm"
#include "code\modules\trading_stations\trading_station_types\0_always_spawn\eva.dm"
#include "code\modules\trading_stations\trading_station_types\0_always_spawn\materials.dm"
diff --git a/code/__defines/supply.dm b/code/__defines/supply.dm
index c03b4a6a7fc..48f6dbdb935 100644
--- a/code/__defines/supply.dm
+++ b/code/__defines/supply.dm
@@ -24,6 +24,8 @@
#define TRADE_CAT_MEDKIT "Medical Kits"
#define TRADE_CAT_CHEMICAL "Chemical"
#define TRADE_CAT_CHEMCARTS "Chemical Cartridges"
+#define TRADE_CAT_CANISTERS "Gas Canisters"
+#define TRADE_CAT_MACHINES "Machinery"
// As in - faction is a part of us
#define FACTION_STATE_PROTECTORATE 4
diff --git a/code/_helpers/atmospherics.dm b/code/_helpers/atmospherics.dm
index f5b593a5f2b..7768dcfb116 100644
--- a/code/_helpers/atmospherics.dm
+++ b/code/_helpers/atmospherics.dm
@@ -14,14 +14,3 @@
/proc/print_atmos_analysis(user, var/list/result)
for(var/line in result)
to_chat(user, "[line]")
-
-/proc/GetGasDatum(gas_id)
- if(!(gas_id in gas_data.gases))
- return null
- var/list/all_gases = decls_repository.get_decls_of_subtype(/decl/xgm_gas)
- for(var/type in all_gases)
- var/decl/xgm_gas/gas = all_gases[type]
- if(gas_id != gas.id)
- continue
- return gas
- return null
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 3a73dd94d60..178b4b45fc1 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -174,6 +174,24 @@
GAS_CHLORINE = -1
)
+/obj/machinery/portable_atmospherics/canister/tritium
+ name = "gas canister \[Tritium\]"
+ icon_state = "green"
+ canister_color = "green"
+ can_label = FALSE
+ initial_gases = list(
+ GAS_TRITIUM = -1
+ )
+
+/obj/machinery/portable_atmospherics/canister/deuterium
+ name = "gas canister \[Deuterium\]"
+ icon_state = "green"
+ canister_color = "green"
+ can_label = FALSE
+ initial_gases = list(
+ GAS_DEUTERIUM = -1
+ )
+
/obj/machinery/portable_atmospherics/canister/air/airlock
start_pressure = 3 * ONE_ATMOSPHERE
@@ -219,6 +237,14 @@
icon_state = "purple"
canister_type = /obj/machinery/portable_atmospherics/canister/hydrogen
+/obj/machinery/portable_atmospherics/canister/empty/tritium
+ icon_state = "green"
+ canister_type = /obj/machinery/portable_atmospherics/canister/tritium
+
+/obj/machinery/portable_atmospherics/canister/empty/deuterium
+ icon_state = "green"
+ canister_type = /obj/machinery/portable_atmospherics/canister/deuterium
+
/obj/machinery/portable_atmospherics/canister/proc/check_change()
diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm
index 8895e5eb9e8..d5ce74fd8a3 100644
--- a/code/modules/hydroponics/seed.dm
+++ b/code/modules/hydroponics/seed.dm
@@ -891,10 +891,7 @@
. += 15
for(var/gas_id in exude_gasses)
- var/decl/xgm_gas/gas = GetGasDatum(gas_id)
- if(!istype(gas))
- continue
- . += gas.value * exude_gasses[gas_id]
+ . += gas_data.value[gas_id] * exude_gasses[gas_id]
if(check_chems)
for(var/chem in chems)
diff --git a/code/modules/item_worth/value_procs.dm b/code/modules/item_worth/value_procs.dm
index 797f5e9366d..e89cfd7adde 100644
--- a/code/modules/item_worth/value_procs.dm
+++ b/code/modules/item_worth/value_procs.dm
@@ -104,16 +104,12 @@
/obj/item/tank/Value(base)
. = ..()
for(var/gas_id in air_contents.gas)
- var/decl/xgm_gas/gas = GetGasDatum(gas_id)
- if(!istype(gas))
- continue
- . += gas.value * air_contents.gas[gas_id]
+ . += gas_data.value[gas_id] * air_contents.gas[gas_id]
+ . = round(.)
// Mostly for canisters
/obj/machinery/portable_atmospherics/Value(base)
. = ..()
for(var/gas_id in air_contents.gas)
- var/decl/xgm_gas/gas = GetGasDatum(gas_id)
- if(!istype(gas))
- continue
- . += gas.value * air_contents.gas[gas_id]
+ . += gas_data.value[gas_id] * air_contents.gas[gas_id]
+ . = round(.)
diff --git a/code/modules/trading_stations/trading_station_types/0_always_spawn/atmos.dm b/code/modules/trading_stations/trading_station_types/0_always_spawn/atmos.dm
new file mode 100644
index 00000000000..5b10a00d755
--- /dev/null
+++ b/code/modules/trading_stations/trading_station_types/0_always_spawn/atmos.dm
@@ -0,0 +1,44 @@
+/datum/trading_station/atmospherics
+ name_pool = list(
+ "FTB \"Deuterium Star\"" = "Free Trade Beacon \"Deuterium Star\": All the gases of the world in convenient packaging.",
+ "FTB \"Breathe-Easy\"" = "Free Trade Beacon \"Breathe-Easy\": Fill those corridors with fresh-fresh air!",
+ )
+ uid = "atmospherics"
+ unlock_favor = 9000
+ random_factions = list(
+ FACTION_INDEPENDENT,
+ FACTION_ISC,
+ )
+ spawn_always = TRUE
+ markup = 1.4
+ inventory = list(
+ TRADE_CAT_EQUIPMENT = list(
+ /obj/item/tank/oxygen = GOODS_DEFAULT,
+ /obj/item/tank/nitrogen = GOODS_DEFAULT,
+ /obj/item/tank/emergency/oxygen = GOODS_DEFAULT,
+ /obj/item/tank/emergency/oxygen/double = GOODS_DEFAULT,
+ /obj/item/tank/jetpack/carbondioxide = GOODS_DEFAULT,
+ /obj/item/tank/jetpack/oxygen = GOODS_DEFAULT,
+ ),
+ TRADE_CAT_CANISTERS = list(
+ /obj/machinery/portable_atmospherics/canister/empty = CUSTOM_GOODS_NAME("empty canister"),
+ /obj/machinery/portable_atmospherics/canister/oxygen = GOODS_DEFAULT,
+ /obj/machinery/portable_atmospherics/canister/nitrogen = GOODS_DEFAULT,
+ /obj/machinery/portable_atmospherics/canister/air = GOODS_DEFAULT,
+ /obj/machinery/portable_atmospherics/canister/carbon_dioxide = GOODS_DEFAULT,
+ /obj/machinery/portable_atmospherics/canister/phoron = GOODS_DEFAULT,
+ ),
+ TRADE_CAT_MACHINES = list(
+ /obj/machinery/portable_atmospherics/powered/pump = GOODS_DEFAULT,
+ /obj/machinery/portable_atmospherics/powered/scrubber = GOODS_DEFAULT,
+ ),
+ )
+ hidden_inventory = list(
+ TRADE_CAT_EQUIPMENT = list(
+ /obj/item/tank/jetpack/ascent = CUSTOM_GOODS_NAME("unidentified alien jetpack"),
+ ),
+ TRADE_CAT_CANISTERS = list(
+ /obj/machinery/portable_atmospherics/canister/tritium = GOODS_DEFAULT,
+ /obj/machinery/portable_atmospherics/canister/deuterium = GOODS_DEFAULT,
+ ),
+ )
diff --git a/code/modules/xgm/gases.dm b/code/modules/xgm/gases.dm
index 568d52b5711..282c149ff13 100644
--- a/code/modules/xgm/gases.dm
+++ b/code/modules/xgm/gases.dm
@@ -7,7 +7,7 @@
breathed_product = /datum/reagent/oxygen
symbol_html = "O2"
symbol = "O2"
- value = 4
+ value = 3
/decl/xgm_gas/nitrogen
@@ -17,7 +17,7 @@
molar_mass = 0.028 // kg/mol
symbol_html = "N2"
symbol = "N2"
- value = 2
+ value = 1.5
/decl/xgm_gas/carbon_dioxide
id = GAS_CO2
@@ -26,7 +26,7 @@
molar_mass = 0.044 // kg/mol
symbol_html = "CO2"
symbol = "CO2"
- value = 4
+ value = 3
/decl/xgm_gas/methyl_bromide
id = GAS_METHYL_BROMIDE
@@ -36,7 +36,7 @@
breathed_product = /datum/reagent/toxin/methyl_bromide
symbol_html = "CH3Br"
symbol = "CH3Br"
- value = 8
+ value = 6
/decl/xgm_gas/phoron
id = GAS_PHORON
@@ -57,7 +57,7 @@
breathed_product = /datum/reagent/toxin/phoron
symbol_html = "Ph"
symbol = "Ph"
- value = 12
+ value = 8
/decl/xgm_gas/sleeping_agent
id = GAS_N2O
@@ -68,7 +68,7 @@
breathed_product = /datum/reagent/nitrous_oxide
symbol_html = "N2O"
symbol = "N2O"
- value = 3
+ value = 2
/decl/xgm_gas/methane
id = GAS_METHANE
@@ -78,7 +78,7 @@
flags = XGM_GAS_FUEL
symbol_html = "CH4"
symbol = "CH4"
- value = 3
+ value = 2
/decl/xgm_gas/alium
id = GAS_ALIEN
@@ -117,21 +117,21 @@
burn_product = GAS_STEAM
symbol_html = "H2"
symbol = "H2"
- value = 10
+ value = 5
/decl/xgm_gas/hydrogen/deuterium
id = GAS_DEUTERIUM
name = "Deuterium"
symbol_html = "D"
symbol = "D"
- value = 10
+ value = 12
/decl/xgm_gas/hydrogen/tritium
id = GAS_TRITIUM
name = "Tritium"
symbol_html = "T"
symbol = "T"
- value = 15
+ value = 12
/decl/xgm_gas/helium
id = GAS_HELIUM
@@ -142,7 +142,7 @@
breathed_product = /datum/reagent/helium
symbol_html = "He"
symbol = "He"
- value = 7
+ value = 5
/decl/xgm_gas/argon
id = GAS_ARGON
@@ -151,7 +151,7 @@
molar_mass = 0.018 // kg/mol
symbol_html = "Ar"
symbol = "Ar"
- value = 25
+ value = 15
// If narcosis is ever simulated, krypton has a narcotic potency seven times greater than regular airmix.
/decl/xgm_gas/krypton
@@ -161,7 +161,7 @@
molar_mass = 0.036 // kg/mol
symbol_html = "Kr"
symbol = "Kr"
- value = 25
+ value = 20
/decl/xgm_gas/neon
id = GAS_NEON
@@ -192,6 +192,7 @@
breathed_product = /datum/reagent/toxin
symbol_html = "NO2"
symbol = "NO2"
+ value = 2
/decl/xgm_gas/nitricoxide
id = GAS_NO
@@ -202,7 +203,7 @@
flags = XGM_GAS_OXIDIZER
symbol_html = "NO"
symbol = "NO"
- value = 15
+ value = 10
/decl/xgm_gas/chlorine
id = GAS_CHLORINE
@@ -215,7 +216,7 @@
breathed_product = /datum/reagent/toxin/chlorine
symbol_html = "Cl"
symbol = "Cl"
- value = 7
+ value = 5
/decl/xgm_gas/vapor
id = GAS_STEAM
@@ -239,7 +240,7 @@
molar_mass = 0.044 // kg/mol
symbol_html = "SO2"
symbol = "SO2"
- value = 12
+ value = 10
/decl/xgm_gas/ammonia
id = GAS_AMMONIA
@@ -260,4 +261,4 @@
breathed_product = /datum/reagent/carbon_monoxide
symbol_html = "CO"
symbol = "CO"
- value = 5
+ value = 4
diff --git a/code/modules/xgm/xgm_gas_data.dm b/code/modules/xgm/xgm_gas_data.dm
index 481a411380d..6f970275010 100644
--- a/code/modules/xgm/xgm_gas_data.dm
+++ b/code/modules/xgm/xgm_gas_data.dm
@@ -32,6 +32,9 @@
var/list/symbol_html = list()
var/list/symbol = list()
+ //Values
+ var/list/value = list()
+
/decl/xgm_gas
var/id = ""
var/name = "Unnamed Gas"
@@ -56,7 +59,7 @@
/hook/startup/proc/generateGasData()
gas_data = new
- for(var/p in (typesof(/decl/xgm_gas) - /decl/xgm_gas))
+ for(var/p in subtypesof(/decl/xgm_gas))
var/decl/xgm_gas/gas = new p //avoid initial() because of potential New() actions
if(gas.id in gas_data.gases)
@@ -83,6 +86,8 @@
gas_data.breathed_product[gas.id] = gas.breathed_product
gas_data.hidden_from_codex[gas.id] = gas.hidden_from_codex
+ gas_data.value[gas.id] = gas.value
+
return 1
/obj/effect/gas_overlay
diff --git a/icons/obj/atmos.dmi b/icons/obj/atmos.dmi
index 4d51b4e6f8c..dd9990df312 100644
Binary files a/icons/obj/atmos.dmi and b/icons/obj/atmos.dmi differ