feat: apply EatableComp to anything with surfaceType Eat

This commit is contained in:
Maciej Pawłowski 2025-04-19 20:49:57 +02:00
parent 180891f7aa
commit 6db5b51ade
Signed by: maciek
GPG key ID: 9FC186633565C9C7

View file

@ -14,21 +14,24 @@ You should have received a copy of the GNU General Public License along with "Ta
<Operation Class="PatchOperationSequence">
<operations>
<li Class="PatchOperationConditional">
<xpath>Defs/ThingDef[@Name="TableBase"]/comps</xpath>
<xpath>Defs/ThingDef[surfaceType="Eat"]/comps</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[@Name="TableBase"]</xpath>
<xpath>Defs/ThingDef[surfaceType="Eat"]</xpath>
<value>
<comps />
</value>
</nomatch>
</li>
<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[@Name="TableBase"]/comps</xpath>
<value>
<li>
<compClass>TableToggle.EatableComp</compClass>
</li>
</value>
<li Class="PatchOperationConditional">
<xpath>Defs/ThingDef[surfaceType="Eat"]/comps/li[compClass="TableToggle.EatableComp"]</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[surfaceType="Eat"]/comps</xpath>
<value>
<li>
<compClass>TableToggle.EatableComp</compClass>
</li>
</value>
</nomatch>
</li>
</operations>
</Operation>