fix: xml patch now applies correctly

This commit is contained in:
Maciej Pawłowski 2025-04-20 13:32:49 +02:00
parent f21eb3bbf2
commit e7f4a9ed3e
Signed by: maciek
GPG key ID: 9FC186633565C9C7

View file

@ -13,14 +13,12 @@ You should have received a copy of the GNU General Public License along with "Ta
<Patch>
<Operation Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationConditional">
<xpath>Defs/ThingDef[surfaceType="Eat"]/comps</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[surfaceType="Eat"]</xpath>
<value>
<comps />
</value>
</nomatch>
<li Class="PatchOperationAdd">
<success>Always</success>
<xpath>Defs/ThingDef[surfaceType="Eat" and not(comps)]</xpath>
<value>
<comps />
</value>
</li>
<li Class="PatchOperationConditional">
<xpath>Defs/ThingDef[surfaceType="Eat"]/comps/li[compClass="TableToggle.EatableComp"]</xpath>