Skip to content

Commit

Permalink
Merge pull request #10151 from DestinyItemManager/half-stats
Browse files Browse the repository at this point in the history
Don't show half tiers if auto stat mods is on
  • Loading branch information
bhollis authored Dec 9, 2023
2 parents f9acd53 + a73f782 commit 1a8853a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/loadout-builder/generated-sets/GeneratedSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export default memo(function GeneratedSet({
boostedStats={boostedStats}
existingLoadoutName={overlappingLoadout?.name}
equippedHashes={equippedHashes}
autoStatMods={autoStatMods}
/>
<div className={styles.build}>
<div className={styles.items}>
Expand Down
7 changes: 6 additions & 1 deletion src/app/loadout-builder/generated-sets/SetStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function SetStats({
className,
existingLoadoutName,
equippedHashes,
autoStatMods,
}: {
stats: ArmorStats;
getStatsBreakdown: () => ModStatChanges;
Expand All @@ -34,6 +35,7 @@ export function SetStats({
className?: string;
existingLoadoutName?: string;
equippedHashes: Set<number>;
autoStatMods: boolean;
}) {
const defs = useD2Definitions()!;
const totalTier = calculateTotalTier(stats);
Expand Down Expand Up @@ -72,6 +74,7 @@ export function SetStats({
isBoosted={boostedStats.has(statHash)}
stat={statDef}
value={value}
showHalfStat={!autoStatMods}
/>
</PressTip>
);
Expand All @@ -95,13 +98,15 @@ function Stat({
isActive,
isBoosted,
value,
showHalfStat,
}: {
stat: DestinyStatDefinition;
isActive: boolean;
isBoosted: boolean;
value: number;
showHalfStat: boolean;
}) {
const isHalfTier = isActive && remEuclid(value, 10) >= 5;
const isHalfTier = showHalfStat && isActive && remEuclid(value, 10) >= 5;
return (
<span
className={clsx(styles.statSegment, {
Expand Down

0 comments on commit 1a8853a

Please sign in to comment.