RimWorld

RimWorld

Bradson's Main Button Icons for VE Textures
NPOu 2 Jan, 2023 @ 12:12pm
Recent Vanilla Textures Expanded update adds Mech menu icon
Vanilla Textures Expanded:
<Operation Class="PatchOperationFindMod">
<mods>
<li>Biotech</li>
</mods>
<match Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationAdd">
<xpath>/Defs/MainButtonDef[defName="Mechs"]</xpath>
<value>
<iconPath>UI/Buttons/MainButtons/IconMechanoids</iconPath>
</value>
</li>
</operations>
</match>
</Operation>

Maybe your mod can check if this exists and if it does do a Replace operation instead of an Add?

XML patch on your mod:
<Operation Class="PatchOperationConditional" MayRequire="Ludeon.RimWorld.Biotech">
<success>Always</success>
<xpath>/Defs/MainButtonDef[defName="Mechs"]/iconPath</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>/Defs/MainButtonDef[defName="Mechs"]</xpath>
<value>
<iconPath>UI/Buttons/MainButtons/Mechs</iconPath>
</value>
</nomatch>
<match Class="PatchOperationReplace">
<xpath>/Defs/MainButtonDef[defName="Mechs"]/iconPath</xpath>
<value>
<iconPath>UI/Buttons/MainButtons/Mechs</iconPath>
</value>
</match>
</Operation>
< >
Showing 1-1 of 1 comments
bradson  [developer] 16 Jan, 2023 @ 2:53pm 
That's how it always worked: https://github.com/bbradson/Main-Button-Icons-for-Vanilla-Textures-Expanded/blob/main/1.4/Patches/MainButtons.xml#L748-L763
If you're getting errors despite me patching with a Conditional it would be a mistake on VE's side. Changing load order should solve it too.
< >
Showing 1-1 of 1 comments
Per page: 1530 50