PatchOperation.FindModByID - RimWorld-CCL-Reborn/PatchOperationHighlander GitHub Wiki
Just like its vanilla PatchOperationFindMod counterpart, executes the PatchOperation in match
if found otherwise nomatch
.
Basic usage. If the mod identified by ccl.patchoperationhighlander
is active, from the given xpath replace deconstructible otherwise claimable.
<Operation Class="PatchOperation.FindModByID">
<mods>
<li>ccl.patchoperation.highlander</li>
</mods>
<match Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]/building/deconstructible</xpath>
<value>
<deconstructible>true</deconstructible>
</value>
</match>
<nomatch Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]/building/claimable</xpath>
<value>
<claimable>true</claimable>
</value>
</nomatch>
</Operation>
Same as above but with Context.
<Operation Class="PatchOperation.Context">
<xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]</xpath>
<operations>
<li Class="PatchOperation.FindModByID">
<mods>
<li>ccl.patchoperation.highlander</li>
</mods>
<match Class="PatchOperationReplace">
<xpath>/ThingDef/building/deconstructible</xpath>
<value>
<deconstructible>true</deconstructible>
</value>
</match>
<nomatch Class="PatchOperationReplace">
<xpath>/ThingDef/building/claimable</xpath>
<value>
<claimable>true</claimable>
</value>
</nomatch>
</li>
</operations>
</Operation>