From 6a867b1a8c2e5931f66744d1a78920a0d6fdc0c4 Mon Sep 17 00:00:00 2001 From: robojumper Date: Tue, 21 Nov 2023 18:55:55 +0100 Subject: [PATCH] More focusing output fixes --- output/focusing-item-outputs.json | 18 +++++++++--------- src/generate-focusing-item-outputs.ts | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/output/focusing-item-outputs.json b/output/focusing-item-outputs.json index 32d4612e..be7a13c3 100644 --- a/output/focusing-item-outputs.json +++ b/output/focusing-item-outputs.json @@ -24,7 +24,7 @@ "234708547": 3813221631, "253950230": 469333264, "279578169": 297009581, - "293795567": 1812185909, + "293795567": 3207116971, "295845425": 874623537, "296152704": 1896287986, "296378791": 108286515, @@ -160,7 +160,7 @@ "1230745668": 2065081837, "1232437646": 619556600, "1240056416": 1322042322, - "1242556131": 178749005, + "1242556131": 2009892127, "1245100546": 1474735276, "1253824749": 2966283697, "1260343369": 3045642045, @@ -199,7 +199,7 @@ "1529271412": 2326396534, "1533952342": 433905699, "1547375670": 2766109872, - "1549471512": 1392054568, + "1549471512": 1524444346, "1555319323": 106575079, "1560482644": 1788603939, "1564178759": 1613581523, @@ -419,7 +419,7 @@ "2974942014": 4269346472, "2976734344": 3651039338, "2986968300": 241462142, - "2989732283": 1392054568, + "2989732283": 3631862279, "2997491826": 2066074780, "2999252751": 3942036043, "3000094897": 105306149, @@ -459,7 +459,7 @@ "3204561957": 1630000089, "3209555251": 310708513, "3215932179": 863163983, - "3224735856": 178749005, + "3224735856": 1108278178, "3237668309": 2094233929, "3245195304": 1678205741, "3248496910": 2102025592, @@ -485,7 +485,7 @@ "3345357730": 1321354572, "3368700430": 436615288, "3382832422": 2355943840, - "3384059383": 273457849, + "3384059383": 3761819011, "3389132614": 2821430069, "3392204241": 2653171213, "3407894354": 555258620, @@ -514,7 +514,7 @@ "3553325799": 2717305289, "3566338354": 3487011804, "3569895394": 3565520715, - "3572799518": 1812185909, + "3572799518": 4086100104, "3573404221": 609852545, "3580701310": 136355432, "3609776694": 854379020, @@ -560,7 +560,7 @@ "3765731481": 539816333, "3771606505": 1283202269, "3784881871": 1080431755, - "3809684989": 371726421, + "3809684989": 2381337281, "3810124151": 4287947559, "3813271866": 216983039, "3814033537": 475652357, @@ -580,7 +580,7 @@ "3883022513": 1779796469, "3884696647": 736382419, "3891912205": 868732497, - "3895829948": 273457849, + "3895829948": 1578461326, "3912211141": 1345569657, "3923407559": 1045743955, "3929896313": 2888266564, diff --git a/src/generate-focusing-item-outputs.ts b/src/generate-focusing-item-outputs.ts index 4ca47e0f..d26b4777 100644 --- a/src/generate-focusing-item-outputs.ts +++ b/src/generate-focusing-item-outputs.ts @@ -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(); @@ -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 =