forked from notfood/PatchOperationHighlander
-
Notifications
You must be signed in to change notification settings - Fork 0
PatchOperation.FindModByID
Meru edited this page Jul 23, 2021
·
3 revisions
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>