This commit is contained in:
Putnam
2021-06-11 05:23:24 -07:00
parent 3b25f3e199
commit eda6a4d2e2
12 changed files with 517 additions and 480 deletions
@@ -0,0 +1,37 @@
// Breathing classes are, yes, just a list of gases, associated with numbers.
// But they're very simple: pluoxium's status as O2 * 8 is represented here,
// with a single line of code, no hardcoding and special-casing across the codebase.
// Not only that, but they're very general: you could have a negative value
// to simulate asphyxiants, e.g. if I add krypton it could go into the oxygen
// breathing class at -7, simulating krypton narcosis.
/datum/breathing_class
var/list/gases = null
var/list/products = null
var/danger_reagent = null
var/low_alert_category = "not_enough_oxy"
var/low_alert_datum = /obj/screen/alert/not_enough_oxy
var/high_alert_category = "too_much_oxy"
var/high_alert_datum = /obj/screen/alert/too_much_oxy
/datum/breathing_class/oxygen
gases = list(
GAS_O2 = 1
GAS_PLUOXIUM = 8,
GAS_CO2 = -0.7, // CO2 isn't actually toxic, just an asphyxiant
)
products = list(
GAS_CO2 = 1
)
/datum/breathing_class/plasma
gases = list(
GAS_PLASMA = 1
)
products = list(
GAS_CO2 = 1
)
low_alert_category = "not_enough_tox"
low_alert_datum = /obj/screen/alert/not_enough_tox
high_alert_category = "too_much_tox"
high_alert_datum = /obj/screen/alert/too_much_tox
@@ -0,0 +1,170 @@
/datum/gas/oxygen
id = GAS_O2
specific_heat = 20
name = "Oxygen"
oxidation_temperature = T0C - 100 // it checks max of this and fire temperature, so rarely will things spontaneously combust
/datum/gas/nitrogen
id = GAS_N2
specific_heat = 20
breath_alert_info = list(
not_enough_alert = list(
alert_category = "not_enough_nitro",
alert_type = /obj/screen/alert/not_enough_nitro
)
too_much_alert = list(
alert_category = "too_much_nitro",
alert_type = /obj/screen/alert/too_much_nitro
)
)
name = "Nitrogen"
/datum/gas/carbon_dioxide //what the fuck is this?
id = GAS_CO2
specific_heat = 30
name = "Carbon Dioxide"
breath_results = GAS_O2
breath_alert_info = list(
not_enough_alert = list(
alert_category = "not_enough_co2",
alert_type = /obj/screen/alert/not_enough_co2
)
too_much_alert = list(
alert_category = "too_much_co2",
alert_type = /obj/screen/alert/too_much_co2
)
)
breath_reagent_dangerous = /datum/reagent/co2_toxic
fusion_power = 3
/datum/gas/plasma
id = GAS_PLASMA
specific_heat = 200
name = "Plasma"
gas_overlay = "plasma"
moles_visible = MOLES_GAS_VISIBLE
flags = GAS_FLAG_DANGEROUS
// no fire info cause it has its own bespoke reaction for trit generation reasons
/datum/gas/water_vapor
id = GAS_H2O
specific_heat = 40
name = "Water Vapor"
gas_overlay = "water_vapor"
moles_visible = MOLES_GAS_VISIBLE
fusion_power = 8
breath_reagent = /datum/reagent/water
/datum/gas/hypernoblium
id = GAS_HYPERNOB
specific_heat = 2000
name = "Hyper-noblium"
gas_overlay = "freon"
moles_visible = MOLES_GAS_VISIBLE
/datum/gas/nitrous_oxide
id = GAS_NITROUS
specific_heat = 40
name = "Nitrous Oxide"
gas_overlay = "nitrous_oxide"
moles_visible = MOLES_GAS_VISIBLE * 2
flags = GAS_FLAG_DANGEROUS
fire_products = list(GAS_N2 = 1)
oxidation_rate = 0.5
oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + 100
/datum/gas/nitryl
id = GAS_NITRYL
specific_heat = 20
name = "Nitryl"
gas_overlay = "nitryl"
moles_visible = MOLES_GAS_VISIBLE
flags = GAS_FLAG_DANGEROUS
fusion_power = 15
fire_products = list(GAS_N2 = 0.5)
oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
/datum/gas/tritium
id = GAS_TRITIUM
specific_heat = 10
name = "Tritium"
gas_overlay = "tritium"
moles_visible = MOLES_GAS_VISIBLE
flags = GAS_FLAG_DANGEROUS
fusion_power = 1
/*
these are for when we add hydrogen, trit gets to keep its hardcoded fire for legacy reasons
fire_provides = list(GAS_H2O = 2)
fire_burn_rate = 2
fire_energy_released = FIRE_HYDROGEN_ENERGY_RELEASED
fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
*/
/datum/gas/bz
id = GAS_BZ
specific_heat = 20
name = "BZ"
flags = GAS_FLAG_DANGEROUS
fusion_power = 8
/datum/gas/stimulum
id = GAS_STIMULUM
specific_heat = 5
name = "Stimulum"
fusion_power = 7
/datum/gas/pluoxium
id = GAS_PLUOXIUM
specific_heat = 80
name = "Pluoxium"
fusion_power = 10
oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + 100
oxidation_rate = 8
/datum/gas/miasma
id = GAS_MIASMA
specific_heat = 20
fusion_power = 50
name = "Miasma"
gas_overlay = "miasma"
moles_visible = MOLES_GAS_VISIBLE * 60
/datum/gas/methane
id = GAS_METHANE
specific_heat = 30
name = "Methane"
breath_results = GAS_METHYL_BROMIDE
fire_provides = list(GAS_CO2 = 1, GAS_H2O = 2)
fire_burn_rate = 0.5
breath_alert_info = list(
not_enough_alert = list(
alert_category = "not_enough_ch4",
alert_type = /obj/screen/alert/not_enough_ch4
)
too_much_alert = list(
alert_category = "too_much_ch4",
alert_type = /obj/screen/alert/too_much_ch4
)
)
fire_energy_released = FIRE_CARBON_ENERGY_RELEASED
fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
/datum/gas/methyl_bromide
id = GAS_METHYL_BROMIDE
specific_heat = 42
name = "Methyl Bromide"
flags = GAS_FLAG_DANGEROUS
breath_alert_info = list(
not_enough_alert = list(
alert_category = "not_enough_ch3br",
alert_type = /obj/screen/alert/not_enough_ch3br
)
too_much_alert = list(
alert_category = "too_much_ch3br",
alert_type = /obj/screen/alert/too_much_ch3br
)
)
fire_provides = list(GAS_CO2 = 1, GAS_H2O = 1.5, GAS_BZ = 0.5)
fire_energy_released = FIRE_CARBON_ENERGY_RELEASED
fire_burn_rate = 0.5
fire_temperature = 808 // its autoignition, it apparently doesn't spark readily, so i don't put it lower