feat: apply EatableComp to anything with surfaceType Eat
This commit is contained in:
parent
180891f7aa
commit
6db5b51ade
1 changed files with 12 additions and 9 deletions
38
Patches/SurfaceTypeEat.xml
Normal file
38
Patches/SurfaceTypeEat.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2025 Maciej Pawłowski
|
||||
|
||||
This file is part of "Table Eating Toggle".
|
||||
|
||||
"Table Eating Toggle" is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
"Table Eating Toggle" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with "Table Eating Toggle". If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<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>
|
||||
<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>
|
||||
</Patch>
|
Loading…
Add table
Add a link
Reference in a new issue