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:
parent
c03cd1dcd7
commit
71c091e04a
1 changed files with 4 additions and 1 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue