Skip to content

Commit

Permalink
remove catalyst source info
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiactual committed May 15, 2021
1 parent 4638f0f commit 3af96f7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 60 deletions.
11 changes: 0 additions & 11 deletions config/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@
"UnknownError": "Bungie.net message: {{message}}",
"VendorNotFound": "Vendor data is unavailable."
},
"Catalyst": {
"Source": {
"HeirApparent": "Found during Guardian Games 2021.",
"LeviathansBreath": "Found by defeating powerful enemies with this weapon.",
"Mission": "Complete the \"{{title}}\" mission.",
"Quest": "Complete the \"{{title}}\" quest.",
"RuinousEffigy": "Found by defeating enemies with Transmutation spheres.",
"TheFourthHorseman": "Complete Seraph Bunkers, Seraph Towers, and Legendary Lost Sectors."
}
},
"Compare": {
"Button": "Compare",
"All": "{{type}} ({{quantity}})",
Expand Down Expand Up @@ -751,7 +741,6 @@
"Resets": "1 reset",
"Resets_plural": "{{count}} resets",
"SecretTriumph": "Secret Triumph",
"Source": "Source: {{sourceInfo}}",
"StatTrackers": "Stat Trackers",
"TrackedTriumphs": "Tracked Triumphs",
"QueryFilteredTrackedTriumphs": "None of your tracked triumphs matched the search",
Expand Down
12 changes: 0 additions & 12 deletions i18next-scanner.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ module.exports = {
fallback: false,
separator: false,
},
catalysts: {
list: [
'Quest',
'Mission',
'LeviathansBreath',
'RuinousEffigy',
'TheFourthHorseman',
'HeirApparent',
],
fallback: false,
separator: false,
},
progress: {
list: ['Bounties', 'Items', 'Quests'],
fallback: false,
Expand Down
31 changes: 6 additions & 25 deletions src/app/records/Record.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
DestinyUnlockValueUIStyle,
} from 'bungie-api-ts/destiny2';
import clsx from 'clsx';
import catalystInfo from 'data/d2/catalyst-triumph-info.json';
import catalystIcons from 'data/d2/catalyst-triumph-icons.json';
import legacyTriumphHashes from 'data/d2/legacy-triumphs.json';
import dimTrackedIcon from 'images/dimTrackedIcon.svg';
import pursuitExpired from 'images/pursuitExpired.svg';
Expand Down Expand Up @@ -46,7 +46,7 @@ interface RecordInterval {
rewards: DestinyItemQuantity[];
}

const overrideInfo = Object.keys(catalystInfo).map(Number);
const overrideIcons = Object.keys(catalystIcons).map(Number);

export default function Record({
record,
Expand Down Expand Up @@ -77,32 +77,13 @@ export default function Record({

const name = obscured ? t('Progress.SecretTriumph') : recordDef.displayProperties.name;

const extraInfo = overrideInfo.includes(recordHash);

const title =
extraInfo && catalystInfo[recordHash].titleHash
? catalystInfo[recordHash].key === 'Quest'
? defs.InventoryItem.get(catalystInfo[recordHash].titleHash)?.setData?.questLineName
: catalystInfo[recordHash].key === 'Mission'
? defs.Activity.get(catalystInfo[recordHash].titleHash)?.displayProperties?.name
: null
: null;

const sourceInfo = extraInfo
? catalystInfo[recordHash].source
? defs.InventoryItem.get(catalystInfo[recordHash].source)?.displayProperties.description
: catalystInfo[recordHash].key
? t(`Catalyst.Source.${catalystInfo[recordHash].key}`, { title, contextList: 'catalysts' })
: t('Progress.Redacted')
: null;

const description = obscured
? recordDef.stateInfo.obscuredString
: `${recordDef.displayProperties.description} ${
sourceInfo ? `\n\n${t('Progress.Source', { sourceInfo })}` : ''
}`;
: recordDef.displayProperties.description;

const recordIcon = extraInfo ? catalystInfo[recordHash].icon : recordDef.displayProperties.icon;
const recordIcon = overrideIcons.includes(recordHash)
? catalystIcons[recordHash]
: recordDef.displayProperties.icon;

if (completedRecordsHidden && acquired) {
return null;
Expand Down
File renamed without changes.
12 changes: 0 additions & 12 deletions src/locale/dim.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@
"UnknownError": "Bungie.net message: {{message}}",
"VendorNotFound": "Vendor data is unavailable."
},
"Catalyst": {
"Source": {
"HeirApparent": "Found during Guardian Games 2021.",
"LeviathansBreath": "Found by defeating powerful enemies with this weapon.",
"Mission": "Complete the \"{{title}}\" mission.",
"Quest": "Complete the \"{{title}}\" quest.",
"RuinousEffigy": "Found by defeating enemies with Transmutation spheres.",
"TheFourthHorseman": "Complete Seraph Bunkers, Seraph Towers, and Legendary Lost Sectors."
}
},
"Compare": {
"Archetype": "Archetype",
"Armor2": "Armor 2.0",
Expand Down Expand Up @@ -702,11 +692,9 @@
"QuestExpires": "Expires in ",
"Quests": "Quests",
"RecordValue": "{{value}}pts",
"Redacted": "[REDACTED]",
"Resets": "1 reset",
"Resets_plural": "{{count}} resets",
"SecretTriumph": "Secret Triumph",
"Source": "Source: {{sourceInfo}}",
"StatTrackers": "Stat Trackers",
"TrackedTriumphs": "Tracked Triumphs"
},
Expand Down

0 comments on commit 3af96f7

Please sign in to comment.