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

reagent

A single reagent

Vars

added_traitsA list of traits to apply while the reagent is in a mob.
addiction_typesAssoc list with key type of addiction this reagent feeds, and value amount of addiction points added per unit of reagent metabolzied (which means * REAGENTS_METABOLISM every life())
affected_biotypeThe affected biotype, if the reagent damages/heals toxin damage of an affected mob. See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
affected_bodytypeThe affected bodytype, if the reagent damages/heals bodyparts (Brute/Fire) of an affected mob. See "Bodytype defines" in /code/_DEFINES/mobs.dm
affected_organ_flagsThe affected organ_flags, if the reagent damages/heals organ damage of an affected mob. See "Organ defines for carbon mobs" in /code/_DEFINES/surgery.dm
affected_respiration_typeThe affected respiration type, if the reagent damages/heals oxygen damage of an affected mob. See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
burning_temperaturewhat chem is made at the end of a reaction IF the purity is below the recipies purity_min at the END of a reaction only Thermodynamic vars How hot this reagent burns when it's on fire - null means it can't burn
burning_volumeHow much is consumed when it is burnt per second
chemical_flagsSee fermi_readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_INVISIBLE, REAGENT_SNEAKYNAME, REAGENT_SPLITRETAINVOL, REAGENT_CANSYNTH, REAGENT_IMPURE
colorcolor it looks in containers etc
creation_puritythe purity of the reagent on creation (i.e. when it's added to a mob and its purity split it into 2 chems; the purity of the resultant chems are kept as 1, this tracks what the purity was before that)
current_cycleincrements everytime on_mob_life is called
dataSpecial data associated with the reagent that will be passed on upon transfer to a new holder.
default_containerThe default reagent container for the reagent, used for icon generation
descriptionnor do they have descriptions
fallback_iconIcon for fallback item displayed in a tourist's thought bubble for if this reagent had no associated glass_style datum.
fallback_icon_stateIcon state for fallback item displayed in a tourist's thought bubble for if this reagent had no associated glass_style datum.
glass_priceThe amount a robot will pay for a glass of this (20 units but can be higher if you pour more, be frugal!)
holderreagent holder this belongs to
inverse_chemWhat chem is metabolised when purity is below inverse_chem_val
inverse_chem_valIf the impurity is below 0.5, replace ALL of the chem with inverse_chem upon metabolising
massThe molar mass of the reagent - if you're adding a reagent that doesn't have a recipe, just add a random number between 10 - 800. Higher numbers are "harder" but it's mostly arbitary.
materialAre we from a material? We might wanna know that for special stuff. Like metalgen. Is replaced with a ref of the material on New()
metabolization_ratehow fast the reagent is metabolized by the mob
metabolized_traitsA list of traits to apply while the reagent is being metabolized.
metabolizingis it currently metabolizing
namedatums don't have names by default
overdose_thresholdabove this overdoses happen
overdosedYou fucked up and this is now triggering its overdose effects, purge that shit quick.
penetrates_skinThe set of exposure methods this penetrates skin with.
phpH of the reagent
purge_multiplierMultiplier of the amount purged by reagents such as calomel, multiver, syniver etc.
purityPurity of the reagent - for use with internal reaction mechanics only. Use below (creation_purity) if you're writing purity effects into a reagent's use mechanics.
reagent_removal_skip_listA list of causes why this chem should skip being removed, if the length is 0 it will be removed from holder naturally, if this is >0 it will not be removed from the holder.
reagent_stateLIQUID, SOLID, GAS
reagent_weightaffects how far it travels when sprayed
restaurant_orderWhen ordered in a restaurant, what custom order do we create?
self_consumingif false stops metab in liverless mobs
specific_heatJ/(K*mol)
taste_descriptionused by taste messages
taste_multhow this taste compares to others. Higher values means it is more noticable
volumepretend this is moles

Procs

DestroyThis should only be called by the holder, so it's already handled clearing its references
burnCalled whenever a reagent is on fire, or is in a holder that is on fire. (WIP)
expose_atomApplies this reagent to an /atom
expose_mobApplies this reagent to a /mob/living
expose_objApplies this reagent to an /obj
expose_turfApplies this reagent to a /turf
get_inverse_purityGets the inverse purity of this reagent. Mostly used when converting from a normal reagent to its inverse one.
get_taste_descriptionShould return a associative list where keys are taste descriptions and values are strength ratios
metabolize_reagentMetabolizes a portion of the reagent after on_mob_life() is called
normalise_creation_purityUsed when you want the default reagents purity to be equal to the normal effects (i.e. if default purity is 0.75, and your reacted purity is 1, then it will return 1.33)
on_burn_wound_processingCalled in burns.dm if the reagent has the REAGENT_AFFECTS_WOUNDS process flag
on_hydroponics_applyCalled when this chemical is processed in a hydroponics tray.
on_mergeCalled when two reagents of the same are mixing.
on_mob_addCalled when this reagent is first added to a mob
on_mob_deadCalled when a reagent is inside of a mob when they are dead if the reagent has the REAGENT_DEAD_PROCESS flag Returning UPDATE_MOB_HEALTH will cause updatehealth() to be called on the holder mob by /datum/reagents/proc/metabolize.
on_mob_deleteCalled when this reagent is removed while inside a mob
on_mob_end_metabolizeCalled when this reagent stops being metabolized by a liver
on_mob_lifeTicks on mob Life() for as long as the reagent remains in the mob's reagents.
on_mob_metabolizeCalled when this reagent first starts being metabolized by a liver
on_newCalled after add_reagents creates a new reagent.
on_transferCalled after a reagent is transferred
overdose_processCalled if the reagent has passed the overdose threshold and is set to be triggering overdose effects. Returning UPDATE_MOB_HEALTH will cause updatehealth() to be called on the holder mob by /datum/reagents/proc/metabolize.
overdose_startCalled when an overdose starts. Returning UPDATE_MOB_HEALTH will cause updatehealth() to be called on the holder mob by /datum/reagents/proc/metabolize.
used_on_fishCalled when feeding a fish. If TRUE is returned, a portion of reagent will be consumed.

Var Details

added_traits

A list of traits to apply while the reagent is in a mob.

addiction_types

Assoc list with key type of addiction this reagent feeds, and value amount of addiction points added per unit of reagent metabolzied (which means * REAGENTS_METABOLISM every life())

affected_biotype

The affected biotype, if the reagent damages/heals toxin damage of an affected mob. See "Mob bio-types flags" in /code/_DEFINES/mobs.dm

affected_bodytype

The affected bodytype, if the reagent damages/heals bodyparts (Brute/Fire) of an affected mob. See "Bodytype defines" in /code/_DEFINES/mobs.dm

affected_organ_flags

The affected organ_flags, if the reagent damages/heals organ damage of an affected mob. See "Organ defines for carbon mobs" in /code/_DEFINES/surgery.dm

affected_respiration_type

The affected respiration type, if the reagent damages/heals oxygen damage of an affected mob. See "Mob bio-types flags" in /code/_DEFINES/mobs.dm

burning_temperature

what chem is made at the end of a reaction IF the purity is below the recipies purity_min at the END of a reaction only Thermodynamic vars How hot this reagent burns when it's on fire - null means it can't burn

burning_volume

How much is consumed when it is burnt per second

chemical_flags

See fermi_readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_INVISIBLE, REAGENT_SNEAKYNAME, REAGENT_SPLITRETAINVOL, REAGENT_CANSYNTH, REAGENT_IMPURE

color

color it looks in containers etc

creation_purity

the purity of the reagent on creation (i.e. when it's added to a mob and its purity split it into 2 chems; the purity of the resultant chems are kept as 1, this tracks what the purity was before that)

current_cycle

increments everytime on_mob_life is called

data

Special data associated with the reagent that will be passed on upon transfer to a new holder.

default_container

The default reagent container for the reagent, used for icon generation

description

nor do they have descriptions

fallback_icon

Icon for fallback item displayed in a tourist's thought bubble for if this reagent had no associated glass_style datum.

fallback_icon_state

Icon state for fallback item displayed in a tourist's thought bubble for if this reagent had no associated glass_style datum.

glass_price

The amount a robot will pay for a glass of this (20 units but can be higher if you pour more, be frugal!)

holder

reagent holder this belongs to

inverse_chem

What chem is metabolised when purity is below inverse_chem_val

inverse_chem_val

If the impurity is below 0.5, replace ALL of the chem with inverse_chem upon metabolising

mass

The molar mass of the reagent - if you're adding a reagent that doesn't have a recipe, just add a random number between 10 - 800. Higher numbers are "harder" but it's mostly arbitary.

material

Are we from a material? We might wanna know that for special stuff. Like metalgen. Is replaced with a ref of the material on New()

metabolization_rate

how fast the reagent is metabolized by the mob

metabolized_traits

A list of traits to apply while the reagent is being metabolized.

metabolizing

is it currently metabolizing

name

datums don't have names by default

overdose_threshold

above this overdoses happen

overdosed

You fucked up and this is now triggering its overdose effects, purge that shit quick.

penetrates_skin

The set of exposure methods this penetrates skin with.

ph

pH of the reagent

purge_multiplier

Multiplier of the amount purged by reagents such as calomel, multiver, syniver etc.

purity

Purity of the reagent - for use with internal reaction mechanics only. Use below (creation_purity) if you're writing purity effects into a reagent's use mechanics.

reagent_removal_skip_list

A list of causes why this chem should skip being removed, if the length is 0 it will be removed from holder naturally, if this is >0 it will not be removed from the holder.

reagent_state

LIQUID, SOLID, GAS

reagent_weight

affects how far it travels when sprayed

restaurant_order

When ordered in a restaurant, what custom order do we create?

self_consuming

if false stops metab in liverless mobs

specific_heat

J/(K*mol)

taste_description

used by taste messages

taste_mult

how this taste compares to others. Higher values means it is more noticable

volume

pretend this is moles

Proc Details

Destroy

This should only be called by the holder, so it's already handled clearing its references

burn

Called whenever a reagent is on fire, or is in a holder that is on fire. (WIP)

expose_atom

Applies this reagent to an /atom

expose_mob

Applies this reagent to a /mob/living

expose_obj

Applies this reagent to an /obj

expose_turf

Applies this reagent to a /turf

get_inverse_purity

Gets the inverse purity of this reagent. Mostly used when converting from a normal reagent to its inverse one.

Arguments

get_taste_description

Should return a associative list where keys are taste descriptions and values are strength ratios

metabolize_reagent

Metabolizes a portion of the reagent after on_mob_life() is called

normalise_creation_purity

Used when you want the default reagents purity to be equal to the normal effects (i.e. if default purity is 0.75, and your reacted purity is 1, then it will return 1.33)

Arguments

on_burn_wound_processing

Called in burns.dm if the reagent has the REAGENT_AFFECTS_WOUNDS process flag

on_hydroponics_apply

Called when this chemical is processed in a hydroponics tray.

Can affect plant's health, stats, or cause the plant to react in certain ways.

on_merge

Called when two reagents of the same are mixing.

on_mob_add

Called when this reagent is first added to a mob

on_mob_dead

Called when a reagent is inside of a mob when they are dead if the reagent has the REAGENT_DEAD_PROCESS flag Returning UPDATE_MOB_HEALTH will cause updatehealth() to be called on the holder mob by /datum/reagents/proc/metabolize.

on_mob_delete

Called when this reagent is removed while inside a mob

on_mob_end_metabolize

Called when this reagent stops being metabolized by a liver

on_mob_life

Ticks on mob Life() for as long as the reagent remains in the mob's reagents.

Usage: Parent should be called first using . = ..()

Exceptions: If the holder var needs to be accessed, call the parent afterward that as it can become null if the reagent is fully removed.

Returns: UPDATE_MOB_HEALTH only if you need to update the health of a mob (this is only needed when damage is dealt to the mob)

Arguments

on_mob_metabolize

Called when this reagent first starts being metabolized by a liver

on_new

Called after add_reagents creates a new reagent.

on_transfer

Called after a reagent is transferred

overdose_process

Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects. Returning UPDATE_MOB_HEALTH will cause updatehealth() to be called on the holder mob by /datum/reagents/proc/metabolize.

overdose_start

Called when an overdose starts. Returning UPDATE_MOB_HEALTH will cause updatehealth() to be called on the holder mob by /datum/reagents/proc/metabolize.

used_on_fish

Called when feeding a fish. If TRUE is returned, a portion of reagent will be consumed.