Skip to content

Commit

Permalink
added new aspects, fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ice-mourne committed Dec 12, 2024
1 parent 1ea99a7 commit 9de0e44
Show file tree
Hide file tree
Showing 6 changed files with 335 additions and 12 deletions.
20 changes: 12 additions & 8 deletions src/filters/subclass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,25 @@ export const subclass = (
if (subclassSockets === undefined) return

const abilitiesCategory = subclassSockets.socketCategories.find(
(socketCategory) => socketCategory.socketCategoryHash === SocketCategoryEnums.abilities
|| socketCategory.socketCategoryHash === SocketCategoryEnums.abilitiesIkora
(socketCategory) =>
socketCategory.socketCategoryHash === SocketCategoryEnums.abilities ||
socketCategory.socketCategoryHash === SocketCategoryEnums.abilitiesIkora
)
const superCategory = subclassSockets.socketCategories.find(
(socketCategory) => socketCategory.socketCategoryHash === SocketCategoryEnums.super
)
const aspectsCategory = subclassSockets.socketCategories.find(
(socketCategory) => socketCategory.socketCategoryHash === SocketCategoryEnums.aspectsIkora
|| socketCategory.socketCategoryHash === SocketCategoryEnums.aspectsStranger
|| socketCategory.socketCategoryHash === SocketCategoryEnums.aspectsNeomuna
(socketCategory) =>
socketCategory.socketCategoryHash === SocketCategoryEnums.aspectsIkora ||
socketCategory.socketCategoryHash === SocketCategoryEnums.aspectsStranger ||
socketCategory.socketCategoryHash === SocketCategoryEnums.aspectsNeomuna
)
const fragmentsCategory = subclassSockets.socketCategories.find(
(socketCategory) => socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsIkora
|| socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsStranger
|| socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsNeomuna
(socketCategory) =>
socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsIkora ||
socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsStranger ||
socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsNeomuna ||
socketCategory.socketCategoryHash === SocketCategoryEnums.fragmentsTraveler
)

abilitiesCategory?.socketIndexes.forEach((socketIndex) => {
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { createDescriptionData } from './descriptionData.js'
import { createRawData } from './rawData.js'
import { InventoryItemEnums } from './utils/enums.js'
import { createWeaponFormulaData } from './weaponFormulaData.js'
import { forIn } from 'lodash'

export type PerkData = {
appearsOn: Set<string | number>
Expand All @@ -22,7 +21,8 @@ export type PerkDataList = {
;(async () => {
const { inventoryItem, plugSet, socketType } = await fetchBungieManifest(['inventoryItem', 'plugSet', 'socketType'])
if (inventoryItem === undefined || plugSet === undefined || socketType === undefined) {
throw new Error('Failed to fetch manifest')
console.log('Failed to fetch manifest');
return
}

for (const key in inventoryItem) {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/categorizeItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { InventoryItem, InventoryItems } from '@icemourne/tool-box'

import { ItemTypeEnum, PowerCapHashEnum } from './enums.js'

interface Catagories {
interface Categories {
exoticWeaponsArr: InventoryItem[]
exoticArmorArr: InventoryItem[]
legendaryArmorArr: InventoryItem[]
Expand Down Expand Up @@ -48,7 +48,7 @@ export const categorizeItems = (inventoryItem: InventoryItems) => {

const ghost = (inventoryItem: InventoryItem) => inventoryItem.itemType === ItemTypeEnum.ghost

return Object.values(inventoryItem).reduce<Catagories>(
return Object.values(inventoryItem).reduce<Categories>(
(acc, item) => {
if (exoticWeaponTest(item)) acc.exoticWeaponsArr.push(item)
if (exoticArmorTest(item)) acc.exoticArmorArr.push(item)
Expand Down
4 changes: 4 additions & 0 deletions src/utils/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ export enum SocketCategoryEnums {
abilities = 309722977,
abilitiesIkora = 3218807805,
super = 457473665,

aspectsIkora = 2140934067,
aspectsNeomuna = 764703411,
aspectsStranger = 3400923910,
aspectsTraveler = 2047681910,

fragmentsIkora = 1313488945,
fragmentsNeomuna = 193371309,
fragmentsStranger = 2819965312,
fragmentsTraveler = 271461480,

ghostMods = 3886482628,
}
Expand Down
105 changes: 105 additions & 0 deletions templates/descriptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@
"hash": 64866129,
"type": "Weapon Trait Enhanced"
},
"74393640": {
"name": "Facet of Defiance",
"hash": 74393640,
"type": "Subclass Fragment"
},
"75282108": {
"name": "Weighted Edge",
"hash": 75282108,
Expand Down Expand Up @@ -409,6 +414,56 @@
"hash": 124408337,
"type": "Weapon Trait"
},
"124726496": {
"name": "Facet of Blessing",
"hash": 124726496,
"type": "Subclass Fragment"
},
"124726497": {
"name": "Facet of Command",
"hash": 124726497,
"type": "Subclass Fragment"
},
"124726498": {
"name": "Facet of Purpose",
"hash": 124726498,
"type": "Subclass Fragment"
},
"124726499": {
"name": "Facet of Ruin",
"hash": 124726499,
"type": "Subclass Fragment"
},
"124726500": {
"name": "Facet of Mending",
"hash": 124726500,
"type": "Subclass Fragment"
},
"124726501": {
"name": "Facet of Honor",
"hash": 124726501,
"type": "Subclass Fragment"
},
"124726502": {
"name": "Facet of Sacrifice",
"hash": 124726502,
"type": "Subclass Fragment"
},
"124726503": {
"name": "Facet of Bravery",
"hash": 124726503,
"type": "Subclass Fragment"
},
"124726504": {
"name": "Facet of Dominance",
"hash": 124726504,
"type": "Subclass Fragment"
},
"124726505": {
"name": "Facet of Awakening",
"hash": 124726505,
"type": "Subclass Fragment"
},
"127335543": {
"name": "Dynamic Charge",
"hash": 127335543,
Expand Down Expand Up @@ -7499,6 +7554,56 @@
"hash": 2625980631,
"type": "Subclass Super"
},
"2626922114": {
"name": "Facet of Balance",
"hash": 2626922114,
"type": "Subclass Fragment"
},
"2626922115": {
"name": "Facet of Justice",
"hash": 2626922115,
"type": "Subclass Fragment"
},
"2626922120": {
"name": "Facet of Protection",
"hash": 2626922120,
"type": "Subclass Fragment"
},
"2626922121": {
"name": "Facet of Grace",
"hash": 2626922121,
"type": "Subclass Fragment"
},
"2626922122": {
"name": "Facet of Hope",
"hash": 2626922122,
"type": "Subclass Fragment"
},
"2626922123": {
"name": "Facet of Solitude",
"hash": 2626922123,
"type": "Subclass Fragment"
},
"2626922124": {
"name": "Facet of Courage",
"hash": 2626922124,
"type": "Subclass Fragment"
},
"2626922125": {
"name": "Facet of Devotion",
"hash": 2626922125,
"type": "Subclass Fragment"
},
"2626922126": {
"name": "Facet of Dawn",
"hash": 2626922126,
"type": "Subclass Fragment"
},
"2626922127": {
"name": "Facet of Generosity",
"hash": 2626922127,
"type": "Subclass Fragment"
},
"2628485816": {
"name": "Strafe Glide",
"hash": 2628485816,
Expand Down
Loading

0 comments on commit 9de0e44

Please sign in to comment.