NQualityOfLife.XML.PatchIf - Niilo007/RimWorld-NQoL GitHub Wiki
- PatchIfEnabledAndModsLoaded
- PatchIfSetToAndModsLoaded
- PatchIfSetTo
- PatchIfEnabledAndExists
- PatchIfEnabled
<Operation Class="NQualityOfLife.XML.PatchIf">
<expression>string</expression>
<applyVariables>bool</applyVariables> <!-- true -->
<toVar>string</toVar> <!-- Optional -->
<True Class="PatchOperation">
</True>
<False Class="PatchOperation">
</False>
<done Class="PatchOperation"> <!-- Optional -->
</done>
<error Class="PatchOperation"> <!-- Optional -->
</error>
</Operation>
Currently supports expressions in the formats:
<expression>true == true</expression>
<expression>{var} == true</expression>
<expression>{var} >= {var}</expression>
<expression>"{var}" == "Some String"</expression>
The expression variables follow the same convention as Invoke and Utils.Reflection_.Invoker.
The evaluation result gets stored in toVar
as 'True', 'False' or 'null'