Fix duplicate CompProperties_Styleable on inherited ThingDefs#15
Open
Evyatar108 wants to merge 1 commit into
Open
Fix duplicate CompProperties_Styleable on inherited ThingDefs#15Evyatar108 wants to merge 1 commit into
Evyatar108 wants to merge 1 commit into
Conversation
Several MakingFurnitureStyleable patches add CompProperties_Styleable to ThingDefs that already inherit it from abstract parents: - ComponentIndustrial/ComponentSpacer inherit from ResourceBase - EndTable inherits from TableBase The XPath conditional check (`comps/li[@Class="CompProperties_Styleable"]`) only inspects direct XML children and does not resolve RimWorld's XML inheritance (ParentName). This causes duplicate CompStyleable components, which write duplicate <sourcePrecept> entries during save. On load, the second <sourcePrecept> collides with the next XML element, producing errors like: Could not load reference to Verse.Precept named null This patch removes the redundant operations for these defs since they already have CompStyleable via their parent chain. Only 1.6 patches are modified — 1.5 inheritance was not verified. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e387f97 to
f697ed3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MakingFurnitureStyleablepatches (1.6) addCompProperties_Styleableto ThingDefs that already inherit it from abstract parents (ResourceBase,TableBase)comps/li[@Class="CompProperties_Styleable"]) only inspects direct XML children and does not resolve RimWorld's XML inheritance (ParentName)CompStyleablecomponents, which write duplicate<sourcePrecept>entries on save, causing load errors:Could not load reference to Verse.Precept named nullAffected defs (1.6)
ComponentsPatch.xmlEndTablePatch.xmlFix
Removed the redundant
PatchOperationConditionalblocks for these defs since they already haveCompStyleablevia their parent chain. The empty<Patch>elements are kept with comments explaining why.Test plan
sourcePreceptduplicate errors no longer appear on load