docs(tradable): explain component check#858
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA documentation block is added to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…items The tradableConditions function was blocking all Prime items with weapon/warframe types (Rifle, Pistol, Melee, Warframe, etc.), making 148 Prime items incorrectly untradable. Most of these (143) have tradable components and represent tradable sets. Replace the blanket block with a three-layer approach: 1. Explicit override map for edge cases (Baro weapons, quest-locked items) 2. Component-based detection as the default fallback 3. Items with no tradable components remain untradable (Founders items) Also simplifies the Wraith regex from Wraith\w|\wWraith to just Wraith, which properly matches item names with spaces (e.g. "Strun Wraith"). Adds 25 unit tests for the tradable function covering all cases.
Update JSDoc to use plain Object types instead of import() syntax to satisfy valid-jsdoc rule. Remove Wraith name-match test that was left over after reverting the Wraith regex change.
Revert component-check approach per review feedback. Built Prime items are not directly tradable; only their parts are. Components get their own tradable flag. To determine if a Prime set is tradable, check item.components for parts with tradable: true.
dbf675b to
48eb63b
Compare
|
🎉 This PR is included in version 1.1272.123 🎉 The release is available on: Your semantic-release bot 📦🚀 |
And a comment to clarify how the tradable status is computed.
Considerations
Summary by CodeRabbit