diff --git a/src/services/shipCustomizationsService.ts b/src/services/shipCustomizationsService.ts index 47764917..0e506969 100644 --- a/src/services/shipCustomizationsService.ts +++ b/src/services/shipCustomizationsService.ts @@ -13,6 +13,7 @@ import { config } from "./configService"; import { Guild } from "../models/guildModel"; import { hasGuildPermission } from "./guildService"; import { GuildPermission } from "../types/guildTypes"; +import { ExportResources } from "warframe-public-export-plus"; export const setShipCustomizations = async ( accountId: string, @@ -121,7 +122,8 @@ export const handleSetShipDecorations = async ( if (!config.unlockAllShipDecorations) { const inventory = await getInventory(accountId); - addShipDecorations(inventory, [{ ItemType: placedDecoration.Type, ItemCount: 1 }]); + const itemType = Object.entries(ExportResources).find(arr => arr[1].deco == placedDecoration.Type)![0]; + addShipDecorations(inventory, [{ ItemType: itemType, ItemCount: 1 }]); await inventory.save(); } @@ -134,7 +136,8 @@ export const handleSetShipDecorations = async ( } else { if (!config.unlockAllShipDecorations) { const inventory = await getInventory(accountId); - addShipDecorations(inventory, [{ ItemType: placedDecoration.Type, ItemCount: -1 }]); + const itemType = Object.entries(ExportResources).find(arr => arr[1].deco == placedDecoration.Type)![0]; + addShipDecorations(inventory, [{ ItemType: itemType, ItemCount: -1 }]); await inventory.save(); } }