fix: make durability reduce returns, default rates to 0.5 - #27
Conversation
DurabilityScaler read MMOITEMS_CUSTOM_DURABILITY, which MMOItems 6.10 never writes, and ignored the max_damage component, so worn gear always returned as if new. It now reads MMOITEMS_DURABILITY against MMOITEMS_MAX_DURABILITY (full when not yet damaged), and otherwise vanilla damage against max_damage or the material default. All item-type return rates default to 0.5 (recipes stay 1.0), and the recipes entry now explains what it scales. 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 (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughDefault return rates for several crafted-item categories change from 0.8 to 0.5. Durability scaling now uses MMOItems maximum and remaining durability tags, and uses item-specific maximum damage when available. ChangesCrafted-Item Return Rates
Durability Scaling
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The PR’s return-rate changes are consistent, and recipe outputs follow the documented multiplier. The MMOItems tag conversion could not be confirmed, but no concrete merge-blocking failure is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes do not demonstrate a new permission bypass or broader access. They primarily reduce recycling returns while preserving configured overrides. Compatibility with the deployed durability reader remains unverified, so the intended output behavior is not fully established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the rates at dawn, Comment |
Summary
Durability never reduced returns.
DurabilityScalerhad two bugs, so worn gear always recycled as if new:MMOITEMS_CUSTOM_DURABILITY, which MMOItems 6.10 never writes. The live counter isMMOITEMS_DURABILITY(againstMMOITEMS_MAX_DURABILITY; absent means never damaged). This is what AdvancedCrafting gear and Magic weapon parts use.max_damagecomponent (MMOItemsmax-item-damage).Both are fixed. The old unit test asserted the wrong tag and is updated.
Rates. All
return_ratesdefaults are now 0.5;recipesstays 1.0. Therecipesentry now explains that it multiplies the fixed outputs written inrecipes/*.yml.Testing
mvn verifypasses with the 100% coverage gate.STICKbase (e.g.MAGE_IRON_STAFFwithmax-item-damage) are stackable, so Paper refuses to damage them; they never wear and keep a full return.🤖 Generated with Claude Code
Summary by CodeRabbit