From e8e918ff0cce3b3fd93c7d8ef32cb8be3a9b0431 Mon Sep 17 00:00:00 2001 From: Sainan Date: Sat, 11 Jan 2025 12:54:11 +0100 Subject: [PATCH] fix: purchasing of ship decorations (#761) --- src/services/inventoryService.ts | 42 ++++++++++---------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 3968fc77..28c6cbba 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -142,6 +142,19 @@ export const addItem = async ( } else if (ExportResources[typeName].productCategory == "CrewShips") { const inventoryChanges = addCrewShip(inventory, typeName); return { InventoryChanges: inventoryChanges }; + } else if (ExportResources[typeName].productCategory == "ShipDecorations") { + const changes = [ + { + ItemType: typeName, + ItemCount: quantity + } satisfies IMiscItem + ]; + addShipDecorations(inventory, changes); + return { + InventoryChanges: { + ShipDecorations: changes + } + }; } else { const miscItemChanges = [ { @@ -253,21 +266,6 @@ export const addItem = async ( } }; } - case "Objects": { - // /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon) - const changes = [ - { - ItemType: typeName, - ItemCount: quantity - } satisfies IMiscItem - ]; - addShipDecorations(inventory, changes); - return { - InventoryChanges: { - ShipDecorations: changes - } - }; - } case "Types": switch (typeName.substr(1).split("/")[2]) { case "Sentinels": { @@ -282,20 +280,6 @@ export const addItem = async ( } case "Items": { switch (typeName.substr(1).split("/")[3]) { - case "ShipDecos": { - const changes = [ - { - ItemType: typeName, - ItemCount: quantity - } satisfies IMiscItem - ]; - addShipDecorations(inventory, changes); - return { - InventoryChanges: { - ShipDecorations: changes - } - }; - } default: { const miscItemChanges = [ {