From 3d8d09cc1871ba1419ca5a3f07ac3798c90308a2 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 21 Aug 2024 19:56:29 +0100 Subject: [PATCH] Expanded implementation of `circleOfCultistProductionStart` --- project/src/controllers/HideoutController.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index cd17682e..b5256bd2 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -1257,10 +1257,19 @@ export class HideoutController { request: IHideoutCircleOfCultistProductionStartRequestData, ): IItemEventRouterResponse | PromiseLike { // TODO - // Find items that have been sacrificed in player inventory - // Delete items from inventory + // Do we start a craft? - throw new Error("Method not implemented."); + const output = this.eventOutputHolder.getOutput(sessionId); + + // Get root items inside cultist grid and remove them from inventory + const inventoryRootItemsInCultistGrid = pmcData.Inventory.items.filter( + (item) => item.slotId === "CircleOfCultistsGrid1", + ); + for (const rootItem of inventoryRootItemsInCultistGrid) { + this.inventoryHelper.removeItem(pmcData, rootItem._id, sessionId, output); + } + + return output; } /**