Merge pull request #15603 from Putnam3145/nitrogen-stuff
Some weird high-temperature reactions (including: absolute hot)
This commit is contained in:
@@ -275,6 +275,7 @@
|
||||
#define GAS_PLASMA "plasma"
|
||||
#define GAS_H2O "water_vapor"
|
||||
#define GAS_HYPERNOB "nob"
|
||||
#define GAS_NITRIC "no"
|
||||
#define GAS_NITROUS "n2o"
|
||||
#define GAS_NITRYL "no2"
|
||||
#define GAS_HYDROGEN "hydrogen"
|
||||
@@ -289,6 +290,7 @@
|
||||
#define GAS_AMMONIA "ammonia"
|
||||
#define GAS_FLUORINE "fluorine"
|
||||
#define GAS_ETHANOL "ethanol"
|
||||
#define GAS_QCD "qcd"
|
||||
|
||||
#define GAS_GROUP_CHEMICALS "Chemicals"
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
name = "Nitrogen"
|
||||
powermix = -1
|
||||
heat_penalty = -1.5
|
||||
fire_burn_rate = 1
|
||||
fire_temperature = 2300
|
||||
fire_products = list(GAS_NITRIC = 2)
|
||||
breath_alert_info = list(
|
||||
not_enough_alert = list(
|
||||
alert_category = "not_enough_nitro",
|
||||
@@ -76,13 +79,6 @@
|
||||
powermix = 1
|
||||
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
|
||||
@@ -96,10 +92,18 @@
|
||||
enthalpy = 81600
|
||||
heat_resistance = 6
|
||||
|
||||
/datum/gas/nitric_oxide
|
||||
id = GAS_NITRIC
|
||||
specific_heat = 20
|
||||
name = "Nitric oxide"
|
||||
fusion_power = 15
|
||||
enthalpy = 91290
|
||||
heat_resistance = 2
|
||||
|
||||
/datum/gas/nitryl
|
||||
id = GAS_NITRYL
|
||||
specific_heat = 20
|
||||
name = "Nitryl"
|
||||
name = "Nitrogen dioxide"
|
||||
gas_overlay = "nitryl"
|
||||
moles_visible = MOLES_GAS_VISIBLE
|
||||
flags = GAS_FLAG_DANGEROUS
|
||||
@@ -108,6 +112,13 @@
|
||||
enthalpy = 33200
|
||||
oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
|
||||
|
||||
/datum/gas/hypernoblium
|
||||
id = GAS_HYPERNOB
|
||||
specific_heat = 2000
|
||||
name = "Hyper-noblium"
|
||||
gas_overlay = "freon"
|
||||
moles_visible = MOLES_GAS_VISIBLE
|
||||
|
||||
/datum/gas/hydrogen
|
||||
id = GAS_HYDROGEN
|
||||
specific_heat = 10
|
||||
@@ -165,9 +176,9 @@
|
||||
specific_heat = 80
|
||||
name = "Pluoxium"
|
||||
fusion_power = 10
|
||||
oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST * 1000 // it is VERY stable
|
||||
oxidation_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST * 25 // it is VERY stable
|
||||
oxidation_rate = 8 // when it can oxidize, it can oxidize a LOT
|
||||
enthalpy = -50000 // but it reduces the heat output a bit
|
||||
enthalpy = -2000000 // but it reduces the heat output a great deal (plasma fires add 3000000 per mole)
|
||||
powermix = -1
|
||||
heat_penalty = -1
|
||||
transmit_modifier = -5
|
||||
@@ -245,3 +256,12 @@
|
||||
fire_products = list(GAS_H2O = 1.5, GAS_N2 = 0.5)
|
||||
fire_burn_rate = 4/3
|
||||
fire_temperature = 924
|
||||
|
||||
/datum/gas/quark_matter
|
||||
id = GAS_QCD
|
||||
specific_heat = 10
|
||||
name = "Quark Matter"
|
||||
flags = GAS_FLAG_DANGEROUS
|
||||
powermix = -1
|
||||
transmit_modifier = -10
|
||||
heat_penalty = -10
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
//regarding the requirements lists: the minimum or maximum requirements must be non-zero.
|
||||
//when in doubt, use MINIMUM_MOLE_COUNT.
|
||||
var/list/min_requirements
|
||||
var/list/max_requirements
|
||||
var/exclude = FALSE //do it this way to allow for addition/removal of reactions midmatch in the future
|
||||
var/priority = 100 //lower numbers are checked/react later than higher numbers. if two reactions have the same priority they may happen in either order
|
||||
var/name = "reaction"
|
||||
@@ -717,3 +716,78 @@
|
||||
if(result != NO_REACTION)
|
||||
return list("success" = FALSE, "message" = "Miasma sterilization not stopping due to water vapor correctly!")
|
||||
return ..()
|
||||
|
||||
/datum/gas_reaction/nitric_oxide
|
||||
priority = -5
|
||||
name = "Nitric oxide decomposition"
|
||||
id = "nitric_oxide"
|
||||
|
||||
/datum/gas_reaction/nitric_oxide/init_reqs()
|
||||
min_requirements = list(
|
||||
"MAX_TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST+100,
|
||||
GAS_NITRIC = MINIMUM_MOLE_COUNT
|
||||
)
|
||||
|
||||
/datum/gas_reaction/nitric_oxide/react(datum/gas_mixture/air, datum/holder)
|
||||
var/nitric = air.get_moles(GAS_NITRIC)
|
||||
var/oxygen = air.get_moles(GAS_O2)
|
||||
var/max_amount = max(nitric / 10, MINIMUM_MOLE_COUNT)
|
||||
var/enthalpy = air.return_temperature() * (air.heat_capacity() + R_IDEAL_GAS_EQUATION * air.total_moles());
|
||||
var/list/enthalpies = GLOB.gas_data.enthalpies
|
||||
if(oxygen > MINIMUM_MOLE_COUNT)
|
||||
var/reaction_amount = min(max_amount, oxygen)
|
||||
air.adjust_moles(GAS_NITRIC, -reaction_amount*2)
|
||||
air.adjust_moles(GAS_O2, -reaction_amount)
|
||||
air.adjust_moles(GAS_NITRYL, reaction_amount*2)
|
||||
enthalpy += (reaction_amount * -(enthalpies[GAS_NITRIC] - enthalpies[GAS_NITRYL]))
|
||||
air.adjust_moles(GAS_NITRIC, -max_amount)
|
||||
air.adjust_moles(GAS_O2, max_amount * 0.5)
|
||||
air.adjust_moles(GAS_N2, max_amount * 0.5)
|
||||
enthalpy += max_amount * -enthalpies[GAS_NITRIC]
|
||||
air.set_temperature(enthalpy/(air.heat_capacity() + R_IDEAL_GAS_EQUATION * air.total_moles()))
|
||||
return REACTING
|
||||
|
||||
/datum/gas_reaction/hagedorn
|
||||
priority = -INFINITY
|
||||
name = "Hagedorn decomposition"
|
||||
id = "hagedorn"
|
||||
|
||||
/datum/gas_reaction/hagedorn/init_reqs()
|
||||
min_requirements = list(
|
||||
"TEMP" = 2e12 // 2 trillion kelvins
|
||||
)
|
||||
|
||||
/datum/gas_reaction/hagedorn/react(datum/gas_mixture/air, datum/holder)
|
||||
var/initial_energy = air.thermal_energy()
|
||||
for(var/g in air.get_gases())
|
||||
air.set_moles(g, 0)
|
||||
air.set_moles(GAS_QCD, initial_energy / (air.return_temperature() * GLOB.gas_data.specific_heats[GAS_QCD]))
|
||||
|
||||
/datum/gas_reaction/dehagedorn
|
||||
priority = 50
|
||||
name = "Hagedorn condensation"
|
||||
id = "dehagedorn"
|
||||
|
||||
/datum/gas_reaction/dehagedorn/init_reqs()
|
||||
min_requirements = list(
|
||||
"MAX_TEMP" = 1.99e12,
|
||||
GAS_QCD = MINIMUM_MOLE_COUNT
|
||||
)
|
||||
|
||||
/datum/gas_reaction/dehagedorn/react(datum/gas_mixture/air, datum/holder)
|
||||
var/initial_energy = air.thermal_energy()
|
||||
var/energy_remaining = initial_energy
|
||||
air.set_moles(GAS_QCD, 0)
|
||||
air.set_temperature(min(air.return_temperature(), 1.8e12))
|
||||
var/new_temp = air.return_temperature()
|
||||
var/list/gases = GLOB.gas_data.specific_heats.Copy()
|
||||
gases -= GAS_QCD
|
||||
gases -= GAS_TRITIUM // no refusing sorry
|
||||
for(var/g in gases)
|
||||
gases[g] = 10000 / gases[g]
|
||||
while(energy_remaining > 0)
|
||||
var/G = pick(gases)
|
||||
air.adjust_moles(G, max(0.1, energy_remaining / (gases[G] * new_temp * 20)))
|
||||
energy_remaining = initial_energy - air.thermal_energy()
|
||||
air.adjust_heat(-energy_remaining)
|
||||
return REACTING
|
||||
|
||||
@@ -1483,6 +1483,7 @@
|
||||
description = "A caustic substance commonly used in fertilizer or household cleaners."
|
||||
reagent_state = GAS
|
||||
gas = GAS_AMMONIA
|
||||
boiling_point = 239.81
|
||||
color = "#404030" // rgb: 64, 64, 48
|
||||
taste_description = "mordant"
|
||||
pH = 11.6
|
||||
|
||||
Reference in New Issue
Block a user