diff --git a/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm b/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm
index 9b00134cde0..3f53dd368b0 100644
--- a/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/_omni_extras.dm
@@ -10,6 +10,8 @@
#define ATM_CO2 5
#define ATM_P 6 //Phoron
#define ATM_N2O 7
+#define ATM_METHANE 8
+#define ATM_LASTGAS 8 // Keep updated to match the latest gas in list above
//--------------------------------------------
// Omni port datum
@@ -104,5 +106,7 @@
return GAS_PHORON
if(ATM_N2O)
return GAS_N2O
+ if(ATM_METHANE)
+ return GAS_CH4
else
return null
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index f848f9f50d1..251d7e83f57 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -51,7 +51,7 @@
input = P
if(ATM_OUTPUT)
output = P
- if(ATM_O2 to ATM_N2O)
+ if(ATM_O2 to ATM_LASTGAS)
atmos_filters += P
if(any_updated)
rebuild_filtering_list()
@@ -120,7 +120,7 @@
if(ATM_OUTPUT)
output = 1
atmo_filter = 0
- if(ATM_O2 to ATM_N2O)
+ if(ATM_O2 to ATM_LASTGAS)
f_type = mode_send_switch(P.mode)
portData[++portData.len] = list("dir" = dir_name(P.dir, capitalize = 1), \
@@ -140,15 +140,17 @@
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_send_switch(var/mode = ATM_NONE)
switch(mode)
if(ATM_O2)
- return "Oxygen"
+ return GASNAME_O2
if(ATM_N2)
- return "Nitrogen"
+ return GASNAME_N2
if(ATM_CO2)
- return "Carbon Dioxide"
+ return GASNAME_CO2
if(ATM_P)
- return "Phoron" //*cough* Plasma *cough*
+ return GASNAME_PHORON //*cough* Plasma *cough*
if(ATM_N2O)
- return "Nitrous Oxide"
+ return GASNAME_N2O
+ if(ATM_METHANE)
+ return GASNAME_CH4
else
return null
@@ -182,7 +184,7 @@
if("switch_filter")
if(!configuring || use_power)
return
- var/new_filter = tgui_input_list(ui.user, "Select filter mode:", "Change filter", list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide"))
+ var/new_filter = tgui_input_list(ui.user, "Select filter mode:", "Change filter", list("None", GASNAME_O2, GASNAME_N2, GASNAME_CO2, GASNAME_PHORON, GASNAME_N2O, GASNAME_CH4))
if(!new_filter)
return
switch_filter(dir_flag(params["dir"]), mode_return_switch(new_filter))
@@ -192,16 +194,18 @@
/obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode)
switch(mode)
- if("Oxygen")
+ if(GASNAME_O2)
return ATM_O2
- if("Nitrogen")
+ if(GASNAME_N2)
return ATM_N2
- if("Carbon Dioxide")
+ if(GASNAME_CO2)
return ATM_CO2
- if("Phoron")
+ if(GASNAME_PHORON)
return ATM_P
- if("Nitrous Oxide")
+ if(GASNAME_N2O)
return ATM_N2O
+ if(GASNAME_CH4)
+ return ATM_METHANE
if("in")
return ATM_INPUT
if("out")
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 172dd77419e..223d8bf35a5 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -175,7 +175,7 @@
if(ATM_OUTPUT)
ic_on += "_out_glow"
ic_off += "_out"
- if(ATM_O2 to ATM_N2O)
+ if(ATM_O2 to ATM_LASTGAS)
ic_on += "_filter"
ic_off += "_out"
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 61aa5c698c4..971ff218957 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -25,6 +25,7 @@
2: Nitrogen: Nitrogen ONLY
3: Carbon Dioxide: Carbon Dioxide ONLY
4: Nitrous Oxide (Formerly called Sleeping Agent) (N2O)
+ 5: Methane: Methane only
*/
var/filter_type = -1
var/list/filtered_out = list()
@@ -53,6 +54,8 @@
filtered_out = list(GAS_CO2)
if(4)//removing N2O
filtered_out = list(GAS_N2O)
+ if(5)//removing CH4
+ filtered_out = list(GAS_CH4)
air1.volume = ATMOS_DEFAULT_VOLUME_FILTER
air2.volume = ATMOS_DEFAULT_VOLUME_FILTER
@@ -135,11 +138,12 @@
data["filter_types"] = list()
data["filter_types"] += list(list("name" = "Nothing", "f_type" = -1, "selected" = filter_type == -1))
- data["filter_types"] += list(list("name" = "Phoron", "f_type" = 0, "selected" = filter_type == 0))
- data["filter_types"] += list(list("name" = "Oxygen", "f_type" = 1, "selected" = filter_type == 1))
- data["filter_types"] += list(list("name" = "Nitrogen", "f_type" = 2, "selected" = filter_type == 2))
- data["filter_types"] += list(list("name" = "Carbon Dioxide", "f_type" = 3, "selected" = filter_type == 3))
- data["filter_types"] += list(list("name" = "Nitrous Oxide", "f_type" = 4, "selected" = filter_type == 4))
+ data["filter_types"] += list(list("name" = GASNAME_PHORON, "f_type" = 0, "selected" = filter_type == 0))
+ data["filter_types"] += list(list("name" = GASNAME_O2, "f_type" = 1, "selected" = filter_type == 1))
+ data["filter_types"] += list(list("name" = GASNAME_N2, "f_type" = 2, "selected" = filter_type == 2))
+ data["filter_types"] += list(list("name" = GASNAME_CO2, "f_type" = 3, "selected" = filter_type == 3))
+ data["filter_types"] += list(list("name" = GASNAME_N2O, "f_type" = 4, "selected" = filter_type == 4))
+ data["filter_types"] += list(list("name" = GASNAME_CH4, "f_type" = 5, "selected" = filter_type == 5))
return data
@@ -176,6 +180,8 @@
filtered_out += GAS_CO2
if(4)//removing N2O
filtered_out += GAS_N2O
+ if(5)//removing CH4
+ filtered_out += GAS_CH4
add_fingerprint(ui.user)
update_icon()
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 3979734143c..343ce5e96df 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -19,7 +19,7 @@
var/datum/radio_frequency/radio_connection
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
- var/list/scrubbing_gas = list(GAS_CO2, GAS_PHORON)
+ var/list/scrubbing_gas = list(GAS_CO2, GAS_PHORON, GAS_CH4)
var/panic = 0 //is this scrubber panicked?
@@ -115,6 +115,7 @@
"filter_phoron" = (GAS_PHORON in scrubbing_gas),
"filter_n2o" = (GAS_N2O in scrubbing_gas),
"filter_fuel" = (GAS_VOLATILE_FUEL in scrubbing_gas),
+ "filter_ch4" = (GAS_CH4 in scrubbing_gas),
"sigtype" = "status"
)
if(!initial_loc.air_scrub_names[id_tag])
@@ -241,6 +242,11 @@
else if(signal.data["toggle_fuel_scrub"])
toggle += GAS_VOLATILE_FUEL
+ if(!isnull(signal.data["ch4_scrub"]) && text2num(signal.data["ch4_scrub"]) != (GAS_CH4 in scrubbing_gas))
+ toggle += GAS_CH4
+ else if(signal.data["toggle_ch4_scrub"])
+ toggle += GAS_CH4
+
scrubbing_gas ^= toggle
if(signal.data["init"] != null)
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber_vr.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber_vr.dm
deleted file mode 100644
index 92869d88118..00000000000
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber_vr.dm
+++ /dev/null
@@ -1,2 +0,0 @@
-/obj/machinery/atmospherics/unary/vent_scrubber
- scrubbing_gas = list(GAS_CO2, GAS_PHORON)
diff --git a/code/ATMOSPHERICS/pipes/tank.dm b/code/ATMOSPHERICS/pipes/tank.dm
index 029e3fef26c..c9654a6068a 100644
--- a/code/ATMOSPHERICS/pipes/tank.dm
+++ b/code/ATMOSPHERICS/pipes/tank.dm
@@ -2,7 +2,7 @@
// Tanks - These are implemented as pipes with large volume
//
/obj/machinery/atmospherics/pipe/tank
- icon = 'icons/atmos/tank_vr.dmi' //VOREStation Edit - New Icons
+ icon = 'icons/atmos/tank.dmi'
icon_state = "air_map"
name = "Pressure Tank"
@@ -158,3 +158,17 @@
. = ..()
icon_state = "n2o"
+
+/obj/machinery/atmospherics/pipe/tank/methane
+ name = "Pressure Tank (Methane)"
+ icon_state = "ch4_map"
+ connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_FUEL
+
+/obj/machinery/atmospherics/pipe/tank/methane/Initialize(mapload)
+ . = ..()
+ air_temporary = new
+ air_temporary.volume = volume
+ air_temporary.temperature = T20C
+
+ air_temporary.adjust_gas(GAS_CH4, (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
+ icon_state = "ch4"
diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm
index 08157f8ee99..22c91cd0bbe 100644
--- a/code/ZAS/Turf.dm
+++ b/code/ZAS/Turf.dm
@@ -237,7 +237,7 @@
//Create gas mixture to hold data for passing
var/datum/gas_mixture/GM = new
- GM.adjust_multi(GAS_O2, oxygen, GAS_CO2, carbon_dioxide, GAS_N2, nitrogen, GAS_PHORON, phoron)
+ GM.adjust_multi(GAS_O2, oxygen, GAS_CO2, carbon_dioxide, GAS_N2, nitrogen, GAS_PHORON, phoron, GAS_N2O, nitrous_oxide, GAS_CH4, methane)
GM.temperature = temperature
return GM
@@ -245,12 +245,14 @@
/turf/remove_air(amount as num)
var/datum/gas_mixture/GM = new
- var/sum = oxygen + carbon_dioxide + nitrogen + phoron
+ var/sum = oxygen + carbon_dioxide + nitrogen + phoron + nitrous_oxide + methane
if(sum>0)
- GM.gas[GAS_O2] = (oxygen/sum)*amount
- GM.gas[GAS_CO2] = (carbon_dioxide/sum)*amount
- GM.gas[GAS_N2] = (nitrogen/sum)*amount
- GM.gas[GAS_PHORON] = (phoron/sum)*amount
+ GM.gas[GAS_O2] = (oxygen / sum) * amount
+ GM.gas[GAS_CO2] = (carbon_dioxide / sum) * amount
+ GM.gas[GAS_N2] = (nitrogen / sum) * amount
+ GM.gas[GAS_PHORON] = (phoron / sum) * amount
+ GM.gas[GAS_N2O] = (nitrous_oxide / sum) * amount
+ GM.gas[GAS_CH4] = (methane / sum) * amount
GM.temperature = temperature
GM.update_values()
@@ -293,7 +295,7 @@
/turf/proc/make_air()
air = new/datum/gas_mixture
air.temperature = temperature
- air.adjust_multi(GAS_O2, oxygen, GAS_CO2, carbon_dioxide, GAS_N2, nitrogen, GAS_PHORON, phoron)
+ air.adjust_multi(GAS_O2, oxygen, GAS_CO2, carbon_dioxide, GAS_N2, nitrogen, GAS_PHORON, phoron, GAS_N2O, nitrous_oxide, GAS_CH4, methane)
air.group_multiplier = 1
air.volume = CELL_VOLUME
diff --git a/code/__defines/_reagents.dm b/code/__defines/_reagents.dm
index 837fc895fbc..ab43653eccc 100644
--- a/code/__defines/_reagents.dm
+++ b/code/__defines/_reagents.dm
@@ -6,21 +6,26 @@
// Gasses
#define GAS_CO2 "carbon_dioxide"
+#define GASNAME_CO2 "Carbon Dioxide"
#define GAS_N2 "nitrogen"
+#define GASNAME_N2 "Nitrogen"
#define GAS_N2O "nitrous_oxide"
+#define GASNAME_N2O "Nitrous Oxide"
#define GAS_O2 "oxygen"
+#define GASNAME_O2 "Oxygen"
#define GAS_PHORON "phoron"
+#define GASNAME_PHORON "Phoron"
#define GAS_VOLATILE_FUEL "volatile_fuel"
+#define GASNAME_VOLATILE_FUEL "Volatile Fuel"
+#define GAS_CH4 "methane"
+#define GASNAME_CH4 "Methane"
// Gas Reagents
-#define REAGENT_CARBON_DIOXIDE "Carbon Dioxide"
#define REAGENT_NITROGEN "Nitrogen"
#define REAGENT_ID_NITROGEN "nitrogen"
-#define REAGENT_NITROUS_OXIDE "Nitrous Oxide"
#define REAGENT_OXYGEN "Oxygen"
#define REAGENT_ID_OXYGEN "oxygen"
-#define REAGENT_VOLATILE_FUEL "Volatile Fuel"
#define REAGENT_HYDROGEN "Hydrogen"
#define REAGENT_ID_HYDROGEN "hydrogen"
#define REAGENT_FLUORINE "Fluorine"
diff --git a/code/__defines/atmos.dm b/code/__defines/atmos.dm
index 76aaa064e39..7a7b22d4aa2 100644
--- a/code/__defines/atmos.dm
+++ b/code/__defines/atmos.dm
@@ -94,6 +94,7 @@
#define ATMOSTANK_CO2 25000 // CO2 and PH are not critically important for station, only for toxins and alternative coolants, no need to store a lot of those.
#define ATMOSTANK_PHORON 25000
#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters?
+#define ATMOSTANK_METHANE 5000 // Methane! Lowest tank pressure, because it's not really useful anyway except as a dump tank
// Used in various things like tanks and oxygen pumps.
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index 33d6441bb1c..47cceeb0bd9 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -153,6 +153,17 @@ The box in your backpack has an oxygen tank and gas mask in it."
name = "Choking (No Breath)"
desc = "The atmosphere around you lacks any form of breathable air! Find some good air before you pass out!"
icon_state = "not_enough_oxy"
+
+/obj/screen/alert/methane_in_air
+ name = "Choking (Methane)"
+ desc = "There's highly flammable methane in the air, making it hard to breathe. Find some fresh air. \
+The box in your backpack has an oxygen tank and gas mask in it."
+ icon_state = "not_enough_oxy"
+
+/obj/screen/alert/not_enough_methane
+ name = "Choking (No Methane)"
+ desc = "You're not getting enough methane. Find some good air before you pass out!"
+ icon_state = "not_enough_tox"
//End gas alerts
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 2e2ae58a934..38a4c4f44f6 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -409,6 +409,12 @@
else
contents.Add(0)
+ // Grunts rejoice!
+ if (GAS_CH4)
+ if(t.air_contents.gas[GAS_CH4] && !t.air_contents.gas[GAS_O2])
+ contents.Add(t.air_contents.gas[GAS_CH4])
+ else
+ contents.Add(0)
else
//no tank so we set contents to 0
diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm
index 6fa1c5e6168..56feb0df98f 100644
--- a/code/controllers/subsystems/air.dm
+++ b/code/controllers/subsystems/air.dm
@@ -524,6 +524,10 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
return FALSE
if(A.carbon_dioxide != B.carbon_dioxide)
return FALSE
+ if(A.nitrous_oxide != B.nitrous_oxide)
+ return FALSE
+ if(A.methane != B.methane)
+ return FALSE
if(A.temperature != B.temperature)
return FALSE
return TRUE
diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm
index 9d266640cfc..01bb6505cdb 100644
--- a/code/controllers/subsystems/plants.dm
+++ b/code/controllers/subsystems/plants.dm
@@ -111,6 +111,7 @@ SUBSYSTEM_DEF(plants)
if(survive_on_station)
if(seed.consume_gasses)
seed.consume_gasses[GAS_PHORON] = null
+ seed.consume_gasses[GAS_CH4] = null
seed.consume_gasses[GAS_CO2] = null
if(seed.chems && !isnull(seed.chems[REAGENT_ID_PACID]))
seed.chems[REAGENT_ID_PACID] = null // Eating through the hull will make these plants completely inviable, albeit very dangerous.
diff --git a/code/defines/gases.dm b/code/defines/gases.dm
index 69c541655e5..d27a0dba8f7 100644
--- a/code/defines/gases.dm
+++ b/code/defines/gases.dm
@@ -1,6 +1,6 @@
/decl/xgm_gas/oxygen
id = GAS_O2
- name = REAGENT_OXYGEN
+ name = GASNAME_O2
specific_heat = 20 // J/(mol*K)
molar_mass = 0.032 // kg/mol
@@ -8,19 +8,19 @@
/decl/xgm_gas/nitrogen
id = GAS_N2
- name = REAGENT_NITROGEN
+ name = GASNAME_N2
specific_heat = 20 // J/(mol*K)
molar_mass = 0.028 // kg/mol
/decl/xgm_gas/carbon_dioxide
id = GAS_CO2
- name = REAGENT_CARBON_DIOXIDE
+ name = GASNAME_CO2
specific_heat = 30 // J/(mol*K)
molar_mass = 0.044 // kg/mol
/decl/xgm_gas/phoron
id = GAS_PHORON
- name = REAGENT_PHORON
+ name = GASNAME_PHORON
//Note that this has a significant impact on TTV yield.
//Because it is so high, any leftover phoron soaks up a lot of heat and drops the yield pressure.
@@ -37,7 +37,7 @@
/decl/xgm_gas/volatile_fuel
id = GAS_VOLATILE_FUEL
- name = REAGENT_VOLATILE_FUEL
+ name = GASNAME_VOLATILE_FUEL
specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough.
molar_mass = 0.114 // kg/mol. same.
@@ -45,10 +45,19 @@
/decl/xgm_gas/nitrous_oxide
id = GAS_N2O
- name = REAGENT_NITROUS_OXIDE
+ name = GASNAME_N2O
specific_heat = 40 // J/(mol*K)
molar_mass = 0.044 // kg/mol. N2O
tile_overlay = "nitrous_oxide"
overlay_limit = 1
flags = XGM_GAS_OXIDIZER
+
+/decl/xgm_gas/methane
+ id = GAS_CH4
+ name = GASNAME_CH4
+ specific_heat = 34 // J/(mol*K)
+ molar_mass = 0.016 // kg/mol
+ overlay_limit = 1
+ tile_overlay = "miasma"
+ flags = XGM_GAS_FUEL
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index 2c55e2cef4d..e710fc7957c 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -160,6 +160,7 @@
TLV[GAS_N2] = list(0, 0, 135, 140) // Partial pressure, kpa
TLV[GAS_CO2] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV[GAS_PHORON] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
+ TLV[GAS_CH4] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE * 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20) /* kpa */
TLV["temperature"] = list(T0C - 26, T0C, T0C + 40, T0C + 66) // K
@@ -289,6 +290,8 @@
var/co2_dangerlevel = TEST_TLV_VALUES
LOAD_TLV_VALUES(TLV[GAS_PHORON], environment.gas[GAS_PHORON]*partial_pressure)
var/phoron_dangerlevel = TEST_TLV_VALUES
+ LOAD_TLV_VALUES(TLV[GAS_CH4], environment.gas[GAS_CH4]*partial_pressure)
+ var/methane_dangerlevel = TEST_TLV_VALUES
LOAD_TLV_VALUES(TLV["temperature"], environment.temperature)
var/temperature_dangerlevel = TEST_TLV_VALUES
LOAD_TLV_VALUES(TLV["other"], other_moles*partial_pressure)
@@ -299,6 +302,7 @@
oxygen_dangerlevel,
co2_dangerlevel,
phoron_dangerlevel,
+ methane_dangerlevel,
other_dangerlevel,
temperature_dangerlevel
)
@@ -634,12 +638,13 @@
"scrubbing" = info["scrubbing"],
"panic" = info["panic"],
"filters" = list(
- list("name" = "Oxygen", "command" = "o2_scrub", "val" = info["filter_o2"]),
- list("name" = "Nitrogen", "command" = "n2_scrub", "val" = info["filter_n2"]),
- list("name" = "Carbon Dioxide", "command" = "co2_scrub","val" = info["filter_co2"]),
- list("name" = "Phoron" , "command" = "tox_scrub","val" = info["filter_phoron"]),
- list("name" = "Nitrous Oxide", "command" = "n2o_scrub","val" = info["filter_n2o"]),
- list("name" = "Volatile Fuel", "command" = "fuel_scrub","val" = info["filter_fuel"])
+ list("name" = GASNAME_O2, "command" = "o2_scrub", "val" = info["filter_o2"]),
+ list("name" = GASNAME_N2, "command" = "n2_scrub", "val" = info["filter_n2"]),
+ list("name" = GASNAME_CO2, "command" = "co2_scrub", "val" = info["filter_co2"]),
+ list("name" = GASNAME_PHORON, "command" = "tox_scrub", "val" = info["filter_phoron"]),
+ list("name" = GASNAME_CH4, "command" = "ch4_scrub", "val" = info["filter_ch4"]),
+ list("name" = GASNAME_N2O, "command" = "n2o_scrub", "val" = info["filter_n2o"]),
+ list("name" = GASNAME_VOLATILE_FUEL,"command" = "fuel_scrub", "val" = info["filter_fuel"])
)
))
data["scrubbers"] = scrubbers
@@ -658,7 +663,7 @@
var/list/selected
var/list/thresholds = list()
- var/list/gas_names = list(GAS_O2, GAS_CO2, GAS_PHORON, "other") //Gas ids made to match code\defines\gases.dm
+ var/list/gas_names = list(GAS_O2, GAS_CO2, GAS_PHORON, GAS_CH4, "other") //Gas ids made to match code\defines\gases.dm
for(var/g in gas_names)
thresholds[++thresholds.len] = list("name" = g, "settings" = list())
selected = TLV[g]
@@ -730,6 +735,7 @@
"tox_scrub",
"n2o_scrub",
"fuel_scrub",
+ "ch4_scrub",
"panic_siphon",
"scrubbing",
"direction")
@@ -864,8 +870,9 @@
. = ..()
req_access = list(ACCESS_RD, ACCESS_ATMOSPHERICS, ACCESS_ENGINE_EQUIP)
TLV[GAS_O2] = list(-1.0, -1.0,-1.0,-1.0) // Partial pressure, kpa
- TLV[GAS_CO2] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
- TLV[GAS_PHORON] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
+ TLV[GAS_CO2] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
+ TLV[GAS_PHORON] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
+ TLV[GAS_CH4] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(0,ONE_ATMOSPHERE*0.10,ONE_ATMOSPHERE*1.40,ONE_ATMOSPHERE*1.60) /* kpa */
TLV["temperature"] = list(20, 40, 140, 160) // K
diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm
index 4316dc15b0d..6eb17f90881 100644
--- a/code/game/machinery/atmo_control.dm
+++ b/code/game/machinery/atmo_control.dm
@@ -5,6 +5,7 @@
#define SENSOR_N2 (1<<4)
#define SENSOR_CO2 (1<<5)
#define SENSOR_N2O (1<<6)
+#define SENSOR_CH4 (1<<7)
/obj/machinery/air_sensor
icon = 'icons/obj/stationobjs.dmi'
@@ -59,11 +60,14 @@
signal.data[GAS_N2] = round(100*air_sample.gas[GAS_N2]/total_moles,0.1)
if(output&32)
signal.data[GAS_CO2] = round(100*air_sample.gas[GAS_CO2]/total_moles,0.1)
+ if(output&64)
+ signal.data[GAS_CH4] = round(100*air_sample.gas[GAS_CH4]/total_moles,0.1)
else
signal.data[GAS_O2] = 0
signal.data[GAS_PHORON] = 0
signal.data[GAS_N2] = 0
signal.data[GAS_CO2] = 0
+ signal.data[GAS_CH4] = 0
signal.data["sigtype"]="status"
radio_connection.post_signal(src, signal, radio_filter = RADIO_ATMOSIA)
@@ -103,13 +107,14 @@
#define ONOFF_TOGGLE(flag) "\[[(output & flag) ? "YES" : "NO"]]"
/obj/machinery/air_sensor/proc/multitool_act(mob/living/user, obj/item/multitool/tool)
var/list/options = list(
- "Pressure: [ONOFF_TOGGLE(SENSOR_PRESSURE)]" = SENSOR_PRESSURE,
- "Temperature: [ONOFF_TOGGLE(SENSOR_TEMPERATURE)]" = SENSOR_TEMPERATURE,
- "Oxygen: [ONOFF_TOGGLE(SENSOR_O2)]" = SENSOR_O2,
- "Toxins: [ONOFF_TOGGLE(SENSOR_PHORON)]" = SENSOR_PHORON,
- "Nitrogen: [ONOFF_TOGGLE(SENSOR_N2)]" = SENSOR_N2,
- "Carbon Dioxide: [ONOFF_TOGGLE(SENSOR_CO2)]" = SENSOR_CO2,
- "Nitrous Oxide: [ONOFF_TOGGLE(SENSOR_N2O)]" = SENSOR_N2O,
+ "Pressure: [ONOFF_TOGGLE(SENSOR_PRESSURE)]" = SENSOR_PRESSURE,
+ "Temperature: [ONOFF_TOGGLE(SENSOR_TEMPERATURE)]" = SENSOR_TEMPERATURE,
+ "[GASNAME_O2]: [ONOFF_TOGGLE(SENSOR_O2)]" = SENSOR_O2,
+ "[GASNAME_PHORON]: [ONOFF_TOGGLE(SENSOR_PHORON)]" = SENSOR_PHORON,
+ "[GASNAME_N2]: [ONOFF_TOGGLE(SENSOR_N2)]" = SENSOR_N2,
+ "[GASNAME_CO2]: [ONOFF_TOGGLE(SENSOR_CO2)]" = SENSOR_CO2,
+ "[GASNAME_N2O]: [ONOFF_TOGGLE(SENSOR_N2O)]" = SENSOR_N2O,
+ "[GASNAME_CH4]: [ONOFF_TOGGLE(SENSOR_CH4)]" = SENSOR_CH4,
"-SAVE TO BUFFER-" = "multitool"
)
@@ -134,6 +139,8 @@
output ^= SENSOR_CO2
if(SENSOR_N2O)
output ^= SENSOR_N2O
+ if(SENSOR_CH4)
+ output ^= SENSOR_CH4
if("frequency")
var/new_frequency = tgui_input_number(user, "[src] has a frequency of [frequency]. What would you like it to be?", "[src] frequency", frequency, RADIO_HIGH_FREQ, RADIO_LOW_FREQ)
if(new_frequency)
@@ -748,3 +755,4 @@
#undef SENSOR_N2
#undef SENSOR_CO2
#undef SENSOR_N2O
+#undef SENSOR_CH4
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index ab2c223d622..49173ae05e1 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -63,6 +63,12 @@
canister_color = "black"
can_label = 0
+/obj/machinery/portable_atmospherics/canister/methane
+ name = "Canister: \[CH4\]"
+ icon_state = "green"
+ canister_color = "green"
+ can_label = 0
+
/obj/machinery/portable_atmospherics/canister/air
name = "Canister \[Air\]"
icon_state = "grey"
@@ -97,6 +103,10 @@
icon_state = "redws"
canister_color = "redws"
+/obj/machinery/portable_atmospherics/canister/empty/methane
+ name = "Canister \[CH4\]"
+ icon_state = "green"
+ canister_color = "green"
@@ -433,6 +443,10 @@ update_flag
air_contents.adjust_gas(GAS_CO2, MolesForPressure())
update_icon()
+/obj/machinery/portable_atmospherics/canister/methane/Initialize(mapload)
+ . = ..()
+ air_contents.adjust_gas(GAS_CH4, MolesForPressure())
+ update_icon()
/obj/machinery/portable_atmospherics/canister/air/Initialize(mapload)
. = ..()
diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index 0a4a261947a..a6aabf54208 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -18,7 +18,7 @@
var/minrate = 0
var/maxrate = 10 * ONE_ATMOSPHERE
- var/list/scrubbing_gas = list(GAS_PHORON, GAS_CO2, GAS_N2O, GAS_VOLATILE_FUEL)
+ var/list/scrubbing_gas = list(GAS_PHORON, GAS_CO2, GAS_N2O, GAS_VOLATILE_FUEL, GAS_CH4)
/obj/machinery/portable_atmospherics/powered/scrubber/Initialize(mapload, skip_cell)
. = ..()
diff --git a/code/game/objects/items/devices/communicator/helper.dm b/code/game/objects/items/devices/communicator/helper.dm
index c478bf4c0a5..e2fcfbbd0a2 100644
--- a/code/game/objects/items/devices/communicator/helper.dm
+++ b/code/game/objects/items/devices/communicator/helper.dm
@@ -1,37 +1,5 @@
/obj/item/communicator/proc/analyze_air()
- var/list/results = list()
- var/turf/T = get_turf(src.loc)
- if(!isnull(T))
- var/datum/gas_mixture/environment = T.return_air()
- var/pressure = environment.return_pressure()
- var/total_moles = environment.total_moles
- if (total_moles)
- var/o2_level = environment.gas[GAS_O2]/total_moles
- var/n2_level = environment.gas[GAS_N2]/total_moles
- var/co2_level = environment.gas[GAS_CO2]/total_moles
- var/phoron_level = environment.gas[GAS_PHORON]/total_moles
- var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
-
- // Label is what the entry is describing
- // Type identifies which unit or other special characters to use
- // Val is the information reported
- // Bad_high/_low are the values outside of which the entry reports as dangerous
- // Poor_high/_low are the values outside of which the entry reports as unideal
- // Values were extracted from the template itself
- results = list(
- list("entry" = "Pressure", "units" = "kPa", "val" = "[round(pressure,0.1)]", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80),
- list("entry" = "Temperature", "units" = "\u00B0" + "C", "val" = "[round(environment.temperature-T0C,0.1)]", "bad_high" = 35, "poor_high" = 25, "poor_low" = 15, "bad_low" = 5),
- list("entry" = "Oxygen", "units" = "kPa", "val" = "[round(o2_level*100,0.1)]", "bad_high" = 140, "poor_high" = 135, "poor_low" = 19, "bad_low" = 17),
- list("entry" = "Nitrogen", "units" = "kPa", "val" = "[round(n2_level*100,0.1)]", "bad_high" = 105, "poor_high" = 85, "poor_low" = 50, "bad_low" = 40),
- list("entry" = "Carbon Dioxide", "units" = "kPa", "val" = "[round(co2_level*100,0.1)]", "bad_high" = 10, "poor_high" = 5, "poor_low" = 0, "bad_low" = 0),
- list("entry" = "Phoron", "units" = "kPa", "val" = "[round(phoron_level*100,0.01)]", "bad_high" = 0.5, "poor_high" = 0, "poor_low" = 0, "bad_low" = 0),
- list("entry" = "Other", "units" = "kPa", "val" = "[round(unknown_level, 0.01)]", "bad_high" = 1, "poor_high" = 0.5, "poor_low" = 0, "bad_low" = 0)
- )
-
- if(isnull(results))
- results = list(list("entry" = "pressure", "units" = "kPa", "val" = "0", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80))
- return results
-
+ return get_gas_mixture_default_scan_data(get_turf(src.loc))
// Proc - compile_news()
// Parameters - none
diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm
index aefa9a9a894..0beab5bedfc 100644
--- a/code/game/objects/items/weapons/tanks/tank_types.dm
+++ b/code/game/objects/items/weapons/tanks/tank_types.dm
@@ -230,3 +230,49 @@
/obj/item/tank/stasis/nitro_cryo/Initialize(mapload)
. = ..()
src.air_contents.adjust_gas_temp(GAS_N2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*TN60C), TN60C)
+
+/*
+ * Methane
+ */
+/obj/item/tank/methane
+ name = "methane tank"
+ desc = "A tank of methane."
+ icon_state = "methane"
+ distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
+
+/obj/item/tank/methane/Initialize(mapload)
+ . = ..()
+ src.air_contents.adjust_gas(GAS_CH4, (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
+
+/obj/item/tank/methane/examine(mob/user)
+ . = ..()
+ if(loc == user && (air_contents.gas[GAS_CH4] < 10))
+ . += span_danger("The meter on \the [src] indicates you are almost out of methane!")
+ //playsound(user, 'sound/effects/alert.ogg', 50, 1)
+
+/*
+ * Emergency CO2
+ */
+/obj/item/tank/emergency/carbon_dioxide
+ name = "emergency carbon dioxide tank"
+ desc = "An emergency air tank hastily painted yellow."
+ icon_state = "emergency_tst"
+ gauge_icon = "indicator_emergency"
+
+/obj/item/tank/emergency/carbon_dioxide/Initialize(mapload)
+ . = ..()
+ src.air_contents.adjust_gas(GAS_CO2, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
+
+/*
+ * Emergency Methane
+ */
+/obj/item/tank/emergency/methane
+ name = "emergency methane tank"
+ desc = "An emergency air tank hastily painted green."
+ icon_state = "emergency_methane"
+ gauge_icon = "indicator_emergency"
+ gauge_cap = 3
+
+/obj/item/tank/emergency/methane/Initialize(mapload)
+ . = ..()
+ src.air_contents.adjust_gas(GAS_CH4, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index c5b9d5ae5eb..2cd72f1081b 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -1018,6 +1018,12 @@
desc = "WARNING! O2 flow tube. Ensure the flow is disengaged before working."
icon_state = "atmos_o2"
+/obj/structure/sign/atmos_ch4
+ icon = 'icons/obj/decals.dmi'
+ name = "CH4 warning sign"
+ desc = "WARNING! CH4 flow tube. Ensure the flow is disengaged before working."
+ icon_state = "atmos_ch4"
+
/obj/structure/sign/atmos_air
icon = 'icons/obj/decals.dmi'
name = "Air warning sign"
diff --git a/code/game/turfs/flooring/flooring_premade.dm b/code/game/turfs/flooring/flooring_premade.dm
index 80840eff64a..3655d1269bf 100644
--- a/code/game/turfs/flooring/flooring_premade.dm
+++ b/code/game/turfs/flooring/flooring_premade.dm
@@ -340,11 +340,12 @@
/turf/simulated/floor/reinforced/n20
oxygen = 0
nitrogen = 0
+ nitrous_oxide = ATMOSTANK_NITROUSOXIDE
-/turf/simulated/floor/reinforced/n20/Initialize(mapload)
- . = ..()
- if(!air) make_air()
- air.adjust_gas(GAS_N2O, ATMOSTANK_NITROUSOXIDE)
+/turf/simulated/floor/reinforced/methane
+ oxygen = 0
+ nitrogen = 0
+ methane = ATMOSTANK_METHANE
/turf/simulated/floor/cult
name = "engraved floor"
diff --git a/code/game/turfs/flooring/gas_cracks.dm b/code/game/turfs/flooring/gas_cracks.dm
index fe05bdbb4ec..fa8e9082af5 100644
--- a/code/game/turfs/flooring/gas_cracks.dm
+++ b/code/game/turfs/flooring/gas_cracks.dm
@@ -119,10 +119,23 @@
. = ..()
. += "A fresh breeze blows through it."
+/turf/simulated/floor/gas_crack/methane
+ gas_type = list(GAS_CH4)
+ methane = 250
+
+/turf/simulated/floor/gas_crack/methane/pump_reagents(var/datum/reagents/R, var/volume)
+ . = ..()
+ R.add_reagent(REAGENT_ID_SULFUR, round(volume / 2, 0.1))
+ R.add_reagent(REAGENT_ID_PHOSPHORUS, round(volume / 2, 0.1))
+
+/turf/simulated/floor/gas_crack/methane/examine(mob/user)
+ . = ..()
+ . += "A terrible smell wafts from beneath it."
+
/turf/simulated/floor/gas_crack/terrible
gas_type = list(GAS_CO2,GAS_PHORON,GAS_N2O)
- carbon_dioxide = 250
+ methane = 250
phoron = 250
/turf/simulated/floor/gas_crack/terrible/pump_reagents(var/datum/reagents/R, var/volume)
@@ -157,8 +170,10 @@
gas_type.Add(GAS_O2)
if(prob(15))
gas_type.Add(GAS_N2)
+ if(prob(15))
+ gas_type.Add(GAS_CH4)
if(!gas_type.len)
- gas_type.Add(pick(list(GAS_CO2,GAS_PHORON,GAS_N2O,GAS_O2,GAS_N2)))
+ gas_type.Add(pick(list(GAS_CO2,GAS_PHORON,GAS_N2O,GAS_O2,GAS_N2,GAS_CH4)))
// Set fracking reagent
add_random_reagent()
if(prob(60))
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 8dfcc4093f1..ed5178d8266 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -11,6 +11,8 @@
var/carbon_dioxide = 0
var/nitrogen = 0
var/phoron = 0
+ var/nitrous_oxide = 0
+ var/methane = 0
//Properties for airtight tiles (/wall)
var/thermal_conductivity = 0.05
diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm
index 54c0b1fae3e..26f1165ddb9 100644
--- a/code/modules/clothing/suits/jobs.dm
+++ b/code/modules/clothing/suits/jobs.dm
@@ -174,7 +174,7 @@
icon_state = "hazard"
blood_overlay_type = "armor"
allowed = list (/obj/item/analyzer, /obj/item/flashlight, /obj/item/multitool, /obj/item/pipe_painter, /obj/item/radio, /obj/item/t_scanner,
- /obj/item/tool/crowbar, /obj/item/tool/screwdriver, /obj/item/weldingtool, /obj/item/tool/wirecutters, /obj/item/tool/wrench, /obj/item/tank/emergency/oxygen,
+ /obj/item/tool/crowbar, /obj/item/tool/screwdriver, /obj/item/weldingtool, /obj/item/tool/wirecutters, /obj/item/tool/wrench, /obj/item/tank/emergency,
/obj/item/clothing/mask/gas, /obj/item/taperoll/engineering, /obj/item/taperoll/atmos, /obj/item/analyzer, /obj/item/extinguisher/mini) //VOREStation edit. Few more tools that can be put on vests
body_parts_covered = UPPER_TORSO
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 20)
diff --git a/code/modules/events/atmos_leak.dm b/code/modules/events/atmos_leak.dm
index 907aaa62022..21246f4d0ec 100644
--- a/code/modules/events/atmos_leak.dm
+++ b/code/modules/events/atmos_leak.dm
@@ -61,6 +61,7 @@
var/gas_choices = list(GAS_CO2, GAS_N2O) // Annoying
if(severity >= EVENT_LEVEL_MODERATE)
gas_choices += GAS_PHORON // Dangerous
+ gas_choices += GAS_CH4
// if(severity >= EVENT_LEVEL_MAJOR)
// gas_choices += GAS_VOLATILE_FUEL // Dangerous and no default atmos setup!
gas_type = pick(gas_choices)
diff --git a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm
index 4ef1f536775..04291115186 100644
--- a/code/modules/gamemaster/event2/events/engineering/gas_leak.dm
+++ b/code/modules/gamemaster/event2/events/engineering/gas_leak.dm
@@ -15,7 +15,7 @@
/datum/event2/event/gas_leak
- var/potential_gas_choices = list(GAS_CO2, GAS_N2O, GAS_PHORON, GAS_VOLATILE_FUEL)
+ var/potential_gas_choices = list(GAS_CO2, GAS_N2O, GAS_PHORON, GAS_VOLATILE_FUEL, GAS_CH4)
var/chosen_gas = null
var/turf/chosen_turf = null
diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm
index 0f1a21cae11..4db95bd48ba 100644
--- a/code/modules/hydroponics/seed.dm
+++ b/code/modules/hydroponics/seed.dm
@@ -448,12 +448,12 @@
if(prob(5))
consume_gasses = list()
- var/gas = pick(GAS_O2,GAS_N2,GAS_PHORON,GAS_CO2)
+ var/gas = pick(GAS_O2,GAS_N2,GAS_PHORON,GAS_CO2,GAS_CH4)
consume_gasses[gas] = rand(3,9)
if(prob(5))
exude_gasses = list()
- var/gas = pick(GAS_O2,GAS_N2,GAS_PHORON,GAS_CO2)
+ var/gas = pick(GAS_O2,GAS_N2,GAS_PHORON,GAS_CO2,GAS_CH4)
exude_gasses[gas] = rand(3,9)
chems = list()
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index 5c228280d15..ff7f4b236fb 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -810,13 +810,14 @@
complexity = 9
inputs = list()
outputs = list(
- "pressure" = IC_PINTYPE_NUMBER,
- "temperature" = IC_PINTYPE_NUMBER,
- GAS_O2 = IC_PINTYPE_NUMBER,
- GAS_N2 = IC_PINTYPE_NUMBER,
- GAS_CO2 = IC_PINTYPE_NUMBER,
- GAS_PHORON = IC_PINTYPE_NUMBER,
- "other" = IC_PINTYPE_NUMBER
+ "pressure" = IC_PINTYPE_NUMBER,
+ "temperature" = IC_PINTYPE_NUMBER,
+ GAS_O2 = IC_PINTYPE_NUMBER,
+ GAS_N2 = IC_PINTYPE_NUMBER,
+ GAS_CO2 = IC_PINTYPE_NUMBER,
+ GAS_CH4 = IC_PINTYPE_NUMBER,
+ GAS_PHORON = IC_PINTYPE_NUMBER,
+ "other" = IC_PINTYPE_NUMBER
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
@@ -836,15 +837,17 @@
var/o2_level = environment.gas[GAS_O2]/total_moles
var/n2_level = environment.gas[GAS_N2]/total_moles
var/co2_level = environment.gas[GAS_CO2]/total_moles
+ var/methane_level = environment.gas[GAS_CH4]/total_moles
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
- var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
+ var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level+methane_level)
set_pin_data(IC_OUTPUT, 1, pressure)
set_pin_data(IC_OUTPUT, 2, round(environment.temperature-T0C,0.1))
set_pin_data(IC_OUTPUT, 3, round(o2_level*100,0.1))
set_pin_data(IC_OUTPUT, 4, round(n2_level*100,0.1))
set_pin_data(IC_OUTPUT, 5, round(co2_level*100,0.1))
set_pin_data(IC_OUTPUT, 6, round(phoron_level*100,0.01))
- set_pin_data(IC_OUTPUT, 7, round(unknown_level, 0.01))
+ set_pin_data(IC_OUTPUT, 7, round(methane_level*100,0.01))
+ set_pin_data(IC_OUTPUT, 8, round(unknown_level, 0.01))
else
set_pin_data(IC_OUTPUT, 1, 0)
set_pin_data(IC_OUTPUT, 2, -273.15)
@@ -853,6 +856,7 @@
set_pin_data(IC_OUTPUT, 5, 0)
set_pin_data(IC_OUTPUT, 6, 0)
set_pin_data(IC_OUTPUT, 7, 0)
+ set_pin_data(IC_OUTPUT, 8, 0)
push_data()
activate_pin(2)
@@ -1034,3 +1038,33 @@
set_pin_data(IC_OUTPUT, 1, 0)
push_data()
activate_pin(2)
+
+/obj/item/integrated_circuit/input/methane_sensor
+ name = "integrated methane sensor"
+ desc = "A tiny methane gas sensor module similar to that found in a PDA atmosphere analyser."
+ icon_state = "medscan_adv"
+ complexity = 3
+ inputs = list()
+ outputs = list(
+ GAS_CH4 = IC_PINTYPE_NUMBER
+ )
+ activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
+ spawn_flags = IC_SPAWN_RESEARCH
+ origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3)
+ power_draw_per_use = 20
+
+/obj/item/integrated_circuit/input/methane_sensor/do_work()
+ var/turf/T = get_turf(src)
+ if(!istype(T)) //Invalid input
+ return
+ var/datum/gas_mixture/environment = T.return_air()
+
+ var/total_moles = environment.total_moles
+
+ if (total_moles)
+ var/methane_level = environment.gas[GAS_CH4]/total_moles
+ set_pin_data(IC_OUTPUT, 1, round(methane_level*100, 0.1))
+ else
+ set_pin_data(IC_OUTPUT, 1, 0)
+ push_data()
+ activate_pin(2)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 8c84f1038ce..72d80eaf58b 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -576,6 +576,7 @@
safe_pressure_min *= 1.25
var/safe_exhaled_max = 10
+ var/safe_toxins_min = 0.05
var/safe_toxins_max = 0.2
var/SA_para_min = 1
var/SA_sleep_min = 5
@@ -584,7 +585,8 @@
var/breath_pressure = (breath.total_moles*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
var/inhaling
- var/poison
+ var/poison_toxin
+ var/poison_methane
var/exhaling
var/breath_type
@@ -604,7 +606,10 @@
poison_type = species.poison_type
else
poison_type = GAS_PHORON
- poison = breath.gas[poison_type]
+ poison_toxin = breath.gas[poison_type]
+
+ if(species.breath_type != GAS_CH4)
+ poison_methane = breath.gas[GAS_CH4]
if(species.exhale_type)
exhale_type = species.exhale_type
@@ -613,14 +618,15 @@
exhaling = 0
var/inhale_pp = (inhaling/breath.total_moles)*breath_pressure
- var/toxins_pp = (poison/breath.total_moles)*breath_pressure
+ var/toxins_pp = (poison_toxin/breath.total_moles)*breath_pressure
+ var/methane_pp = (poison_methane/breath.total_moles)*breath_pressure
// To be clear, this isn't how much they're exhaling -- it's the amount of the species exhale_gas that they just
var/exhaled_pp = (exhaling/breath.total_moles)*breath_pressure
// Not enough to breathe
if(inhale_pp < safe_pressure_min)
if(prob(20))
- spawn(0) emote("gasp")
+ emote("gasp")
if(is_below_sound_pressure(get_turf(src))) //No more popped lungs from choking/drowning. You also have ~20 seconds to get internals on before your lungs pop.
rupture_lung(TRUE)
@@ -638,6 +644,8 @@
throw_alert("oxy", /obj/screen/alert/not_enough_nitro)
if(GAS_CO2)
throw_alert("oxy", /obj/screen/alert/not_enough_co2)
+ if(GAS_CH4)
+ throw_alert("oxy", /obj/screen/alert/not_enough_methane)
if(GAS_VOLATILE_FUEL)
throw_alert("oxy", /obj/screen/alert/not_enough_fuel)
if(GAS_N2O)
@@ -681,16 +689,38 @@
var/word = pick("a little dizzy","short of breath")
to_chat(src, span_warning("You feel [word]."))
- // Too much poison in the air.
+ // Too much phoron in the air.
+ if(toxins_pp > safe_toxins_min)
+ var/SA_pp = (breath.gas[GAS_PHORON] / breath.total_moles) * breath_pressure
+ if(SA_pp > 0.05)
+ if(prob(3))
+ to_chat(src,span_warning("Something burns as you breathe."))
if(toxins_pp > safe_toxins_max)
- var/ratio = (poison/safe_toxins_max) * 10
+ var/ratio = (poison_toxin/safe_toxins_max) * 10
if(reagents)
reagents.add_reagent(REAGENT_ID_TOXIN, CLAMP(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE))
- breath.adjust_gas(poison_type, -poison/6, update = 0) //update after
+ breath.adjust_gas(poison_type, -poison_toxin/6, update = 0) //update after
throw_alert("tox_in_air", /obj/screen/alert/tox_in_air)
else
clear_alert("tox_in_air")
+ // Too much methane in the air
+ if(methane_pp > safe_toxins_min)
+ var/SA_pp = (breath.gas[GAS_CH4] / breath.total_moles) * breath_pressure
+ if(SA_pp > 0.05)
+ if(prob(5))
+ to_chat(src,span_warning("You smell rotten eggs."))
+ if(methane_pp > safe_toxins_max)
+ var/ratio = (poison_methane/safe_toxins_max) * 1200
+ adjustOxyLoss(CLAMP(ratio,0.1,10)) // Causes slow suffocation
+ if(prob(20))
+ emote("gasp")
+ breath.adjust_gas(GAS_CH4, -poison_methane/6, update = 0) //update after
+ breath.adjust_gas(GAS_CH4, -breath.gas[GAS_CH4]/6, update = 0) //update after
+ throw_alert("methane_in_air", /obj/screen/alert/methane_in_air)
+ else
+ clear_alert("methane_in_air")
+
// If there's some other shit in the air lets deal with it here.
if(breath.gas[GAS_N2O])
var/SA_pp = (breath.gas[GAS_N2O] / breath.total_moles) * breath_pressure
@@ -708,7 +738,7 @@
// There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
else if(SA_pp > 0.15)
if(prob(20))
- spawn(0) emote(pick("giggle", "laugh"))
+ emote(pick("giggle", "laugh"))
breath.adjust_gas(GAS_N2O, -breath.gas[GAS_N2O]/6, update = 0) //update after
if(get_hallucination_component()?.get_hud_state() == HUD_HALLUCINATION_OXY)
@@ -1306,13 +1336,12 @@
badorgan.damage -= 1
handle_dreams()
- if (mind)
+ if(mind)
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
if(client || sleeping > 3)
handle_sleeping()
- if( prob(2) && health && !get_hallucination_component()?.get_fakecrit() && client )
- spawn(0)
- emote("snore")
+ if(prob(2) && health && !get_hallucination_component()?.get_fakecrit() && client)
+ emote("snore")
//CONSCIOUS
else
set_stat(CONSCIOUS)
diff --git a/code/modules/mob/living/carbon/human/species/station/traits/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits/negative.dm
index 7222d91d0d6..21a95ccb221 100644
--- a/code/modules/mob/living/carbon/human/species/station/traits/negative.dm
+++ b/code/modules/mob/living/carbon/human/species/station/traits/negative.dm
@@ -188,6 +188,10 @@
desc = "You breathe nitrogen instead of oxygen (which is poisonous to you). Incidentally, phoron isn't poisonous to breathe to you."
var_changes = list("breath_type" = GAS_N2, "poison_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/nitrogen_breather)
+/datum/trait/negative/breathes/methane
+ name = "Methane Breather"
+ desc = "You breathe methane instead of oxygen (which is poisonous to you)."
+ var_changes = list("breath_type" = GAS_CH4, "poison_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/methane_breather)
/datum/trait/negative/monolingual
name = "Monolingual"
diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm
index d16c313ba98..bf7e2a8c2f3 100644
--- a/code/modules/mob/living/silicon/pai/software_modules.dm
+++ b/code/modules/mob/living/silicon/pai/software_modules.dm
@@ -332,41 +332,7 @@
/datum/pai_software/atmosphere_sensor/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
-
- var/list/results = list()
- var/turf/T = get_turf(user)
- if(!isnull(T))
- var/datum/gas_mixture/environment = T.return_air()
- var/pressure = environment.return_pressure()
- var/total_moles = environment.total_moles
- if (total_moles)
- var/o2_level = environment.gas[GAS_O2]/total_moles
- var/n2_level = environment.gas[GAS_N2]/total_moles
- var/co2_level = environment.gas[GAS_CO2]/total_moles
- var/phoron_level = environment.gas[GAS_PHORON]/total_moles
- var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
-
- // entry is what the element is describing
- // Type identifies which unit or other special characters to use
- // Val is the information reported
- // Bad_high/_low are the values outside of which the entry reports as dangerous
- // Poor_high/_low are the values outside of which the entry reports as unideal
- // Values were extracted from the template itself
- results = list(
- list("entry" = "Pressure", "units" = "kPa", "val" = "[round(pressure,0.1)]", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80),
- list("entry" = "Temperature", "units" = "°C", "val" = "[round(environment.temperature-T0C,0.1)]", "bad_high" = 35, "poor_high" = 25, "poor_low" = 15, "bad_low" = 5),
- list("entry" = "Oxygen", "units" = "kPa", "val" = "[round(o2_level*100,0.1)]", "bad_high" = 140, "poor_high" = 135, "poor_low" = 19, "bad_low" = 17),
- list("entry" = "Nitrogen", "units" = "kPa", "val" = "[round(n2_level*100,0.1)]", "bad_high" = 105, "poor_high" = 85, "poor_low" = 50, "bad_low" = 40),
- list("entry" = "Carbon Dioxide", "units" = "kPa", "val" = "[round(co2_level*100,0.1)]", "bad_high" = 10, "poor_high" = 5, "poor_low" = 0, "bad_low" = 0),
- list("entry" = "Phoron", "units" = "kPa", "val" = "[round(phoron_level*100,0.01)]", "bad_high" = 0.5, "poor_high" = 0, "poor_low" = 0, "bad_low" = 0),
- list("entry" = "Other", "units" = "kPa", "val" = "[round(unknown_level, 0.01)]", "bad_high" = 1, "poor_high" = 0.5, "poor_low" = 0, "bad_low" = 0)
- )
-
- if(isnull(results))
- results = list(list("entry" = "pressure", "units" = "kPa", "val" = "0", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80))
-
- data["aircontents"] = results
-
+ data["aircontents"] = get_gas_mixture_default_scan_data(get_turf(user))
return data
/datum/pai_software/pai_hud
diff --git a/code/modules/mob/living/simple_mob/life.dm b/code/modules/mob/living/simple_mob/life.dm
index 36e7ea8274f..a907a388424 100644
--- a/code/modules/mob/living/simple_mob/life.dm
+++ b/code/modules/mob/living/simple_mob/life.dm
@@ -161,6 +161,15 @@
else
clear_alert("co2")
+ if(min_ch4 && Environment.gas[GAS_CH4] < min_ch4)
+ atmos_unsuitable = 2
+ throw_alert("methane_in_air", /obj/screen/alert/not_enough_methane)
+ else if(max_tox && Environment.gas[GAS_CH4] > max_ch4)
+ atmos_unsuitable = 2
+ throw_alert("methane_in_air", /obj/screen/alert/methane_in_air)
+ else
+ clear_alert("methane_in_air")
+
//Atmos effect
if(bodytemperature < minbodytemp)
adjustFireLoss(cold_damage_per_tick)
diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm
index 33319e0f1bc..79f6b5089b0 100644
--- a/code/modules/mob/living/simple_mob/simple_mob.dm
+++ b/code/modules/mob/living/simple_mob/simple_mob.dm
@@ -77,6 +77,8 @@
var/max_co2 = 5 // CO2 max
var/min_n2 = 0 // N2 min
var/max_n2 = 0 // N2 max
+ var/min_ch4 = 0 // CH4 min
+ var/max_ch4 = 5 // CH4 max
var/unsuitable_atoms_damage = 2 // This damage is taken when atmos doesn't fit all the requirements above
//Hostility settings
diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm
index 7cd663b43f0..d129e906ad6 100644
--- a/code/modules/pda/core_apps.dm
+++ b/code/modules/pda/core_apps.dm
@@ -222,39 +222,7 @@
category = "Utilities"
/datum/data/pda/app/atmos_scanner/update_ui(mob/user as mob, list/data)
- var/list/results = list()
- var/turf/T = get_turf(user)
- if(!isnull(T))
- var/datum/gas_mixture/environment = T.return_air()
- var/pressure = environment.return_pressure()
- var/total_moles = environment.total_moles
- if (total_moles)
- var/o2_level = environment.gas[GAS_O2]/total_moles
- var/n2_level = environment.gas[GAS_N2]/total_moles
- var/co2_level = environment.gas[GAS_CO2]/total_moles
- var/phoron_level = environment.gas[GAS_PHORON]/total_moles
- var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
-
- // entry is what the element is describing
- // Type identifies which unit or other special characters to use
- // Val is the information reported
- // Bad_high/_low are the values outside of which the entry reports as dangerous
- // Poor_high/_low are the values outside of which the entry reports as unideal
- // Values were extracted from the template itself
- results = list(
- list("entry" = "Pressure", "units" = "kPa", "val" = "[round(pressure,0.1)]", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80),
- list("entry" = "Temperature", "units" = "\u00B0C", "val" = "[round(environment.temperature-T0C,0.1)]", "bad_high" = 35, "poor_high" = 25, "poor_low" = 15, "bad_low" = 5),
- list("entry" = "Oxygen", "units" = "kPa", "val" = "[round(o2_level*100,0.1)]", "bad_high" = 140, "poor_high" = 135, "poor_low" = 19, "bad_low" = 17),
- list("entry" = "Nitrogen", "units" = "kPa", "val" = "[round(n2_level*100,0.1)]", "bad_high" = 105, "poor_high" = 85, "poor_low" = 50, "bad_low" = 40),
- list("entry" = "Carbon Dioxide", "units" = "kPa", "val" = "[round(co2_level*100,0.1)]", "bad_high" = 10, "poor_high" = 5, "poor_low" = 0, "bad_low" = 0),
- list("entry" = "Phoron", "units" = "kPa", "val" = "[round(phoron_level*100,0.01)]", "bad_high" = 0.5, "poor_high" = 0, "poor_low" = 0, "bad_low" = 0),
- list("entry" = "Other", "units" = "kPa", "val" = "[round(unknown_level, 0.01)]", "bad_high" = 1, "poor_high" = 0.5, "poor_low" = 0, "bad_low" = 0)
- )
-
- if(isnull(results))
- results = list(list("entry" = "pressure", "units" = "kPa", "val" = "0", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80))
-
- data["aircontents"] = results
+ data["aircontents"] = get_gas_mixture_default_scan_data(get_turf(user))
/datum/data/pda/app/news
name = "News"
diff --git a/code/modules/projectiles/guns/magnetic/gasthrower.dm b/code/modules/projectiles/guns/magnetic/gasthrower.dm
index 723e68058bf..6fc3e590132 100644
--- a/code/modules/projectiles/guns/magnetic/gasthrower.dm
+++ b/code/modules/projectiles/guns/magnetic/gasthrower.dm
@@ -38,6 +38,7 @@
var/co2_amt = Tank.air_contents.gas[GAS_CO2]
var/oxy_amt = Tank.air_contents.gas[GAS_O2]
var/n2o_amt = Tank.air_contents.gas[GAS_N2O]
+ var/ch4_amt = Tank.air_contents.gas[GAS_CH4]
if(isnull(co2_amt))
co2_amt = 0
@@ -48,8 +49,11 @@
if(isnull(n2o_amt))
n2o_amt = 0
+ if(isnull(ch4_amt))
+ ch4_amt = 0
+
var/phoron_mix_proper = TRUE
- if(!phoron_amt || phoron_amt < max(0.25, 3 + co2_amt - oxy_amt - (n2o_amt / 2)))
+ if( (!phoron_amt || phoron_amt < max(0.25, 3 + co2_amt - oxy_amt - (n2o_amt / 2))) && (!ch4_amt || ch4_amt < max(0.25, 3 + co2_amt - oxy_amt - (n2o_amt / 2))) )
phoron_mix_proper = FALSE
if(Tank.air_contents.return_pressure() >= T.air.return_pressure() && phoron_mix_proper)
diff --git a/code/modules/reagents/reactions/distilling/gas_condensing.dm b/code/modules/reagents/reactions/distilling/gas_condensing.dm
index 959096ef932..70564aef029 100644
--- a/code/modules/reagents/reactions/distilling/gas_condensing.dm
+++ b/code/modules/reagents/reactions/distilling/gas_condensing.dm
@@ -95,6 +95,21 @@
rejects_xgm_gas = GAS_O2
consumes_xgm_gas = CONDENSING_RATE
+/decl/chemical_reaction/distilling/condense_methane
+ name = "Condensing Methane"
+ id = "condense_methane"
+ result = REAGENT_ID_TOXIN
+ required_reagents = list(REAGENT_ID_COOLANT = COOLANT_CONSUMPTION_RATE)
+ inhibitors = list(REAGENT_ID_TOXIN = 0.1) // Used to limit the reaction
+ result_amount = CONDENSING_RESULT
+
+ temp_range = list(90.7, 111.65) // kelvin
+ temp_shift = CONDENSING_HEAT
+
+ require_xgm_gas = GAS_CH4
+ rejects_xgm_gas = GAS_O2
+ consumes_xgm_gas = CONDENSING_RATE
+
#undef CONDENSING_RATE
#undef CONDENSING_RESULT
#undef CONDENSING_HEAT
diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm
index 884e3930652..6d58efe7db3 100644
--- a/code/modules/shuttles/shuttles_web.dm
+++ b/code/modules/shuttles/shuttles_web.dm
@@ -463,15 +463,17 @@
var/n2_level = environment.gas[GAS_N2]/total_moles
var/co2_level = environment.gas[GAS_CO2]/total_moles
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
- var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
+ var/methane_level = environment.gas[GAS_CH4]/total_moles
+ var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level+methane_level)
aircontents = list(\
- "pressure" = "[round(pressure,0.1)]",\
- GAS_N2 = "[round(n2_level*100,0.1)]",\
- GAS_O2 = "[round(o2_level*100,0.1)]",\
- GAS_CO2 = "[round(co2_level*100,0.1)]",\
- GAS_PHORON = "[round(phoron_level*100,0.01)]",\
+ "pressure" = "[round(pressure, 0.1)]",\
+ GAS_N2 = "[round(n2_level*100, 0.1)]",\
+ GAS_O2 = "[round(o2_level*100, 0.1)]",\
+ GAS_CO2 = "[round(co2_level*100, 0.1)]",\
+ GAS_PHORON = "[round(phoron_level*100, 0.01)]",\
+ GAS_CH4 = "[round(methane_level*100, 0.01)]",\
"other" = "[round(unknown_level, 0.01)]",\
- "temp" = "[round(environment.temperature-T0C,0.1)]",\
+ "temp" = "[round(environment.temperature-T0C, 0.1)]",\
"reading" = TRUE\
)
diff --git a/code/modules/tgui/modules/supermatter_monitor.dm b/code/modules/tgui/modules/supermatter_monitor.dm
index efa16985207..7799589af00 100644
--- a/code/modules/tgui/modules/supermatter_monitor.dm
+++ b/code/modules/tgui/modules/supermatter_monitor.dm
@@ -61,12 +61,14 @@
data["SM_gas_CO2"] = round(100*air.gas[GAS_CO2]/air.total_moles,0.01)
data["SM_gas_N2"] = round(100*air.gas[GAS_N2]/air.total_moles,0.01)
data["SM_gas_PH"] = round(100*air.gas[GAS_PHORON]/air.total_moles,0.01)
+ data["SM_gas_CH4"] = round(100*air.gas[GAS_CH4]/air.total_moles,0.01)
data["SM_gas_N2O"] = round(100*air.gas["sleeping_agent"]/air.total_moles,0.01)
else
data["SM_gas_O2"] = 0
data["SM_gas_CO2"] = 0
data["SM_gas_N2"] = 0
data["SM_gas_PH"] = 0
+ data["SM_gas_CH4"] = 0
data["SM_gas_N2O"] = 0
else
var/list/SMS = list()
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index 04be140733f..e88ecbca9a5 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -753,6 +753,16 @@
gas = list(
GAS_CO2 = 100)
+/datum/gas_mixture/belly_air/methane_breather
+ volume = 2500
+ temperature = 293.150
+ total_moles = 104
+
+/datum/gas_mixture/belly_air/methane_breather/New()
+ . = ..()
+ gas = list(
+ GAS_CH4 = 100)
+
/mob/living/proc/feed_grabbed_to_self_falling_nom(var/mob/living/user, var/mob/living/prey)
if(user.is_incorporeal())
return FALSE
diff --git a/code/modules/xgm/xgm_gas_mixture.dm b/code/modules/xgm/xgm_gas_mixture.dm
index d73ec26e80d..e88de6919ce 100644
--- a/code/modules/xgm/xgm_gas_mixture.dm
+++ b/code/modules/xgm/xgm_gas_mixture.dm
@@ -490,3 +490,36 @@
/datum/gas_mixture/proc/get_mass()
for(var/g in gas)
. += gas[g] * GLOB.gas_data.molar_mass[g] * group_multiplier
+
+// Global proc in this file so we can check for null turfs too
+// This was copypastaed three times for multiple gas sensors checking for default safe atmos... Lets not.
+/proc/get_gas_mixture_default_scan_data(var/turf/T)
+ if(isturf(T))
+ var/datum/gas_mixture/environment = T.return_air()
+ var/pressure = environment.return_pressure()
+ var/total_moles = environment.total_moles
+ if(total_moles)
+ var/o2_level = environment.gas[GAS_O2]/total_moles
+ var/n2_level = environment.gas[GAS_N2]/total_moles
+ var/co2_level = environment.gas[GAS_CO2]/total_moles
+ var/phoron_level = environment.gas[GAS_PHORON]/total_moles
+ var/methane_level = environment.gas[GAS_CH4]/total_moles
+ var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level+methane_level)
+
+ // entry is what the element is describing
+ // Type identifies which unit or other special characters to use
+ // Val is the information reported
+ // Bad_high/_low are the values outside of which the entry reports as dangerous
+ // Poor_high/_low are the values outside of which the entry reports as unideal
+ // Values were extracted from the template itself
+ return list(
+ list("entry" = "Pressure", "units" = "kPa", "val" = "[round(pressure, 0.1)]", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80),
+ list("entry" = "Temperature", "units" = "°C", "val" = "[round(environment.temperature-T0C, 0.1)]","bad_high" = 35, "poor_high" = 25, "poor_low" = 15, "bad_low" = 5),
+ list("entry" = GASNAME_O2, "units" = "kPa", "val" = "[round(o2_level*100, 0.1)]", "bad_high" = 140, "poor_high" = 135, "poor_low" = 19, "bad_low" = 17),
+ list("entry" = GASNAME_N2, "units" = "kPa", "val" = "[round(n2_level*100, 0.1)]", "bad_high" = 105, "poor_high" = 85, "poor_low" = 50, "bad_low" = 40),
+ list("entry" = GASNAME_CO2, "units" = "kPa", "val" = "[round(co2_level*100, 0.1)]", "bad_high" = 10, "poor_high" = 5, "poor_low" = 0, "bad_low" = 0),
+ list("entry" = GASNAME_PHORON, "units" = "kPa", "val" = "[round(phoron_level*100, 0.01)]", "bad_high" = 0.5, "poor_high" = 0, "poor_low" = 0, "bad_low" = 0),
+ list("entry" = GASNAME_CH4, "units" = "kPa", "val" = "[round(methane_level*100, 0.01)]", "bad_high" = 0.5, "poor_high" = 0, "poor_low" = 0, "bad_low" = 0),
+ list("entry" = "Other", "units" = "kPa", "val" = "[round(unknown_level, 0.01)]", "bad_high" = 1, "poor_high" = 0.5, "poor_low" = 0, "bad_low" = 0)
+ )
+ return list(list("entry" = "pressure", "units" = "kPa", "val" = "0", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80))
diff --git a/icons/atmos/tank.dmi b/icons/atmos/tank.dmi
index 0af35c321af..fa1fbc81e90 100644
Binary files a/icons/atmos/tank.dmi and b/icons/atmos/tank.dmi differ
diff --git a/icons/atmos/tank_vr.dmi b/icons/atmos/tank_vr.dmi
deleted file mode 100644
index e7f6273a6b1..00000000000
Binary files a/icons/atmos/tank_vr.dmi and /dev/null differ
diff --git a/icons/inventory/back/mob.dmi b/icons/inventory/back/mob.dmi
index c6d07be6c9d..40606c6c6d3 100644
Binary files a/icons/inventory/back/mob.dmi and b/icons/inventory/back/mob.dmi differ
diff --git a/icons/inventory/back/mob_teshari.dmi b/icons/inventory/back/mob_teshari.dmi
index bdec7b14677..cce4a944e19 100644
Binary files a/icons/inventory/back/mob_teshari.dmi and b/icons/inventory/back/mob_teshari.dmi differ
diff --git a/icons/obj/atmos.dmi b/icons/obj/atmos.dmi
index 152280498c3..873dc500699 100644
Binary files a/icons/obj/atmos.dmi and b/icons/obj/atmos.dmi differ
diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi
index c341ba73609..cf6539f50d5 100644
Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ
diff --git a/icons/obj/tank.dmi b/icons/obj/tank.dmi
index 28987d9f771..61ff691edd3 100644
Binary files a/icons/obj/tank.dmi and b/icons/obj/tank.dmi differ
diff --git a/icons/obj/tank_vr.dmi b/icons/obj/tank_vr.dmi
index 47cc911abcb..dd03b6f9f76 100644
Binary files a/icons/obj/tank_vr.dmi and b/icons/obj/tank_vr.dmi differ
diff --git a/tgui/packages/tgui/constants.ts b/tgui/packages/tgui/constants.ts
index 6884549cd98..55685d2ef76 100644
--- a/tgui/packages/tgui/constants.ts
+++ b/tgui/packages/tgui/constants.ts
@@ -227,6 +227,12 @@ const GASES = [
label: 'N₂O',
color: 'red',
},
+ {
+ id: 'methane',
+ name: 'Methane',
+ label: 'CH₄',
+ color: 'orange',
+ },
{
id: 'other',
name: 'Other',
diff --git a/tgui/packages/tgui/interfaces/ShuttleControl/ShuttleControlConsoleWeb.tsx b/tgui/packages/tgui/interfaces/ShuttleControl/ShuttleControlConsoleWeb.tsx
index 461e6208ab1..cfda5510d93 100644
--- a/tgui/packages/tgui/interfaces/ShuttleControl/ShuttleControlConsoleWeb.tsx
+++ b/tgui/packages/tgui/interfaces/ShuttleControl/ShuttleControlConsoleWeb.tsx
@@ -251,6 +251,9 @@ export const ShuttleControlConsoleWeb = (props) => {
{sensor.phoron}%
+
+ {sensor.methane}%
+
{(sensor.other && (
{sensor.other}%
diff --git a/tgui/packages/tgui/interfaces/ShuttleControl/types.ts b/tgui/packages/tgui/interfaces/ShuttleControl/types.ts
index 4130a8c6d88..53e79134873 100644
--- a/tgui/packages/tgui/interfaces/ShuttleControl/types.ts
+++ b/tgui/packages/tgui/interfaces/ShuttleControl/types.ts
@@ -61,6 +61,7 @@ export type sensor = {
oxygen: string;
carbon_dioxide: string;
phoron: string;
+ methane: string;
other: string;
temp: string;
reading: BooleanLike;
diff --git a/tgui/packages/tgui/interfaces/SupermatterMonitor.tsx b/tgui/packages/tgui/interfaces/SupermatterMonitor.tsx
index 5651570dce2..cdac0193a9f 100644
--- a/tgui/packages/tgui/interfaces/SupermatterMonitor.tsx
+++ b/tgui/packages/tgui/interfaces/SupermatterMonitor.tsx
@@ -25,6 +25,7 @@ type Data = {
SM_gas_N2: number;
SM_gas_PH: number;
SM_gas_N2O: number;
+ SM_gas_CH4: number;
supermatters: { area_name: string; integrity: number; uid: number }[];
};
@@ -103,6 +104,7 @@ const SupermatterMonitorActive = (props) => {
SM_gas_N2,
SM_gas_PH,
SM_gas_N2O,
+ SM_gas_CH4,
} = data;
return (
@@ -193,6 +195,9 @@ const SupermatterMonitorActive = (props) => {
%
+
+ %
+
diff --git a/vorestation.dme b/vorestation.dme
index e9f79a75dc1..420bdc9385c 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -376,7 +376,6 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
-#include "code\ATMOSPHERICS\components\unary\vent_scrubber_vr.dm"
#include "code\ATMOSPHERICS\pipes\cap.dm"
#include "code\ATMOSPHERICS\pipes\he_pipes.dm"
#include "code\ATMOSPHERICS\pipes\he_pipes_vr.dm"