RimWorld
Medieval Overhaul
Compatibility fix for research bench
If you get an error about duplicate nodes on startup, and your simple research benches don't connect to the Medieval Overhaul bookshelves that are supposed to provide a research speed boost, this is why.

(this mod's folder)/1.3/Patches/Add_AffectedByFacilities_SimpleResearchBench.xml doesn't check to see if the xml nodes it's adding already exist from other mods. This is all the same code, just in stages and inside a couple checks so it only adds the lines it actually needs to.

<?xml version="1.0" encoding="utf-8"?>
<Patch>
<Operation Class="PatchOperationConditional">
<xpath>/Defs/ThingDef[defName="SimpleResearchBench"]/comps</xpath>
<match Class="PatchOperationConditional">
<xpath>/Defs/ThingDef[defName="SimpleResearchBench"]/comps/li[@Class="CompProperties_AffectedByFacilities"]</xpath>
<match Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="SimpleResearchBench"]/comps/li[@Class="CompProperties_AffectedByFacilities"]/linkableFacilities</xpath>
<value>
<li>DankPyon_RusticBookshelf</li>
</value>
</match>
<nomatch Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="SimpleResearchBench"]/comps</xpath>
<value>
<li Class="CompProperties_AffectedByFacilities">
<linkableFacilities>
<li>DankPyon_RusticBookshelf</li>
</linkableFacilities>
</li>
</value>
</nomatch>
</match>
<nomatch Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="SimpleResearchBench"]</xpath>
<value>
<comps>
<li Class="CompProperties_AffectedByFacilities">
<linkableFacilities>
<li>DankPyon_RusticBookshelf</li>
</linkableFacilities>
</li>
</comps>
</value>
</nomatch>
</Operation>
</Patch>
< >
1-1 van 1 reacties weergegeven
That error had been annoying me and I was not bothered learning the code to make this happen, so thank you!
< >
1-1 van 1 reacties weergegeven
Per pagina: 1530 50