Fix an issue with the capacity calculation not working on items that don't have a quantity (surprisingly more than expected)

This commit is contained in:
Oliver-Akins 2024-03-25 22:55:58 -06:00
parent c03cd1dcd7
commit 71c091e04a

View file

@ -7,7 +7,10 @@ export class DotDungeonItem extends Item {
get usedCapacity() { get usedCapacity() {
let capacity = 0; let capacity = 0;
if (this.system.uses_inventory_slot && this.system.quantity > 0) { if (
this.system.uses_inventory_slot
&& (this.system.quantity === undefined || this.system.quantity > 0)
) {
capacity = 1; capacity = 1;
}; };
if (this.system.quantity_affects_used_capacity) { if (this.system.quantity_affects_used_capacity) {