/datum/gas_mixture
- The key of atmospherics.
- This datum here is how we represent gas mixtures. Temperature is in Kelvin and volume is in Litres.
- Defines and stores base gases using [APPLY_TO_GASES] and stores trace gases using [datum/gas_mixture/var/list/datum/gas/trace_gases].
Vars | |
fuel_burnt | Rough representation of oxygen and plasma used. Actual usage of plasma is currectly divided by 3 for balance. |
---|---|
graphic | Bitfield representing gas graphics on our tile. |
group_multiplier | Used in air groups, this represents how many tiles are in the air group. Using this lets us scale all kinds of variables so we can always act like one big tile. |
temperature | Temperature of gases in Kelvin |
volume | Volume of container in litres |
Procs | |
check_both_then_temperature_share | |
check_gas_mixture | |
check_if_dangerous | Checks for, ya know, if the mixture is potentially dangerous. |
check_me_then_temperature_mimic | Similar to /datum/gas_mixture/proc/check_me_then_temperature_share except the model is not modified. |
check_me_then_temperature_share | Similar to /datum/gas_mixture/proc/check_both_then_temperature_share except that we solely check ourselves. Returns: FALSE if the self-check failed and TRUE if self-check passed. |
check_me_then_temperature_turf_share | |
check_then_merge | |
check_then_remove | |
check_tile_graphic | Build bitfield of overlays to use for a gas mixture and determine if graphic should be updated |
check_turf | |
compare | |
copy_from | Copies variables from sample |
fire | |
merge | |
mimic | |
neutron_interact | Processes an interaction between a neutron and this gas mixture, altering the component gasses accordingly. Returns the resulting number of neutrons - 0 means that the reaction consumed the input neutron |
react | Process all reactions, return bitfield if notable reaction occurs. |
remove | |
remove_ratio | |
reset_to_space_gas | Removes all gases except if in an underwater map, in which case the gas is set to be hot low pressure air. |
share | |
subtract | Subtracts right_side from air_mixture. Used to help turfs mingle |
temperature_mimic | Similar to /datum/gas_mixture/proc/temperature_share except the model is not modified. |
temperature_share | Conducts heat between gases. Conduction_coefficient is a multiplier that determines how well heat equalises, with 0 meaning no heat and 1 meaning perfect equalisation. |
temperature_turf_share | Shares heat between turfs, with conduction_coefficient as heat transfer efficiency factor. |
Var Details
fuel_burnt
Rough representation of oxygen and plasma used. Actual usage of plasma is currectly divided by 3 for balance.
graphic
Bitfield representing gas graphics on our tile.
group_multiplier
Used in air groups, this represents how many tiles are in the air group. Using this lets us scale all kinds of variables so we can always act like one big tile.
temperature
Temperature of gases in Kelvin
volume
Volume of container in litres
Proc Details
check_both_then_temperature_share
- Checks if our combined temperatures have a low enough delta that group processing is preserved.
- Returns: SELF_CHECK_FAIL if the self-check failed, SHARER_CHECK_FAIL if sharer-check failed, GROUP_CHECK_PASS if both checks pass.
check_gas_mixture
- Checks if us and the sharer have a low enough delta and our combination's delta is small enough that group processing can be preserved.
- Returns: SELF_CHECK_FAIL if the self-check failed, SHARER_CHECK_FAIL if sharer-check failed, GROUP_CHECK_PASS if both checks pass.
check_if_dangerous
Checks for, ya know, if the mixture is potentially dangerous.
check_me_then_temperature_mimic
Similar to /datum/gas_mixture/proc/check_me_then_temperature_share except the model is not modified.
check_me_then_temperature_share
Similar to /datum/gas_mixture/proc/check_both_then_temperature_share except that we solely check ourselves. Returns: FALSE if the self-check failed and TRUE if self-check passed.
check_me_then_temperature_turf_share
- Checks if the difference is small enough so we can continue group processing,
- Return: TRUE if valid for group processing, FALSE if delta is too large for group processing.
check_then_merge
- Similar to /datum/gas_mixture/proc/merge but first checks to see if the amount of air assumed is small enough that group processing is still accurate for source (aborts if not).
- Returns: TRUE on successful merge, FALSE if the check failed.
check_then_remove
- Similar to /datum/gas_mixture/proc/remove but first checks to see if the amount of air removed is small enough that group processing is still accurate for source (aborts if not).
- Returns: gas_mixture with the gases removed if group processing was preserved, else SELF_CHECK_FAIL.
check_tile_graphic
Build bitfield of overlays to use for a gas mixture and determine if graphic should be updated
check_turf
- Checks if the turf is valid for air group processing.
- Returns: FALSE if self-check failed or TRUE if check passes
compare
- Compares sample to src to see if within acceptable ranges that group processing may be enabled
- Returns: TRUE if within range, FALSE if outside range.
copy_from
Copies variables from sample
fire
- Process fire combustion, pretty much just plasma combustion.
- Returns: Rough amount of plasma and oxygen used. Inaccurate due to plasma usage lowering.
merge
- Merges all air from giver into self. Deletes giver.
- Returns: TRUE on success (no failure cases yet)
mimic
- Similar to /datum/gas_mixture/proc/share, except the model is not modified.
- Return: Moles of gas exchanged.
neutron_interact
Processes an interaction between a neutron and this gas mixture, altering the component gasses accordingly. Returns the resulting number of neutrons - 0 means that the reaction consumed the input neutron
react
Process all reactions, return bitfield if notable reaction occurs.
remove
- Proportionally removes amount of gas from the gas_mixture.
- Returns: gas_mixture with the gases removed.
remove_ratio
- Proportionally removes amount of gas from the gas_mixture.
- Returns: gas_mixture with the gases removed.
reset_to_space_gas
Removes all gases except if in an underwater map, in which case the gas is set to be hot low pressure air.
share
- Performs air sharing calculations between two gas_mixtures assuming only 1 boundary length.
- Return: Moles of gas exchanged (+ if sharer received)
subtract
Subtracts right_side from air_mixture. Used to help turfs mingle
temperature_mimic
Similar to /datum/gas_mixture/proc/temperature_share except the model is not modified.
temperature_share
Conducts heat between gases. Conduction_coefficient is a multiplier that determines how well heat equalises, with 0 meaning no heat and 1 meaning perfect equalisation.
temperature_turf_share
Shares heat between turfs, with conduction_coefficient as heat transfer efficiency factor.