Skip to content

Commit

Permalink
Merge pull request #10611 from DestinyItemManager/wishlistable
Browse files Browse the repository at this point in the history
Revert wishlistable change, add is:wishlistable search
  • Loading branch information
bhollis authored Jun 28, 2024
2 parents 3bb8d78 + bfac836 commit 461dfe4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/armory/Armory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ export default function Armory({
<ItemGrid items={storeItems} noLink />
</>
)}
<AllWishlistRolls item={item} realAvailablePlugHashes={realAvailablePlugHashes} />
{item.wishListEnabled && (
<AllWishlistRolls item={item} realAvailablePlugHashes={realAvailablePlugHashes} />
)}
</div>
);
}
4 changes: 3 additions & 1 deletion src/app/inventory/store/d2-item-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/app/item-triage/ItemTriage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function TriageTabToggle({ tabActive, item }: { tabActive: boolean; item:
export function ItemTriage({ item, id }: { item: DimItem; id: string }) {
return (
<div id={id} role="tabpanel" aria-labelledby={`${id}-tab`} className={styles.itemTriagePane}>
{item.bucket.inWeapons && <WishlistTriageSection item={item} />}
{item.wishListEnabled && <WishlistTriageSection item={item} />}
<LoadoutsTriageSection item={item} />
<SimilarItemsTriageSection item={item} />
{item.bucket.inArmor && item.bucket.hash !== BucketHashes.ClassArmor && (
Expand Down
6 changes: 6 additions & 0 deletions src/app/search/items/search-filters/wishlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 1 addition & 0 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 461dfe4

Please sign in to comment.