Class MixReactions
Registers custom mixing reactions: deterministic rules that transform the effects a mix produces. A rule fires when a product is mixed with an ingredient contributing a specific effect and the result already carries another specific effect, letting mods build combo and chain effects.
public static class MixReactions
- Inheritance
-
MixReactions
- Inherited Members
Remarks
Rules are applied after the game's own mixing calculation, on every client (the calculation is deterministic, so no networking is required as long as every peer has the same rules and effects).
Methods
AddRule(PropertyBase, PropertyBase, PropertyBase, DrugType?, bool)
Adds a mixing reaction rule.
public static void AddRule(PropertyBase mixerEffect, PropertyBase whenResultContains, PropertyBase addResult, DrugType? drug = null, bool replaceMatched = false)
Parameters
mixerEffectPropertyBaseThe effect the mixed-in ingredient contributes (drives this reaction).
whenResultContainsPropertyBaseAn effect that must already be present in the mix result for the rule to fire.
addResultPropertyBaseThe effect produced by the reaction.
drugDrugType?Restrict the rule to a specific drug, or null to apply to all drugs.
replaceMatchedboolIf
true, the produced effect replaceswhenResultContains; iffalse, it is added alongside it (up to the 8-effect cap).
Clear()
Removes all registered mixing reaction rules.
public static void Clear()