Tweak the way that the logic for usedCapacity is working to make it correct and bit easier to read

This commit is contained in:
Oliver-Akins 2024-03-30 13:00:05 -06:00
parent 0f28e23b5c
commit be31e98dea

View file

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