Update personalRoomsService.ts

This commit is contained in:
AMelonInsideLemon 2025-10-21 05:59:03 +02:00
parent 23bef17ce1
commit 87b859b8b3

View File

@ -25,10 +25,9 @@ export const unlockShipFeature = async (inventory: TInventoryDatabaseDocument, s
} else {
personalRooms.Ship.Features.push(shipFeature);
await personalRooms.save();
const miscItem = inventory.MiscItems.find(x => x.ItemType === shipFeature);
if (miscItem && miscItem.ItemCount > 0) await addItem(inventory, shipFeature, -1);
}
const miscItem = inventory.MiscItems.find(x => x.ItemType === shipFeature);
if (miscItem && miscItem.ItemCount > 0) await addItem(inventory, shipFeature, miscItem.ItemCount * -1);
};
export const createGarden = (): IGardeningDatabase => {