Antinoblium converts every other gas into antinoblium. (#91016)

Recommended for #91048 to be merged first to limit availability of the
gas.

Adds a gas reaction that requires antinoblium. Causes other gases to get
converted into antinoblium when above 20 Kelvin. Irradiates people upon
skin contact.
Hypernoblium halts entropy from increasing. To make antinoblium the
opposite, it accelerates entropy as fast as it can by converting every
other gas into antinoblium. This brings a unique way for antinoblium to
interact with the atmospherics system. Due to the grey goo nature of the
gas, people will panic if this gets leaked for whatever reason, which
can bring some good quality roleplay moments as people desparately try
to prevent the spread of the gas or prevent the gas spreading into their
departments.
🆑
add: Antinoblium converts other gases into antinoblium when above 20
Kelvin.
balance: Firelocks close when they detect antinoblium.
balance: Antinoblium irradiates people upon skin contact.
/🆑
This commit is contained in:
Pickle-Coding
2025-05-21 22:41:48 +01:00
committed by Roxy
parent e317e80366
commit 80906f22a3
6 changed files with 75 additions and 1 deletions

View File

@@ -174,6 +174,8 @@
/// The number of moles of hyper-noblium required to prevent reactions.
#define REACTION_OPPRESSION_THRESHOLD 5
/// Minimum temperature required for hypernoblium to prevent reactions.
#define REACTION_OPPRESSION_MIN_TEMP 20
// Halon:
/// Energy released per mole of BZ consumed during halon formation.
@@ -262,6 +264,10 @@
/// How much radiation in consumed amount does a nuclear particle take from radiation when proto-nitrate breaks down BZ.
#define PN_BZASE_NUCLEAR_PARTICLE_RADIATION_ENERGY_CONVERSION 2.5
// Antinoblium:
/// The divisor for the maximum antinoblium conversion rate. (1/90 of the antinoblium converts other gases to antinoblium in one reaction tick.)
#define ANTINOBLIUM_CONVERSION_DIVISOR 90
// Electrolysis:
// Electrolysis arguments:
/// Supermatter power argument.

View File

@@ -285,6 +285,8 @@
var/pressure = environment?.return_pressure() //SKYRAT EDIT ADDITION - Micro optimisation
if(environment.temperature >= BODYTEMP_HEAT_WARNING_2 || pressure > HAZARD_HIGH_PRESSURE) //BUBBER EDIT CHANGE - FIRELOCKS
return FIRELOCK_ALARM_TYPE_HOT
if(environment.gases[/datum/gas/antinoblium] && environment.gases[/datum/gas/antinoblium][MOLES] > MINIMUM_MOLE_COUNT)
return FIRELOCK_ALARM_TYPE_HOT
if(environment.temperature <= BODYTEMP_COLD_WARNING_2 || pressure < HAZARD_LOW_PRESSURE) //BUBBER EDIT CHANGE - FIRELOCKS
return FIRELOCK_ALARM_TYPE_COLD
return

View File

@@ -508,7 +508,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
return
//Fuck you
if(cached_gases[/datum/gas/hypernoblium] && cached_gases[/datum/gas/hypernoblium][MOLES] >= REACTION_OPPRESSION_THRESHOLD && temperature > 20)
if(cached_gases[/datum/gas/hypernoblium] && cached_gases[/datum/gas/hypernoblium][MOLES] >= REACTION_OPPRESSION_THRESHOLD && temperature > REACTION_OPPRESSION_MIN_TEMP)
return STOP_REACTIONS
reaction_results = new

View File

@@ -207,3 +207,10 @@
"Nuclear Particles" = "This reaction emits extremely high energy nuclear particles, up to [2 * PN_BZASE_NUCLEAR_PARTICLE_MAXIMUM] per second per unique gas mixture.",
"Temperature" = "Can only occur between [PN_BZASE_MIN_TEMP] - [PN_BZASE_MAX_TEMP] kelvin.",
)
/datum/gas_reaction/antinoblium_replication/init_factors()
factor = list(
/datum/gas/antinoblium = "[MOLES_GAS_VISIBLE] moles of antinoblium is needed to replicate itself. Requires other gases to be converted to antinoblium.",
"Temperature" = "Can only occur above [REACTION_OPPRESSION_MIN_TEMP] Kelvin."
)

View File

@@ -1162,4 +1162,48 @@
air.temperature = max((temperature * old_heat_capacity + energy_released) / new_heat_capacity, TCMB)
return REACTING
/datum/gas_reaction/antinoblium_replication
priority_group = PRIORITY_FORMATION
name = "Antinoblium Replication"
id = "antinoblium_replication"
desc = "Antinoblium breaks down all gases into more of itself."
/datum/gas_reaction/antinoblium_replication/init_reqs()
requirements = list(
/datum/gas/antinoblium = MOLES_GAS_VISIBLE,
"MIN_TEMP" = REACTION_OPPRESSION_MIN_TEMP,
)
/**
* Antinoblium Recplication
*
* Converts all gases into antinoblium.
*/
/datum/gas_reaction/antinoblium_replication/react(datum/gas_mixture/air, datum/holder)
. = REACTING
var/list/cached_gases = air.gases
var/heat_capacity = air.heat_capacity()
var/total_moles = air.total_moles()
var/antinoblium = cached_gases[/datum/gas/antinoblium]
var/antinoblium_moles = antinoblium[MOLES]
var/total_not_antinoblium_moles = total_moles - antinoblium_moles
var/reaction_rate = min(antinoblium_moles / ANTINOBLIUM_CONVERSION_DIVISOR, total_not_antinoblium_moles)
if(total_not_antinoblium_moles < MINIMUM_MOLE_COUNT) // Clear up the remaining gases if this condition is met.
. = NO_REACTION
reaction_rate = total_not_antinoblium_moles
for(var/id in cached_gases)
if(id == /datum/gas/antinoblium)
continue
var/list/gas = cached_gases[id]
if(. == NO_REACTION) // Let the gases get properly cleared while avoiding potential division by 0.
gas[MOLES] = 0
continue
gas[MOLES] -= reaction_rate * gas[MOLES] / total_not_antinoblium_moles
antinoblium[MOLES] += reaction_rate
SET_REACTION_RESULTS(reaction_rate)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(air.temperature * heat_capacity / new_heat_capacity, TCMB)
#undef SET_REACTION_RESULTS

View File

@@ -1102,6 +1102,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
*/
/datum/species/proc/handle_environment(mob/living/carbon/human/humi, datum/gas_mixture/environment, seconds_per_tick, times_fired)
handle_environment_pressure(humi, environment, seconds_per_tick, times_fired)
handle_gas_interaction(humi, environment, seconds_per_tick, times_fired)
/**
* Body temperature handler for species
@@ -1413,6 +1414,20 @@ GLOBAL_LIST_EMPTY(features_by_species)
H.adjustBruteLoss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC)
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 2)
/**
* Handles exposure to the skin of various gases.
*/
/datum/species/proc/handle_gas_interaction(mob/living/carbon/human/human, datum/gas_mixture/environment, seconds_per_tick, times_fired)
if((human?.wear_suit?.clothing_flags & STOPSPRESSUREDAMAGE) && (human?.head?.clothing_flags & STOPSPRESSUREDAMAGE))
return
for(var/gas_id in environment.gases)
var/gas_amount = environment.gases[gas_id][MOLES]
switch(gas_id)
if(/datum/gas/antinoblium) // Antinoblium - irradiates the target.
if(gas_amount >= MOLES_GAS_VISIBLE && SPT_PROB(1, gas_amount * seconds_per_tick))
SSradiation.irradiate(human)
////////////
// Stun //
////////////