From cdb2af685dd9b6a9ade92a58629491f588e34f45 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Thu, 13 Jun 2024 22:34:23 -0700 Subject: [PATCH 1/2] Add max stack size to item popup --- src/app/item-popup/ItemPopupHeader.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/item-popup/ItemPopupHeader.tsx b/src/app/item-popup/ItemPopupHeader.tsx index c816fa0f8c..f5ac677ed7 100644 --- a/src/app/item-popup/ItemPopupHeader.tsx +++ b/src/app/item-popup/ItemPopupHeader.tsx @@ -76,6 +76,11 @@ export default function ItemPopupHeader({
{showElementIcon && }
{item.primaryStat?.value}
+ {item.maxStackSize > 1 && ( +
+ {item.amount} / {item.maxStackSize} +
+ )} {Boolean(item.powerCap) &&
| {item.powerCap}
} {item.pursuit?.questLine && (
From f3af14e3ea60945e91070faea23ee30dd97d6e3f Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Thu, 13 Jun 2024 22:41:37 -0700 Subject: [PATCH 2/2] Exclude ornaments --- src/app/item-popup/ItemPopupHeader.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/item-popup/ItemPopupHeader.tsx b/src/app/item-popup/ItemPopupHeader.tsx index f5ac677ed7..e38a8fcaaf 100644 --- a/src/app/item-popup/ItemPopupHeader.tsx +++ b/src/app/item-popup/ItemPopupHeader.tsx @@ -9,7 +9,7 @@ import type { ItemTierName } from 'app/search/d2-known-values'; import { LookupTable } from 'app/utils/util-types'; import { DestinyAmmunitionType, DestinyClass } from 'bungie-api-ts/destiny2'; import clsx from 'clsx'; -import { BucketHashes } from 'data/d2/generated-enums'; +import { BucketHashes, ItemCategoryHashes } from 'data/d2/generated-enums'; import heavy from 'destiny-icons/general/ammo-heavy.svg'; import primary from 'destiny-icons/general/ammo-primary.svg'; import special from 'destiny-icons/general/ammo-special.svg'; @@ -76,11 +76,12 @@ export default function ItemPopupHeader({
{showElementIcon && }
{item.primaryStat?.value}
- {item.maxStackSize > 1 && ( -
- {item.amount} / {item.maxStackSize} -
- )} + {item.maxStackSize > 1 && + !item.itemCategoryHashes.includes(ItemCategoryHashes.Mods_Ornament) && ( +
+ {item.amount.toLocaleString()} / {item.maxStackSize.toLocaleString()} +
+ )} {Boolean(item.powerCap) &&
| {item.powerCap}
} {item.pursuit?.questLine && (