#6 Lasten und Gewichte #52

Merged
Byroks merged 16 commits from lasten into develop 2024-02-24 11:23:39 +01:00
1 changed files with 6 additions and 6 deletions
Showing only changes of commit 60c7a97ffe - Show all commits

View File

@ -288,19 +288,19 @@ export class M5Character extends Actor {
label += "*";
}
if (item.system.valuable) {
ret.stats.wealth += this.calculateValue(item.system.value, item.system.currency);
ret.stats.wealth += parseFloat((this.calculateValue(item.system.value, item.system.currency) * (item.system.quantity)).toPrecision(3));
}
if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0;
ret.stats.hoard += parseFloat((this.calculateValue(item.system.value, item.system.currency) * (item.system.quantity)).toPrecision(3));
}
if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += item.system.weight;
ret.gear.containers[item.system.containerId].weight += parseFloat((item.system.weight * item.system.quantity).toPrecision(3));
if (ret.gear.containers[item.system.containerId].equipped) {
ret.stats.encumbrance += item.system.weight;
ret.stats.encumbrance += parseFloat((item.system.weight * item.system.quantity).toPrecision(3));
}
} else if (item.system.equipped) {
ret.stats.encumbrance += item.system.weight || 0;
ret.stats.encumbrance += parseFloat(((item.system.weight || 0) * (item.system.quantity)).toPrecision(3));
}
let icon = item.img;