-
-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10731 from DestinyItemManager/breakerama
Add breaker:intrinsic search and visually differentiate artifact-granted breaker
- Loading branch information
Showing
12 changed files
with
67 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.breakerIcon { | ||
margin: 0 4px; | ||
width: 15px; | ||
height: 15px; | ||
} | ||
|
||
.artifactBreaker { | ||
background-color: #3f8e90; | ||
padding: 1px 2px; | ||
border-radius: 1px; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import BungieImage from 'app/dim-ui/BungieImage'; | ||
import { DimItem } from 'app/inventory/item-types'; | ||
import { useD2Definitions } from 'app/manifest/selectors'; | ||
import { getSeasonalBreakerTypeHash } from 'app/utils/item-utils'; | ||
import clsx from 'clsx'; | ||
import styles from './BreakerType.m.scss'; | ||
|
||
export default function BreakerType({ item }: { item: DimItem }) { | ||
const defs = useD2Definitions()!; | ||
let breakerType = item.breakerType; | ||
let breakerClass: string | undefined; | ||
if (!breakerType) { | ||
const breakerTypeHash = getSeasonalBreakerTypeHash(item); | ||
if (breakerTypeHash) { | ||
breakerType = defs.BreakerType.get(breakerTypeHash); | ||
breakerClass = styles.artifactBreaker; | ||
} | ||
} | ||
|
||
return ( | ||
breakerType && ( | ||
<BungieImage | ||
className={clsx(styles.breakerIcon, breakerClass)} | ||
src={breakerType.displayProperties.icon} | ||
/> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters