PatchOperation.Set - notfood/PatchOperationHighlander GitHub Wiki

Given a xpath, add or replace child elements. Useful to change a single element that contains multiple children without setting Context. It'll avoid adding duplicates or complain if any is missing.

Examples

Replace deconstructible and claimable in the building of NonDeconstructibleAncientBuildingBase:

<Operation Class="PatchOperation.Set">
  <xpath>/Defs/ThingDef[@Name="NonDeconstructibleAncientBuildingBase"]/building</xpath>
  <value>
    <deconstructible>true</deconstructible>
    <claimable>true</claimable>
  </value>
</Operation>
⚠️ **GitHub.com Fallback** ⚠️