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
|
|
@ -144,7 +144,7 @@ export class PlayerSheetv2 extends GenericActorSheet {
|
|||
get #inventoryCapacity() {
|
||||
return {
|
||||
used: this.actor.items
|
||||
.reduce((sum, i) => sum + (i.system.uses_inventory_slot ? i.system.quantity : 0), 0),
|
||||
.reduce((sum, i) => sum + i.usedCapacity, 0),
|
||||
max: this.actor.system.inventory_slots,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue