From e5efa67952543a8a078f54f482b1c3d3fe22fc87 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Tue, 3 Sep 2024 16:14:43 -0700 Subject: [PATCH 1/5] Update enhanced/enhanceable keywords Add range to enhanced and update logic to show any enhanced instead of fully-enhanced Exclude enhanced:3 from enhanceable --- docs/CHANGELOG.md | 3 ++ .../search/items/search-filters/sockets.ts | 34 ++++++++++--------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 57a4838dc7..40d96f7a54 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,9 @@ ## Next * `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 'enhanceable' search keyword to exclude Tier 3 Enhancement. ## 8.35.1 (2024-09-01) 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', From 1b82d956a02d40fb146a0a642a3c2cedf554a33c Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Tue, 3 Sep 2024 16:16:50 -0700 Subject: [PATCH 2/5] Update CHANGELOG.md --- docs/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 40d96f7a54..eb4d35a79e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,8 +2,8 @@ * `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 'enhanceable' search keyword to exclude Tier 3 Enhancement. +* 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 Enhancement. ## 8.35.1 (2024-09-01) From 1443230f166134cc71daee26320c198e3020ac60 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Tue, 3 Sep 2024 16:17:28 -0700 Subject: [PATCH 3/5] Update CHANGELOG.md --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index eb4d35a79e..348c588585 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -3,7 +3,7 @@ * `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 Enhancement. +* Update `is:enhanceable` search keyword to exclude Tier 3 Enhanced items. ## 8.35.1 (2024-09-01) From f675ae52ba69c4b4c613326134a0a82e03183f57 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Tue, 3 Sep 2024 16:40:49 -0700 Subject: [PATCH 4/5] Update test snapshot --- src/app/search/__snapshots__/search-config.test.ts.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/search/__snapshots__/search-config.test.ts.snap b/src/app/search/__snapshots__/search-config.test.ts.snap index d186d8da9d..6777ae011a 100644 --- a/src/app/search/__snapshots__/search-config.test.ts.snap +++ b/src/app/search/__snapshots__/search-config.test.ts.snap @@ -155,6 +155,7 @@ exports[`buildSearchConfig generates a reasonable filter map: key-value filters "deepsight", "description", "energycapacity", + "enhanced", "enhancedperk", "exactname", "exactperk", From b30d1002b53a9e6c58ff7156b6ec00083e4e6b5a Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Wed, 4 Sep 2024 21:56:49 -0700 Subject: [PATCH 5/5] Update i18n.json Filter.Enhanced --- config/i18n.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/i18n.json b/config/i18n.json index 0141b938f1..673b1c3167 100644 --- a/config/i18n.json +++ b/config/i18n.json @@ -242,7 +242,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.",