Skip to content

Instantly share code, notes, and snippets.

@notfood
Created May 6, 2021 16:03
Show Gist options
  • Save notfood/16131f8a9dcfdd2fe781179773595589 to your computer and use it in GitHub Desktop.
Save notfood/16131f8a9dcfdd2fe781179773595589 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Patch>
<!-- Add inspectorTabs if there are no inspectorTabs yet. -->
<!-- Add ResearchInfo.RI_ITab either way -->
<Operation Class="PatchOperationConditional">
<xpath>/Defs/ThingDef[thingClass="Building_ResearchBench"]/inspectorTabs</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[thingClass="Building_ResearchBench"]</xpath>
<value>
<inspectorTabs>
<li>ResearchInfo.RI_ITab</li>
</inspectorTabs>
</value>
</nomatch>
<match Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[thingClass="Building_ResearchBench"]/inspectorTabs</xpath>
<value>
<li>ResearchInfo.RI_ITab</li>
</value>
</match>
</Operation>
</Patch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment