mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Methane Atmogas (#18363)
* initial port * atmolast * tank icons * defines for gas names * oop * icons * methane condensing * tank_vr merge * old icons too * tank and safe toxin levels stuff * doop * gas condensing toxins * choking methane * tank sprites for worn on mob * atmos tank sign * SM monitor * cleanup * copypasta cleanup * fixed gas sensor data * proper sensor * biome issue * standardize these * Update life.dm * Update life.dm --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber
|
||||
scrubbing_gas = list(GAS_CO2, GAS_PHORON)
|
||||
Reference in New Issue
Block a user