Repository navigation
Conversation
dshadowwolf
left a comment
There was a problem hiding this comment.
Reviewed at medium depth. Only one finding held up after I checked it against the head commit; it's below.
| return definition.behavior().feature(type) | ||
| .map(MachineFeatureDefinition::drawerSettings) | ||
| .orElse(DECLARED_DRAWERS.contains(type) | ||
| ? DrawerSettings.HIDDEN |
There was a problem hiding this comment.
Existing XML machines silently lose drawers.
If the definition doesn't declare a matching feature, side config, stats, curios and backpack now default to HIDDEN, and BuiltinMenuComponents no longer creates AutomationMenu unless the layout has a side-config drawer. base_machine.xml declares stats, curios and backpack but not mmdlib:side_config, so any unpowered machine that extends it loses its side-configuration drawer when it updates. This PR had to add <feature id="automation" type="mmdlib:side_config"/> to admission_demo, porting_workshop and simple_lava_furnace for that reason. A version-1 machine that doesn't extend base_machine loses stats, curios and backpack as well.
Making side config opt-in for unpowered machines is fine (the PR description says so). The problem is that downstream XML (Industrial Overkill, and the Advantage 3 mods once they move to XML machines) changes with no error and no note. There's a version-1 shorthand that keeps <redstone enabled="true"/> working, but nothing like it for side config.
Suggestion: add a CHANGELOG entry under 2.0.3 that names the feature line unpowered machines now need, and add a note to the XML machines docs. Alternatively, log a warning at load when a machine has configurable resources but no side_config feature.
There was a problem hiding this comment.
Thanks for catching the migration gap. 4b9c203 adds the Side Configuration feature declaration to the 2.0.3 changelog and links to the XML guide, which also lists the Statistics, Curios, and Backpack declarations for standalone machines. I checked all four examples against the shipped base definitions.
Changes
Validation
Spotless formatting, Git diff checks, and machine XML parsing passed locally. Runtime tests are deferred to PR CI.
Industrial Overkill will update its MMDLib dependency after an artifact containing these changes is published.