reagents
Holder for a bunch of /datum/reagent
Vars | |
addiction_list | currently addicted reagents |
---|---|
addiction_tick | see /datum/reagents/proc/metabolize for usage |
chem_temp | Current temp of the holder volume |
flags | various flags, see code__DEFINES\reagents.dm |
last_tick | unused |
maximum_volume | Max volume of this holder |
my_atom | The atom this holder is attached to |
reagent_list | The reagents being held |
total_volume | Current volume of all the reagents |
Procs | |
add_reagent | Adds a reagent to this holder |
add_reagent_list | Like add_reagent but you can enter a list. Format it like this: list(/datum/reagent/toxin = 10, "beer" = 15) |
clear_reagents | Removes all reagents |
conditional_update | Calls /datum/reagent/proc/on_update on every reagent in this holder |
conditional_update_move | Calls /datum/reagent/proc/on_move on every reagent in this holder |
copy_data | Shallow copies (deep copy of viruses) data from the provided reagent into our copy of that reagent |
copy_to | Copies the reagents to the target object |
del_reagent | Fuck this one reagent |
end_metabolization | Signals that metabolization has stopped, triggering the end of trait-based effects |
expose | Applies the relevant expose_ proc for every reagent in this holder |
expose_single | Same as /datum/reagents/proc/expose but only for one reagent |
expose_temperature | Applies heat to this holder |
generate_taste_message | Returns what this holder's reagents taste like |
get_data | helper function to preserve data across reactions (needed for xenoarch) |
get_master_reagent | Get a reference to the reagent there is the most of in this holder |
get_master_reagent_id | DEPRICATED use get_master_regent. Get the id of the reagent there is the most of in this holder |
get_master_reagent_name | DEPRICATED use get_master_regent. Get the name of the reagent there is the most of in this holder |
get_reagent | Get a reference to the reagent if it exists |
get_reagent_amount | Get the amount of this reagent |
get_reagents | Get a comma separated string of every reagent name in this holder |
handle_reactions | Handle any reactions possible in this holder |
holder_full | Is this holder full or not |
isolate_reagent | Remove every reagent except this one |
log_list | Used in attack logs for reagents in pills and such |
metabolize | Triggers metabolizing the reagents in this holder |
remove_addiction | Removes addiction to a specific reagent on /datum/reagents/var/my_atom |
remove_all | Removes all reagents from this holder |
remove_all_type | Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included. |
remove_any | Remove an amount of reagents without caring about what they are |
remove_reagent | Remove a specific reagent |
set_data | helper function to preserve data across reactions (needed for xenoarch) |
specific_heat | Returns the average specific heat for all reagents currently in this holder. |
trans_id_to | Transfer a specific reagent id to the target object |
trans_to | Transfer some stuff from this holder to a target object |
update_total | Updates /datum/reagents/var/total_volume |
Var Details
addiction_list
currently addicted reagents
addiction_tick
see /datum/reagents/proc/metabolize for usage
chem_temp
Current temp of the holder volume
flags
various flags, see code__DEFINES\reagents.dm
last_tick
unused
maximum_volume
Max volume of this holder
my_atom
The atom this holder is attached to
reagent_list
The reagents being held
total_volume
Current volume of all the reagents
Proc Details
add_reagent
Adds a reagent to this holder
Arguments:
- reagent - The reagent id to add
- amount - Amount to add
- list/data - Any reagent data for this reagent, used for transferring data with reagents
- reagtemp - Temperature of this reagent, will be equalized
- no_react - prevents reactions being triggered by this addition
add_reagent_list
Like add_reagent but you can enter a list. Format it like this: list(/datum/reagent/toxin = 10, "beer" = 15)
clear_reagents
Removes all reagents
conditional_update
Calls /datum/reagent/proc/on_update on every reagent in this holder
Arguments:
- atom/A - passed to on_update
conditional_update_move
Calls /datum/reagent/proc/on_move on every reagent in this holder
Arguments:
- atom/A - passed to on_move
- Running - passed to on_move
copy_data
Shallow copies (deep copy of viruses) data from the provided reagent into our copy of that reagent
copy_to
Copies the reagents to the target object
del_reagent
Fuck this one reagent
end_metabolization
Signals that metabolization has stopped, triggering the end of trait-based effects
expose
Applies the relevant expose_ proc for every reagent in this holder
expose_single
Same as /datum/reagents/proc/expose but only for one reagent
expose_temperature
Applies heat to this holder
generate_taste_message
Returns what this holder's reagents taste like
Arguments:
- minimum_percent - the lower the minimum percent, the more sensitive the message is.
get_data
helper function to preserve data across reactions (needed for xenoarch)
get_master_reagent
Get a reference to the reagent there is the most of in this holder
get_master_reagent_id
DEPRICATED use get_master_regent. Get the id of the reagent there is the most of in this holder
get_master_reagent_name
DEPRICATED use get_master_regent. Get the name of the reagent there is the most of in this holder
get_reagent
Get a reference to the reagent if it exists
get_reagent_amount
Get the amount of this reagent
get_reagents
Get a comma separated string of every reagent name in this holder
handle_reactions
Handle any reactions possible in this holder
holder_full
Is this holder full or not
isolate_reagent
Remove every reagent except this one
log_list
Used in attack logs for reagents in pills and such
Arguments:
- external_list - list of reagent types = amounts
metabolize
Triggers metabolizing the reagents in this holder
Arguments:
- mob/living/carbon/C - The mob to metabolize in, if null it uses /datum/reagents/var/my_atom
- can_overdose - Allows overdosing
- liverless - Stops reagents that aren't set as /datum/reagent/var/self_consuming from metabolizing
remove_addiction
Removes addiction to a specific reagent on /datum/reagents/var/my_atom
remove_all
Removes all reagents from this holder
remove_all_type
Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included.
remove_any
Remove an amount of reagents without caring about what they are
remove_reagent
Remove a specific reagent
set_data
helper function to preserve data across reactions (needed for xenoarch)
specific_heat
Returns the average specific heat for all reagents currently in this holder.
trans_id_to
Transfer a specific reagent id to the target object
trans_to
Transfer some stuff from this holder to a target object
Arguments:
- obj/target - Target to attempt transfer to
- amount - amount of reagent volume to transfer
- multiplier - multiplies amount of each reagent by this number
- preserve_data - if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
- no_react - passed through to /datum/reagents/proc/add_reagent
- mob/transfered_by - used for logging
- remove_blacklisted - skips transferring of reagents with can_synth = FALSE
- method - passed through to [/datum/reagents/proc/react_single] and /datum/reagent/proc/on_transfer
- show_message - passed through to [/datum/reagents/proc/react_single]
- round_robin - if round_robin=TRUE, so transfer 5 from 15 water, 15 sugar and 15 plasma becomes 10, 15, 15 instead of 13.3333, 13.3333 13.3333. Good if you hate floating point errors
update_total
Updates /datum/reagents/var/total_volume