From bfac83631d315777cc5437af77f27b36f20260e6 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Thu, 27 Jun 2024 18:38:07 -0700 Subject: [PATCH] Revert wishlistable change, add is:wishlistable search --- config/i18n.json | 1 + src/app/armory/Armory.tsx | 4 +++- src/app/inventory/store/d2-item-factory.ts | 4 +++- src/app/item-triage/ItemTriage.tsx | 2 +- src/app/search/items/search-filters/wishlist.ts | 6 ++++++ src/locale/en.json | 1 + 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/config/i18n.json b/config/i18n.json index a4a48dfc73..0811774e29 100644 --- a/config/i18n.json +++ b/config/i18n.json @@ -347,6 +347,7 @@ "WishlistDupe": "Shows duplicate items where at least one of the duplicates is on your wish list.", "WishlistNotes": "Shows wish listed items whose notes match the search.", "WishlistUnknown": "Shows items with no roll recommendations in the loaded wish lists.", + "WishlistEnabled": "Shows items that are eligible to have wish list rolls.", "Year": "Shows items from which year of Destiny they appeared in." }, "General": { diff --git a/src/app/armory/Armory.tsx b/src/app/armory/Armory.tsx index bad5a9d582..ea9da3be74 100644 --- a/src/app/armory/Armory.tsx +++ b/src/app/armory/Armory.tsx @@ -251,7 +251,9 @@ export default function Armory({ )} - + {item.wishListEnabled && ( + + )} ); } diff --git a/src/app/inventory/store/d2-item-factory.ts b/src/app/inventory/store/d2-item-factory.ts index 49fc9297b0..7cf1fb5fda 100644 --- a/src/app/inventory/store/d2-item-factory.ts +++ b/src/app/inventory/store/d2-item-factory.ts @@ -577,7 +577,9 @@ export function makeItem( } createdItem.wishListEnabled = Boolean( - createdItem.sockets?.allSockets.some((s) => s.hasRandomizedPlugItems), + createdItem.sockets && + (createdItem.bucket.inWeapons || + (createdItem.bucket.hash === BucketHashes.ClassArmor && createdItem.isExotic)), ); // Extract weapon crafting info from the crafted socket but diff --git a/src/app/item-triage/ItemTriage.tsx b/src/app/item-triage/ItemTriage.tsx index 37cad89fe7..26a4e26a84 100644 --- a/src/app/item-triage/ItemTriage.tsx +++ b/src/app/item-triage/ItemTriage.tsx @@ -82,7 +82,7 @@ export function TriageTabToggle({ tabActive, item }: { tabActive: boolean; item: export function ItemTriage({ item, id }: { item: DimItem; id: string }) { return (
- {item.bucket.inWeapons && } + {item.wishListEnabled && } {item.bucket.inArmor && item.bucket.hash !== BucketHashes.ClassArmor && ( diff --git a/src/app/search/items/search-filters/wishlist.ts b/src/app/search/items/search-filters/wishlist.ts index 1c0f57547c..14e49d9d26 100644 --- a/src/app/search/items/search-filters/wishlist.ts +++ b/src/app/search/items/search-filters/wishlist.ts @@ -66,6 +66,12 @@ const wishlistFilters: ItemFilterDefinition[] = [ (item) => !wishListsByHash.has(item.hash), }, + { + keywords: 'wishlistable', + destinyVersion: 2, + description: tl('Filter.WishlistEnabled'), + filter: () => (item) => item.wishListEnabled, + }, ]; export default wishlistFilters; diff --git a/src/locale/en.json b/src/locale/en.json index fb694c19c5..bf816bd1f5 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -333,6 +333,7 @@ "WeaponType": "Shows weapons based on their weapon type.", "Wishlist": "Shows items that match your wish list.", "WishlistDupe": "Shows duplicate items where at least one of the duplicates is on your wish list.", + "WishlistEnabled": "Shows items that are eligible to have wish list rolls.", "WishlistNotes": "Shows wish listed items whose notes match the search.", "WishlistUnknown": "Shows items with no roll recommendations in the loaded wish lists.", "Year": "Shows items from which year of Destiny they appeared in."