/datum/chemical_reaction
Vars | |
consume_all | If set to 1, the recipe will consume ALL of its components instead of just proportional parts. |
---|---|
drinkrecipe | Is the result a drink? |
eventual_result | Used for complex reactions to show what they actually produce at the end (chem request console needs this) Can be a list or a single string ID |
hidden | should this reaction show up in anything player-facing that lists reactions. For secret repo chems, misc precursors, and for 'non-standard' reactions (stuff like voltagen arc, foam reacting with water, etc) |
max_temperature | Will not react if above this |
min_temperature | Will not react if below this |
reaction_icon_state | added to the temperature on reaction, can be negative to remove heat |
reaction_speed | units produced per second |
reaction_volume_dependant | if TRUE, the reaction scales with volume, with the reaction_speed being the minimum speed the mixture reacts at |
reaction_volume_for_double | The reaction speed will scale lineary, with reaction_volume_for_double being the amount of reacting chems in the mixture needed for the reaction to take place at double speed. this means double that would result in triple the reaction speed |
special_log_handling | Logs the contents of the reagent holder's container in addition to the reaction itself. Used for foam and smoke (Convair880). |
stateful | If TRUE, a separate instance of the reaction will be created for the duration of the active reaction, otherwise a singleton will be used Only makes sense for non-instant reactions |
Procs | |
does_react | Special conditions unique to the reaction |
get_reaction_speed_multiplicator | proc to calculate the rate with which the reaction does work with. To modify a reaction speed, either modify this or the reaction_speed variable |
get_total_reaction_volume | this gets the total volume of the reaction mixture, according to the required chemical list this proc does not take factors into account, so you can increase the reaction speed of a reaction, like in real life, by adding one reagent in excess although this has some inaccuracies in comparison to real chemical reaction, i refrain from introducing accurate reaction kinetics for performance and my sanity reasons this gets inaccurate results in recipes which have one or more reagents checked in other procs, so there this proc has to be modified |
get_volume_reaction_speed_factor | this factor scaled lineary from 0 upwards, increasing by 1 for each reaction_volume_for_double in the reaction we need this factor seperatly because there are some reactions which have akward scaling for different chemicals, like e.g. the oil or diethyl ether recipe |
on_end_reaction | Called when a non-instant reaction ends, not called for instant reactions |
on_reaction | Called when something reacts or every tick while it is reacting |
physical_shock | Called when a holder filled with a current (non-instant) reaction experiences physical shock |
Var Details
consume_all
If set to 1, the recipe will consume ALL of its components instead of just proportional parts.
drinkrecipe
Is the result a drink?
eventual_result
Used for complex reactions to show what they actually produce at the end (chem request console needs this) Can be a list or a single string ID
hidden
should this reaction show up in anything player-facing that lists reactions. For secret repo chems, misc precursors, and for 'non-standard' reactions (stuff like voltagen arc, foam reacting with water, etc)
max_temperature
Will not react if above this
min_temperature
Will not react if below this
reaction_icon_state
added to the temperature on reaction, can be negative to remove heat
reaction_speed
units produced per second
reaction_volume_dependant
if TRUE, the reaction scales with volume, with the reaction_speed being the minimum speed the mixture reacts at
reaction_volume_for_double
The reaction speed will scale lineary, with reaction_volume_for_double being the amount of reacting chems in the mixture needed for the reaction to take place at double speed. this means double that would result in triple the reaction speed
special_log_handling
Logs the contents of the reagent holder's container in addition to the reaction itself. Used for foam and smoke (Convair880).
stateful
If TRUE, a separate instance of the reaction will be created for the duration of the active reaction, otherwise a singleton will be used Only makes sense for non-instant reactions
Proc Details
does_react
Special conditions unique to the reaction
get_reaction_speed_multiplicator
proc to calculate the rate with which the reaction does work with. To modify a reaction speed, either modify this or the reaction_speed variable
get_total_reaction_volume
this gets the total volume of the reaction mixture, according to the required chemical list this proc does not take factors into account, so you can increase the reaction speed of a reaction, like in real life, by adding one reagent in excess although this has some inaccuracies in comparison to real chemical reaction, i refrain from introducing accurate reaction kinetics for performance and my sanity reasons this gets inaccurate results in recipes which have one or more reagents checked in other procs, so there this proc has to be modified
get_volume_reaction_speed_factor
this factor scaled lineary from 0 upwards, increasing by 1 for each reaction_volume_for_double in the reaction we need this factor seperatly because there are some reactions which have akward scaling for different chemicals, like e.g. the oil or diethyl ether recipe
on_end_reaction
Called when a non-instant reaction ends, not called for instant reactions
on_reaction
Called when something reacts or every tick while it is reacting
physical_shock
Called when a holder filled with a current (non-instant) reaction experiences physical shock