RimWorld

RimWorld

Harvest Organs Post Mortem
Fixed RecipePatch.xml for you:
Fixed RecipePatch.xml for you:

<Patch>
<Operation Class="PatchOperationConditional">
<xpath>*/RecipeDef[defName = "ButcherCorpseFlesh"]/defaultIngredientFilter/specialFiltersToDisallow</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>*/RecipeDef[defName = "ButcherCorpseFlesh"]/defaultIngredientFilter</xpath>
<value>
<specialFiltersToDisallow>
<li>PossibleToHarvest</li>
<li>PossibleToHarvestAnimal</li>
</specialFiltersToDisallow>
</value>
</nomatch>
<match Class="PatchOperationAdd">
<xpath>*/RecipeDef[defName = "ButcherCorpseFlesh"]/defaultIngredientFilter/specialFiltersToDisallow</xpath>
<value>
<li>PossibleToHarvest</li>
<li>PossibleToHarvestAnimal</li>
</value>
</match>
</Operation>

<Operation Class="PatchOperationConditional">
<xpath>*/RecipeDef[defName = "CremateCorpse"]/defaultIngredientFilter</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>*/RecipeDef[defName = "CremateCorpse"]/defaultIngredientFilter</xpath>
<value>
<specialFiltersToDisallow>
<li>PossibleToHarvest</li>
<li>PossibleToHarvestAnimal</li>
</specialFiltersToDisallow>
</value>
</nomatch>
<match Class="PatchOperationAdd">
<xpath>*/RecipeDef[defName = "CremateCorpse"]/defaultIngredientFilter/specialFiltersToDisallow</xpath>
<value>
<li>PossibleToHarvest</li>
<li>PossibleToHarvestAnimal</li>
</value>
</match>
</Operation>
</Patch>

<!-- much better as it tests foir specialFiltersToDissallow to case whether it should insert in or insert the element -->