Skip to content

Commit

Permalink
More focusing output fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robojumper committed Nov 21, 2023
1 parent be3e216 commit 6a867b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions output/focusing-item-outputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"234708547": 3813221631,
"253950230": 469333264,
"279578169": 297009581,
"293795567": 1812185909,
"293795567": 3207116971,
"295845425": 874623537,
"296152704": 1896287986,
"296378791": 108286515,
Expand Down Expand Up @@ -160,7 +160,7 @@
"1230745668": 2065081837,
"1232437646": 619556600,
"1240056416": 1322042322,
"1242556131": 178749005,
"1242556131": 2009892127,
"1245100546": 1474735276,
"1253824749": 2966283697,
"1260343369": 3045642045,
Expand Down Expand Up @@ -199,7 +199,7 @@
"1529271412": 2326396534,
"1533952342": 433905699,
"1547375670": 2766109872,
"1549471512": 1392054568,
"1549471512": 1524444346,
"1555319323": 106575079,
"1560482644": 1788603939,
"1564178759": 1613581523,
Expand Down Expand Up @@ -419,7 +419,7 @@
"2974942014": 4269346472,
"2976734344": 3651039338,
"2986968300": 241462142,
"2989732283": 1392054568,
"2989732283": 3631862279,
"2997491826": 2066074780,
"2999252751": 3942036043,
"3000094897": 105306149,
Expand Down Expand Up @@ -459,7 +459,7 @@
"3204561957": 1630000089,
"3209555251": 310708513,
"3215932179": 863163983,
"3224735856": 178749005,
"3224735856": 1108278178,
"3237668309": 2094233929,
"3245195304": 1678205741,
"3248496910": 2102025592,
Expand All @@ -485,7 +485,7 @@
"3345357730": 1321354572,
"3368700430": 436615288,
"3382832422": 2355943840,
"3384059383": 273457849,
"3384059383": 3761819011,
"3389132614": 2821430069,
"3392204241": 2653171213,
"3407894354": 555258620,
Expand Down Expand Up @@ -514,7 +514,7 @@
"3553325799": 2717305289,
"3566338354": 3487011804,
"3569895394": 3565520715,
"3572799518": 1812185909,
"3572799518": 4086100104,
"3573404221": 609852545,
"3580701310": 136355432,
"3609776694": 854379020,
Expand Down Expand Up @@ -560,7 +560,7 @@
"3765731481": 539816333,
"3771606505": 1283202269,
"3784881871": 1080431755,
"3809684989": 371726421,
"3809684989": 2381337281,
"3810124151": 4287947559,
"3813271866": 216983039,
"3814033537": 475652357,
Expand All @@ -580,7 +580,7 @@
"3883022513": 1779796469,
"3884696647": 736382419,
"3891912205": 868732497,
"3895829948": 273457849,
"3895829948": 1578461326,
"3912211141": 1345569657,
"3923407559": 1045743955,
"3929896313": 2888266564,
Expand Down
6 changes: 4 additions & 2 deletions src/generate-focusing-item-outputs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAllDefs, getDef, loadLocal } from '@d2api/manifest-node';
import { DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2/interfaces.js';
import { DestinyClass, DestinyInventoryItemDefinition } from 'bungie-api-ts/destiny2/interfaces.js';
import { ItemCategoryHashes } from '../data/generated-enums.js';
import { writeFile } from './helpers.js';
loadLocal();
Expand Down Expand Up @@ -50,7 +50,9 @@ for (const vendor of getAllDefs('Vendor')) {
}
exampleDef ||= def;
const candidates = possibleOutputItemsByName[def.displayProperties.name].filter(
(c) => c.itemTypeDisplayName === def.itemTypeDisplayName
(c) =>
c.itemTypeDisplayName === def.itemTypeDisplayName &&
(def.classType === DestinyClass.Unknown || c.classType === def.classType)
);
if (candidates?.length) {
let best =
Expand Down

0 comments on commit 6a867b1

Please sign in to comment.