From 6fc990c62d380bff71b823efc099bf729779409f Mon Sep 17 00:00:00 2001 From: Rob Jones Date: Thu, 20 Jun 2024 18:30:31 -0600 Subject: [PATCH 1/2] add special sidearm, remove engram rewards... --- output/extended-ich.json | 57 ++++-------------------------------- src/generate-extended-ich.ts | 18 ++++++++++-- 2 files changed, 21 insertions(+), 54 deletions(-) diff --git a/output/extended-ich.json b/output/extended-ich.json index 0ac633fb..8446f33b 100644 --- a/output/extended-ich.json +++ b/output/extended-ich.json @@ -1,6 +1,5 @@ { "2307365": -11, - "32200569": -153950757, "40394833": -153950757, "46125926": -153950757, "64236626": -11, @@ -9,12 +8,8 @@ "135029084": -11, "199733460": 55, "239189018": 55, - "249396569": -153950757, "268260373": -153950757, - "268778229": -153950757, - "301198419": -153950757, "304659313": -153950757, - "374313494": -153950757, "411397829": -11, "447296102": -153950757, "487361141": -11, @@ -22,109 +17,67 @@ "522366885": -11, "568611921": -153950757, "568611922": -153950757, - "592147383": -153950757, "599895591": -11, "613334176": -153950757, "672957262": -153950757, "731147178": -11, - "776613950": -11, "817909300": -153950757, "825554997": -11, - "928944654": -153950757, "959037361": -153950757, "981718087": -153950757, - "1047537927": -153950757, "1125217994": -153950757, "1151688091": -153950757, - "1188570357": -11, "1197771438": -153950757, "1218113510": -153950757, - "1272458185": -153950757, - "1303489964": -153950757, "1332123064": -153950757, - "1472159692": -153950757, "1606497639": -153950757, - "1674839226": -153950757, - "1827044758": -153950757, "1854753405": -153950757, "1870979911": -153950757, - "1875799486": -153950757, - "1881106972": -153950757, - "1921571489": -153950757, "1946491241": -153950757, - "1968285571": -153950757, "1983332560": -153950757, "1988218406": -11, "2026087437": -153950757, "2060863616": -153950757, "2108920981": -153950757, + "2179048386": -14, "2185327324": -11, + "2198166292": -14, "2213504923": 55, "2306182339": -153950757, "2326716489": -11, - "2350475759": -153950757, "2352138838": 55, "2357297366": -153950757, - "2359407071": -153950757, - "2361174764": -153950757, "2378101424": -153950757, - "2420210290": -153950757, - "2421977839": -153950757, "2480074702": -153950757, - "2483503540": -153950757, - "2521448082": -153950757, "2531963421": -11, "2545426109": 55, "2584830733": -153950757, "2653171212": -11, - "2710835876": -153950757, "2734369894": -153950757, - "2756045968": -153950757, "2782847179": -11, "2812324401": -153950757, "2821430069": -11, - "2895506597": -153950757, "2936850733": -153950757, - "2962131771": -153950757, - "2986432616": -153950757, - "3013473326": -153950757, - "3028576030": -153950757, - "3188175770": -153950757, "3224066584": 55, - "3238953348": -153950757, "3246523829": -153950757, "3252697558": -153950757, - "3270117773": -153950757, - "3364224034": -11, - "3414637070": -153950757, - "3478212090": -153950757, - "3515920060": -153950757, - "3547665279": -153950757, + "3381450498": -14, "3549153978": -153950757, "3556971406": -11, - "3585040495": -153950757, "3616586446": -11, "3686538757": -153950757, "3745974521": -153950757, "3821409356": -153950757, "3849810018": -153950757, "3850168899": -153950757, - "3853268371": -153950757, - "3853528362": -153950757, - "3858926262": -11, - "3956489672": -153950757, + "3886719505": -14, + "3947966653": -14, "3993415705": -153950757, - "3994513295": -11, - "4018050479": -11, "4037745684": -11, "4038592169": -153950757, "4043921923": -153950757, - "4078494680": -11, "4096943616": -153950757, - "4110557383": -153950757, - "4116268584": -153950757, "4162642204": -153950757, - "4225442983": -153950757, "4248569242": -11, "4255586669": -153950757 } diff --git a/src/generate-extended-ich.ts b/src/generate-extended-ich.ts index 096b8cc5..67a663fd 100644 --- a/src/generate-extended-ich.ts +++ b/src/generate-extended-ich.ts @@ -6,18 +6,28 @@ const inventoryItems = getAllDefs('InventoryItem'); const ffGrenadeLaunchers = inventoryItems.filter( (item) => - item.itemCategoryHashes?.includes(ItemCategoryHashes.GrenadeLaunchers) && + item.itemCategoryHashes?.includes(ItemCategoryHashes.Weapon) && + item.itemCategoryHashes.includes(ItemCategoryHashes.GrenadeLaunchers) && !item.itemCategoryHashes.includes(ItemCategoryHashes.PowerWeapon) && !item.itemCategoryHashes.includes(ItemCategoryHashes.Dummies), ); const slugShotguns = inventoryItems.filter( (item) => - item.itemCategoryHashes?.includes(ItemCategoryHashes.Shotgun) && + item.itemCategoryHashes?.includes(ItemCategoryHashes.Weapon) && + item.itemCategoryHashes.includes(ItemCategoryHashes.Shotgun) && !item.itemCategoryHashes.includes(ItemCategoryHashes.Dummies) && item.sockets?.socketEntries[0].singleInitialItemHash === 918679156, // Slug Precision Frame ); +const specialSidearms = inventoryItems.filter( + (item) => + item.itemCategoryHashes?.includes(ItemCategoryHashes.Weapon) && + item.itemCategoryHashes.includes(ItemCategoryHashes.Sidearm) && + !item.itemCategoryHashes.includes(ItemCategoryHashes.Dummies) && + item.equippingBlock?.ammoType === 2, // special ammo +); + const festivalMasks = inventoryItems.filter((item) => item.itemTypeDisplayName?.includes('Festival Mask'), ); @@ -32,6 +42,10 @@ slugShotguns.forEach((ssg) => { extendedICH[ssg.hash] = -ItemCategoryHashes.Shotgun; }); +specialSidearms.forEach((ssa) => { + extendedICH[ssa.hash] = -ItemCategoryHashes.Sidearm; +}); + festivalMasks.forEach((fm) => { extendedICH[fm.hash] = ItemCategoryHashes.Mask; }); From 15ca118528d27eec563762523fc2fb418e4b37b9 Mon Sep 17 00:00:00 2001 From: Rob Jones Date: Fri, 21 Jun 2024 13:09:07 -0600 Subject: [PATCH 2/2] cleanup --- src/generate-extended-ich.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/generate-extended-ich.ts b/src/generate-extended-ich.ts index 67a663fd..8740f5e5 100644 --- a/src/generate-extended-ich.ts +++ b/src/generate-extended-ich.ts @@ -4,27 +4,27 @@ import { writeFile } from './helpers.js'; const inventoryItems = getAllDefs('InventoryItem'); -const ffGrenadeLaunchers = inventoryItems.filter( +const realWeaponsOnly = inventoryItems.filter( (item) => item.itemCategoryHashes?.includes(ItemCategoryHashes.Weapon) && - item.itemCategoryHashes.includes(ItemCategoryHashes.GrenadeLaunchers) && - !item.itemCategoryHashes.includes(ItemCategoryHashes.PowerWeapon) && !item.itemCategoryHashes.includes(ItemCategoryHashes.Dummies), ); -const slugShotguns = inventoryItems.filter( +const ffGrenadeLaunchers = realWeaponsOnly.filter( (item) => - item.itemCategoryHashes?.includes(ItemCategoryHashes.Weapon) && - item.itemCategoryHashes.includes(ItemCategoryHashes.Shotgun) && - !item.itemCategoryHashes.includes(ItemCategoryHashes.Dummies) && + item.itemCategoryHashes?.includes(ItemCategoryHashes.GrenadeLaunchers) && + !item.itemCategoryHashes.includes(ItemCategoryHashes.PowerWeapon), +); + +const slugShotguns = realWeaponsOnly.filter( + (item) => + item.itemCategoryHashes?.includes(ItemCategoryHashes.Shotgun) && item.sockets?.socketEntries[0].singleInitialItemHash === 918679156, // Slug Precision Frame ); -const specialSidearms = inventoryItems.filter( +const specialSidearms = realWeaponsOnly.filter( (item) => - item.itemCategoryHashes?.includes(ItemCategoryHashes.Weapon) && - item.itemCategoryHashes.includes(ItemCategoryHashes.Sidearm) && - !item.itemCategoryHashes.includes(ItemCategoryHashes.Dummies) && + item.itemCategoryHashes?.includes(ItemCategoryHashes.Sidearm) && item.equippingBlock?.ammoType === 2, // special ammo );