diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 89950811..5544b6d8 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -75,9 +75,9 @@ export const addSentinel = async (sentinelName: string, accountId: string) => { export const addPowerSuit = async (powersuitName: string, accountId: string): Promise => { const specialItems = await getExalted(powersuitName); - if(specialItems != false){ + if (specialItems != false) { for await (const specialItem of specialItems) { - await addSpecialItem(specialItem, accountId) + await addSpecialItem(specialItem, accountId); } } const inventory = await getInventory(accountId); @@ -88,9 +88,9 @@ export const addPowerSuit = async (powersuitName: string, accountId: string): Pr export const addMechSuit = async (mechsuitName: string, accountId: string) => { const specialItems = await getExalted(mechsuitName); - if(specialItems != false){ + if (specialItems != false) { for await (const specialItem of specialItems) { - await addSpecialItem(specialItem, accountId) + await addSpecialItem(specialItem, accountId); } } const inventory = await getInventory(accountId); @@ -101,9 +101,15 @@ export const addMechSuit = async (mechsuitName: string, accountId: string) => { export const addSpecialItem = async (itemName: string, accountId: string) => { const inventory = await getInventory(accountId); - const specialItemIndex = inventory.SpecialItems.push({ ItemType: itemName, Configs: [], Features: 1, UpgradeVer: 101, XP: 0 }); + const specialItemIndex = inventory.SpecialItems.push({ + ItemType: itemName, + Configs: [], + Features: 1, + UpgradeVer: 101, + XP: 0 + }); const changedInventory = await inventory.save(); - return changedInventory.SpecialItems[specialItemIndex -1].toJSON(); + return changedInventory.SpecialItems[specialItemIndex - 1].toJSON(); }; export const updateSlots = async (accountId: string, slotName: SlotNames, slotAmount: number, extraAmount: number) => { diff --git a/src/services/itemDataService.ts b/src/services/itemDataService.ts index 835d32d0..0b74da6e 100644 --- a/src/services/itemDataService.ts +++ b/src/services/itemDataService.ts @@ -5,7 +5,6 @@ import badItems from "@/static/json/exclude-mods.json"; import dict_en from "@/node_modules/warframe-public-export-plus/dict.en.json"; import exportSuits from "@/node_modules/warframe-public-export-plus/ExportWarframes.json"; - export type MinWarframe = Omit; export type MinWeapon = Omit; export type MinItem = Omit; @@ -108,12 +107,12 @@ export const getItemByBlueprint = (uniqueName: string): (MinItem & Buildable) | export const getExalted = (uniqueName: string) => { const suit = getSuitByUniqueName(uniqueName); - if(suit?.exalted !== undefined){ + if (suit?.exalted !== undefined) { return suit.exalted; } else { - return false + return false; } -} +}; export const getItemCategoryByUniqueName = (uniqueName: string) => { //Lotus/Types/Items/MiscItems/PolymerBundle