From 768a2752539ae3d1dba085843638084cbaef0d72 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 25 Aug 2024 15:13:50 +0100 Subject: [PATCH] Logged error when nothing can be placed in reward grid --- project/src/controllers/HideoutController.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index bb8f06e5..09530579 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -1330,7 +1330,7 @@ export class HideoutController { //const rewardItemPool = cultistStashDbItem[1]._props.Grids[0]._props.filters[0].Filter; const rewardItemPool = this.getCultistCircleRewardPool(sessionId, pmcData); - this.logger.warning(`Reward pool size: ${rewardItemPool.length}`); + this.logger.warning(`Reward pool item count: ${rewardItemPool.length}`); // Prep rewards array (reward can be item with children, hence array of arrays) const rewards: Item[][] = []; @@ -1375,6 +1375,10 @@ export class HideoutController { output.profileChanges[sessionId].items.new.push(...itemToAdd); pmcData.Inventory.items.push(...itemToAdd); } + } else { + this.logger.error( + `Unable to fit all: ${itemsRewardedCount} reward items into sacrifice grid, nothing will be returned`, + ); } return output;