Add hooks for confirming and refunding construction charges - #24
Conversation
BeginVehicleConstructionEvent gains keepPlacement, so a listener can cancel the first left-click and wait for a confirming second one without the player having to reopen the station menu. A new VehicleConstructionCancelEvent fires when a started construction is abandoned, so charges taken at the start can be refunded alongside the dropped materials. Categories now keep their config order. 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. 📝 WalkthroughWalkthroughConstruction events now support retaining placement after cancellation and report abandoned construction details. The category map now preserves insertion order during iteration. ChangesConstruction lifecycle
Category ordering
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The construction hooks and category ordering appear ready to merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The new refund hook covers ordinary cancellation, but it does not provide a reliable signal for every recovery path. A failed or repeated cancellation could also leave materials and an external charge out of sync. No direct fee exploit is established because the charging plugin is outside this review. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
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 watched the stations hum Comment |
SimpleFactions is adding vehicle registration fees charged when a build starts, with a confirm step. This adds the hooks it needs.
BeginVehicleConstructionEvent#setKeepPlacement(true): when a listener cancels the event with this set, the player's placement stays active, so another left-click within the 30-second window fires the event again. Without the flag, behaviour is unchanged.VehicleConstructionCancelEvent: fired fromActiveStation.cancelConstruction()after the materials are dropped (station removed, or its blueprint vanished on reload), so charges taken at the start can be refunded.CategoryLoader.mapis now aLinkedHashMap(the field type staysHashMapfor binary compatibility), so the station menu and other plugins list categories in config order.Consumer: TF-Minecraft/SimpleFactions vehicle fees PR (pins this release).
🤖 Generated with Claude Code
Summary by CodeRabbit