Various fixes for official release

This commit is contained in:
2026-06-08 22:20:44 +02:00
parent 7623123bb5
commit 3851a38c9f
108 changed files with 1011 additions and 538 deletions
+2 -10
View File
@@ -54,7 +54,7 @@ export default class MGNECharacter extends foundry.abstract.TypeDataModel {
// Compute current load per RAW:
// Only items with a weight field count — features and creature-traits are excluded
// trivial = 0, light = 10 per slot, normal = 1, heavy = fills remaining capacity (max 1)
// trivial = 0, light = 10 per slot, normal = 1, heavy = 2
let normalLoad = 0
let lightCount = 0
let heavyCount = 0
@@ -71,15 +71,7 @@ export default class MGNECharacter extends foundry.abstract.TypeDataModel {
this.lightItemCount = lightCount
this.heavyItemCount = heavyCount
if (heavyCount >= 2) {
// Can't carry two heavy items — automatically overloaded
this.currentLoad = this.carryCapacity + (heavyCount - 1)
} else if (heavyCount === 1) {
// Heavy fills remaining capacity; other items fit alongside it
this.currentLoad = Math.max(normalLoad, this.carryCapacity)
} else {
this.currentLoad = normalLoad
}
this.currentLoad = normalLoad + heavyCount * 2
this.overloaded = this.currentLoad > this.carryCapacity
}