Skip to content

Commit

Permalink
update and warning
Browse files Browse the repository at this point in the history
  • Loading branch information
delphiactual committed Jun 12, 2024
1 parent 6f04760 commit 830dc52
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/generate-artifact-breaker-weapons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const artifactVendor = inventoryItems.find(
)!.preview!.previewVendorHash;
const artifactMods = getDef('Vendor', artifactVendor)!
// Take the last 25 mods, since sometimes Bungie doesn't deprecate the old mods
// Had to increase this by 10 during TFS due to ??Classified?? mods?
// Had to increase this by 10 during TFS due to additional rows being added per act in each episode
.itemList.slice(-35)
.map((i) => getDef('InventoryItem', i.itemHash))
.filter((i) => i?.perks);
Expand Down Expand Up @@ -69,4 +69,23 @@ for (const mod of artifactMods) {
}
}

// If we do not have at least one of each breaker type something is wrong
if (
breakerMods[BreakerTypeHashes.ShieldPiercing].length == 0 ||
breakerMods[BreakerTypeHashes.Disruption].length == 0 ||
breakerMods[BreakerTypeHashes.Stagger].length == 0
) {
let missingType = '';
if (breakerMods[BreakerTypeHashes.ShieldPiercing].length == 0) {
missingType += 'Anti-Barrier ';
}
if (breakerMods[BreakerTypeHashes.Disruption].length == 0) {
missingType += 'Overload ';
}
if (breakerMods[BreakerTypeHashes.Stagger].length == 0) {
missingType += 'Unstoppable';
}
warnLog(TAG, `Missing Breaker(s): ${missingType}`);
}

writeFile('./output/artifact-breaker-weapon-types.json', breakerMods);

0 comments on commit 830dc52

Please sign in to comment.