diff --git a/config/i18n.json b/config/i18n.json index 2ac96ffd73..2ecacab5c8 100644 --- a/config/i18n.json +++ b/config/i18n.json @@ -243,7 +243,7 @@ "Energy": "Shows items that have energy capacity (Armor 2.0).", "Engrams": "Shows engrams.", "EnhancedPerk": "Shows weapons that have the specified number of enhanced perks.", - "Enhanced": "Shows weapons that have been enhanced.", + "Enhanced": "Shows weapons based on their enhancement tier.", "Enhanceable": "Shows weapons that can be enhanced.", "Equipment": "Items that can be equipped.", "Equipped": "Items that are currently equipped on a character.", diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d06faa1bae..bb877eb1ec 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,9 @@ * In the item picker, you can long-press or shift-click an item to see its item details. A regular click still pulls that item. * `breaker:` searches now match items that can have that breaker type granted by this season's artifact (whether or not the correct artifact mods are enabled). The effective breaker type from artifact mods also now shows up on item tiles and in the Armory. +* Add Enhancement tier to weapon level bar. +* Update `enhanced` search keyword to allow range of values (0/1/2/3). Old `is:enhanced` behavior is now `enhanced:3`. +* Update `is:enhanceable` search keyword to exclude Tier 3 Enhanced items. ## 8.35.1 (2024-09-01) diff --git a/src/app/search/__snapshots__/search-config.test.ts.snap b/src/app/search/__snapshots__/search-config.test.ts.snap index 110ae61455..21a1958238 100644 --- a/src/app/search/__snapshots__/search-config.test.ts.snap +++ b/src/app/search/__snapshots__/search-config.test.ts.snap @@ -156,6 +156,7 @@ exports[`buildSearchConfig generates a reasonable filter map: key-value filters "deepsight", "description", "energycapacity", + "enhanced", "enhancedperk", "exactname", "exactperk", diff --git a/src/app/search/items/search-filters/sockets.ts b/src/app/search/items/search-filters/sockets.ts index 8b3220b30e..0a3ec3e821 100644 --- a/src/app/search/items/search-filters/sockets.ts +++ b/src/app/search/items/search-filters/sockets.ts @@ -312,28 +312,30 @@ const socketFilters: ItemFilterDefinition[] = [ destinyVersion: 2, filter: () => (item) => Boolean( - item.sockets?.allSockets.some( - (s) => - s.plugged?.plugDef.plug.plugCategoryHash === - PlugCategoryHashes.CraftingPlugsWeaponsModsEnhancers, - ), + (item.craftedInfo?.enhancementTier || 0) < 3 && + item.sockets?.allSockets.some( + (s) => + s.plugged?.plugDef.plug.plugCategoryHash === + PlugCategoryHashes.CraftingPlugsWeaponsModsEnhancers, + ), ), }, { - // this currently tests for full enhancedness, returning false for partially-enhanced items keywords: 'enhanced', description: tl('Filter.Enhanced'), destinyVersion: 2, - format: ['simple'], // TO-DO: add 'range' here - filter: - ({ lhs }) => - (item) => { - if (lhs === 'is') { - // rules out partially-enhanced items - // the game explicitly warns you that partially-enhanced items stop looking masterworked - return item.crafted === 'enhanced' && item.masterwork; - } - }, + format: ['simple', 'range'], + filter: ({ lhs, compare }) => { + if (compare) { + return (item) => compare(item.craftedInfo?.enhancementTier || 0); + } + if (lhs === 'is') { + return (item) => + item.crafted === 'enhanced' && (item.craftedInfo?.enhancementTier || 0) > 0; + } + // shouldn't ever get here but need the default case + return (_item) => false; + }, }, { keywords: 'retiredperk',