Add debug logging to getSortedMoneyItemsInInventory()
This commit is contained in:
parent
0dc2dd5f68
commit
33d1395dea
@ -337,6 +337,10 @@ export class PaymentService
|
|||||||
protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string, playerStashId: string): Item[]
|
protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string, playerStashId: string): Item[]
|
||||||
{
|
{
|
||||||
const moneyItemsInInventory = this.itemHelper.findBarterItems("tpl", pmcData.Inventory.items, currencyTpl);
|
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
|
// Prioritise items in stash to top of array
|
||||||
moneyItemsInInventory.sort((a, b) => this.prioritiseStashSort(a, b, pmcData.Inventory.items, playerStashId));
|
moneyItemsInInventory.sort((a, b) => this.prioritiseStashSort(a, b, pmcData.Inventory.items, playerStashId));
|
||||||
|
Loading…
Reference in New Issue
Block a user