tragkraft-containerwert-abw-kidoprep (#103)

+ Added ABW to items
+ Added warning for over-capacity
+ Added Valuecalculation for containers
+ Updated KiDo-template

Reviewed-on: #103
Reviewed-by: Byroks <byroks@gmail.com>
Co-authored-by: LeFrique <lefrique@live.de>
Co-committed-by: LeFrique <lefrique@live.de>
This commit was merged in pull request #103.
This commit is contained in:
2024-05-01 19:10:47 +02:00
committed by Le-Frique
parent 5a1e11d0d7
commit 37d6ba12e7
11 changed files with 89 additions and 30 deletions
+5
View File
@@ -280,6 +280,7 @@ export class M5Character extends Actor {
if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += parseFloat((item.system.weight * item.system.quantity).toPrecision(4));
ret.gear.containers[item.system.containerId].value += parseFloat(this.calculateValue(item.system.value * item.system.quantity, item.system.currency).toPrecision(3));
if (ret.gear.containers[item.system.containerId].equipped) {
ret.stats.encumbrance += item.system.weight * item.system.quantity;
}
@@ -302,6 +303,7 @@ export class M5Character extends Actor {
label: label,
icon: icon,
magic: item.system.magic,
abw: item.system.abw || 0,
calc: item.system.calc,
equipped: item.system?.equipped,
valuable: item.system?.valuable,
@@ -352,6 +354,7 @@ export class M5Character extends Actor {
icon: item.img,
skillId: item.system.skillId,
magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
@@ -395,6 +398,7 @@ export class M5Character extends Actor {
icon: item.img,
skillId: item.system.skillId,
magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
@@ -438,6 +442,7 @@ export class M5Character extends Actor {
label: label,
icon: item.img,
magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,