边缘世界 RimWorld

边缘世界 RimWorld

Medieval Overhaul
Phant0m5 2022 年 5 月 28 日 下午 11:25
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 条,共 1 条留言
Circus_O 2022 年 8 月 12 日 上午 1:27 
That error had been annoying me and I was not bothered learning the code to make this happen, so thank you!
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50