From 33d1395dea14590073e8987531db62ab39addc88 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 16 Jan 2024 17:24:28 +0000 Subject: [PATCH] Add debug logging to `getSortedMoneyItemsInInventory()` --- project/src/services/PaymentService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/src/services/PaymentService.ts b/project/src/services/PaymentService.ts index da7e6306..49915327 100644 --- a/project/src/services/PaymentService.ts +++ b/project/src/services/PaymentService.ts @@ -337,6 +337,10 @@ export class PaymentService protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string, playerStashId: string): Item[] { const moneyItemsInInventory = this.itemHelper.findBarterItems("tpl", pmcData.Inventory.items, currencyTpl); + if (moneyItemsInInventory?.length === 0) + { + this.logger.debug(`No ${currencyTpl} money items found in inventory`); + } // Prioritise items in stash to top of array moneyItemsInInventory.sort((a, b) => this.prioritiseStashSort(a, b, pmcData.Inventory.items, playerStashId));