From 4a8c12dc599b048a90340c1b4cc0a3349b0ad8d4 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 9 Feb 2024 15:18:49 +0000 Subject: [PATCH] Improve `canPlaceItemInInventory()` logging Increase attempts to fit into container to 3 from 2 --- project/assets/configs/location.json | 2 +- project/src/helpers/InventoryHelper.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/project/assets/configs/location.json b/project/assets/configs/location.json index c40c2280..e26eb438 100644 --- a/project/assets/configs/location.json +++ b/project/assets/configs/location.json @@ -834,7 +834,7 @@ "enabled": true, "ignoreMaps": ["base", "develop", "hideout", "privatearea", "suburbs", "terminal", "town"] }, - "fitLootIntoContainerAttempts": 2, + "fitLootIntoContainerAttempts": 3, "addOpenZonesToAllMaps": true, "addCustomBotWavesToMaps": true, "enableBotTypeLimits": true, diff --git a/project/src/helpers/InventoryHelper.ts b/project/src/helpers/InventoryHelper.ts index c25619c7..6d39f17f 100644 --- a/project/src/helpers/InventoryHelper.ts +++ b/project/src/helpers/InventoryHelper.ts @@ -276,6 +276,9 @@ export class InventoryHelper } catch (err) { + const errorText = (typeof err === "string") ? ` -> ${err}` : ""; + this.logger.error(`Unable to fit item into inventory: ${errorText}`); + return false; }