Improve how capacity consumption calculations are performed
This commit is contained in:
parent
cf109a6ed1
commit
aa5c6d5aba
6 changed files with 38 additions and 2 deletions
|
|
@ -1 +1,12 @@
|
|||
export class DotDungeonItem extends Item {};
|
||||
export class DotDungeonItem extends Item {
|
||||
get usedCapacity() {
|
||||
let capacity = 0;
|
||||
if (this.system.uses_inventory_slot && this.system.quantity > 0) {
|
||||
capacity++;
|
||||
};
|
||||
if (this.system.quantity_affects_used_capacity) {
|
||||
capacity *= this.system.quantity;
|
||||
};
|
||||
return capacity;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue