/tg/ Station 13 - Modules - TypesVar Details - Proc Details

lungs

Vars

breath_lostAssoc list of procs to run when a gas is immediately removed from the breath, in the form gas id -> proc_path
breath_outGas mixture to breath out when we're done processing a breath Will get emptied out when it's all done
breath_presentAssoc list of procs to run while a gas is present, in the form gas id -> proc_path
breathe_alwaysAssoc list of procs to always run, in the form gas_id -> proc_path
healium_para_minMinimum amount of healium to make you unconscious for 4 seconds
healium_sleep_minMinimum amount of healium to knock you down for good
helium_speech_minMinimum amount of helium to affect speech
last_partial_pressuresOur previous breath's partial pressures, in the form gas id -> partial pressure
safe_plasma_maxHow much breath partial pressure is a safe amount of plasma. 0 means that we are immune to plasma.
suffers_miasmaWhether these lungs react negatively to miasma
treat_asList of gas to treat as other gas, in the form list(inital_gas, treat_as, multiplier)

Procs

add_gas_reactionTells the lungs to pay attention to the passed in gas type We'll check for it when breathing, in a few possible ways Accepts 3 optional arguments:
add_gas_relationshipTells the lungs to treat the passed in gas type as another passed in gas type Takes the gas to check for as an argument, alongside the gas to convert and the multiplier to use These act in the order of insertion, use that how you will
breathe_gas_volumeRemove gas from breath. If output_gas is given, transfers the removed gas to the lung's gas_mixture. Removes 100% of the given gas type unless given a volume argument. Returns the amount of gas theoretically removed.
breathe_nitroIf the lungs need Nitrogen to breathe properly, N2 is exchanged with CO2.
breathe_oxygenHandles oxygen breathing. Always called by things that need o2, no matter what
breathe_plasmaIf the lungs need Plasma to breathe properly, Plasma is exchanged with CO2.
check_breathThis proc tests if the lungs can breathe, if they can breathe a given gas mixture, and throws/clears gas alerts. It does this by calling subprocs "registered" to pay attention to different gas types There's also support for gases that should always be checked for, and procs that should run when a gas is finished
consume_healiumSleeping gas with healing properties.
consume_heliumActivates helium speech when partial pressure gets high enough
consume_hypernobliumGain hypernob effects if we have enough of the stuff
consume_pluoxiumBehaves like Oxygen with 8X efficacy, but metabolizes into a reagent.
emit_breath_particleCreates a particle effect off the mouth of the passed mob.
handle_helium_speechReact to speach while hopped up on the high pitched voice juice
handle_suffocationApplies suffocation side-effects to a given Human, scaling based on ratio of required pressure VS "true" pressure. If pressure is greater than 0, the return value will represent the amount of gas successfully breathed.
lose_healiumLose healium side effects
lose_heliumLose helium high pitched voice
on_mob_insertSimply exists so that you don't keep any alerts from your previous lack of lungs.
remove_gas_relationshipClears away a gas relationship. Takes the same args as the initial addition
safe_co2Handles NOT having too much co2. only relevant if safe_co2_max has a value
safe_miasmaWe're free from the stick, clear out its impacts
safe_n2oN2O side-effects. "Too much N2O!"
safe_oxygenHandles NOT having too much o2. only relevant if safe_oxygen_max has a value
safe_plasmaResets plasma side effects
too_much_bzToo much funny gas, time to get brain damage
too_much_co2Maximum CO2 effects. "Too much CO2!"
too_much_freonBreathing in refridgerator coolent, shit's caustic
too_much_halonBreathing in halon, convert it to a reagent
too_much_miasmaBreathing in the stink gas
too_much_n2oCauses random euphoria and giggling. Large amounts knock you down
too_much_oxygenMaximum Oxygen effects. "Too much O2!"
too_much_plasmaMaximum Plasma effects. "Too much Plasma!"
too_much_tritiumRadioactive, green gas. Toxin damage, and a radiation chance
too_much_zaukerReally toxic stuff, very much trying to kill you

Var Details

breath_lost

Assoc list of procs to run when a gas is immediately removed from the breath, in the form gas id -> proc_path

breath_out

Gas mixture to breath out when we're done processing a breath Will get emptied out when it's all done

breath_present

Assoc list of procs to run while a gas is present, in the form gas id -> proc_path

breathe_always

Assoc list of procs to always run, in the form gas_id -> proc_path

healium_para_min

Minimum amount of healium to make you unconscious for 4 seconds

healium_sleep_min

Minimum amount of healium to knock you down for good

helium_speech_min

Minimum amount of helium to affect speech

last_partial_pressures

Our previous breath's partial pressures, in the form gas id -> partial pressure

safe_plasma_max

How much breath partial pressure is a safe amount of plasma. 0 means that we are immune to plasma.

suffers_miasma

Whether these lungs react negatively to miasma

treat_as

List of gas to treat as other gas, in the form list(inital_gas, treat_as, multiplier)

Proc Details

add_gas_reaction

Tells the lungs to pay attention to the passed in gas type We'll check for it when breathing, in a few possible ways Accepts 3 optional arguments:

proc/while_present * Called while the gas is present in our breath. Return BREATH_LOST to call on_loss afterwards proc/on_loss * Called after we have lost a gas from our breath. proc/always * Always called. Best suited for breathing procs, like oxygen

while_present and always get the same arguments (mob/living/carbon/breather, datum/gas_mixture/breath, pp, old_pp) on_loss is almost exactly the same, except it doesn't pass in a current partial pressure, since one isn't avalible

add_gas_relationship

Tells the lungs to treat the passed in gas type as another passed in gas type Takes the gas to check for as an argument, alongside the gas to convert and the multiplier to use These act in the order of insertion, use that how you will

breathe_gas_volume

Remove gas from breath. If output_gas is given, transfers the removed gas to the lung's gas_mixture. Removes 100% of the given gas type unless given a volume argument. Returns the amount of gas theoretically removed.

breathe_nitro

If the lungs need Nitrogen to breathe properly, N2 is exchanged with CO2.

breathe_oxygen

Handles oxygen breathing. Always called by things that need o2, no matter what

breathe_plasma

If the lungs need Plasma to breathe properly, Plasma is exchanged with CO2.

check_breath

This proc tests if the lungs can breathe, if they can breathe a given gas mixture, and throws/clears gas alerts. It does this by calling subprocs "registered" to pay attention to different gas types There's also support for gases that should always be checked for, and procs that should run when a gas is finished

Returns TRUE if the breath was successful, or FALSE if otherwise.

Arguments:

consume_healium

Sleeping gas with healing properties.

consume_helium

Activates helium speech when partial pressure gets high enough

consume_hypernoblium

Gain hypernob effects if we have enough of the stuff

consume_pluoxium

Behaves like Oxygen with 8X efficacy, but metabolizes into a reagent.

emit_breath_particle

Creates a particle effect off the mouth of the passed mob.

handle_helium_speech

React to speach while hopped up on the high pitched voice juice

handle_suffocation

Applies suffocation side-effects to a given Human, scaling based on ratio of required pressure VS "true" pressure. If pressure is greater than 0, the return value will represent the amount of gas successfully breathed.

lose_healium

Lose healium side effects

lose_helium

Lose helium high pitched voice

on_mob_insert

Simply exists so that you don't keep any alerts from your previous lack of lungs.

remove_gas_relationship

Clears away a gas relationship. Takes the same args as the initial addition

safe_co2

Handles NOT having too much co2. only relevant if safe_co2_max has a value

safe_miasma

We're free from the stick, clear out its impacts

safe_n2o

N2O side-effects. "Too much N2O!"

safe_oxygen

Handles NOT having too much o2. only relevant if safe_oxygen_max has a value

safe_plasma

Resets plasma side effects

too_much_bz

Too much funny gas, time to get brain damage

too_much_co2

Maximum CO2 effects. "Too much CO2!"

too_much_freon

Breathing in refridgerator coolent, shit's caustic

too_much_halon

Breathing in halon, convert it to a reagent

too_much_miasma

Breathing in the stink gas

too_much_n2o

Causes random euphoria and giggling. Large amounts knock you down

too_much_oxygen

Maximum Oxygen effects. "Too much O2!"

too_much_plasma

Maximum Plasma effects. "Too much Plasma!"

too_much_tritium

Radioactive, green gas. Toxin damage, and a radiation chance

too_much_zauker

Really toxic stuff, very much trying to kill you