-
Notifications
You must be signed in to change notification settings - Fork 249
Reagents
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 thereagent_volumeslist onholder, which is a/datum/reagentsobject. -
REAGENT_DATA(holder, reagent_type)- accesses any data stored in thereagent_datalist onholder, which is a/datum/reagentsobject. Usually null other than blood or nutriment.
Functions
-
holder.add_reagent(reagent_type, amount)- adds a/decl/reagentto 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 removedamountunits. -
holder.clear_reagents()- removes all reagents from the holder.