fix: bind research menus to their own station - #7
Conversation
A player who owned more than one research station could act on the wrong one. Opening the scrap confirmation fired an inventory close for the station menu, which cleared the player's open-station entry; clicks then fell back to the first station the player owned, so confirming a scrap could delete a different station's project. Each station and scrap-confirm menu now carries its lectern location in an InventoryHolder, and clicks resolve the station from the menu that is open. The per-player open-station map and its first-owned-station fallback are removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughResearch menu inventories now identify their station through a ChangesStation Menu Ownership
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains before merge based on the supplied evidence. An in-game two-station check has not been reported. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The menu now stays bound to its station, and ownership is checked before menu actions run. This reduces the risk of scrapping the wrong station. No new cross-player menu access is evident, though live two-station behavior and block-break protection remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the menu’s place, Comment |
A player who owned more than one research station could act on the wrong one (reported by Dref: "Research station/data needs to be separated per station so a user can have multiple stations at once").
Station data was already stored per lectern; the problem was the menu session. Opening the scrap confirmation fires an inventory close for the station menu, which cleared the player's open-station entry. Clicks then fell back to the first station the player owned, so Scrap → Yes on one station could delete another station's project, and No reopened the wrong station.
Each station menu and scrap confirmation now carries its lectern location in a
StationMenuHolder, and clicks resolve the station from the menu that is open. The per-player open-station map and its first-owned-station fallback are removed. Breaking or scrapping a station only closes that station's own menu.Validation:
mvn clean verifypasses (5 tests). The newMultipleStationsTestfails on the old code (the other station is scrapped) and passes with the fix. The jar loaded cleanly on TFMCDev01 with its full config and no Research warnings. No in-game two-station playtest yet.🤖 Generated with Claude Code
Summary by CodeRabbit