You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MistakeNot4892 edited this page Apr 29, 2020
·
1 revision
Reagents are an /atom-level variable that holds liquid chemicals that the atom contains, is processing, etc. All atoms have a reagents var but it may be null unless create_reagents() has been called. Humans have two additional reagent datums, touching and ingested (on the stomach organ) and there are several other specific permanent or temporary reagent holders for various purposes.
Macros
REAGENT_VOLUME(holder, reagent_type) - returns any numerical volume stored in the reagent_volumes list on holder, which is a /datum/reagents object.
REAGENT_DATA(holder, reagent_type) - accesses any data stored in the reagent_data list on holder, which is a /datum/reagents object. Usually null other than blood or nutriment.
Functions
holder.add_reagent(reagent_type, amount) - adds a /decl/reagent to the atom with the appropriate volume. This will mix any data (such as blood trace chemicals) with other reagents of the same type in the holder.
holder.remove_reagent(reagent_type, amount) - removes a specific volume of reagent from a holder.
holder.remove_any(amount) - removes a proportionate amount of each kind of reagent in the holder until it has removed amount units.
holder.clear_reagents() - removes all reagents from the holder.