diff --git a/src/main.mjs b/src/main.mjs index ec48819c..1e3261c6 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -36,7 +36,6 @@ async function preloadHandlebarsTemplates() { 'systems/DSA_4-1/templates/ui/partial-sf-button.hbs', 'systems/DSA_4-1/templates/ui/partial-action-button.hbs', 'systems/DSA_4-1/templates/ui/partial-equipment-button.hbs', - 'systems/DSA_4-1/templates/ui/partial-equipment-group-button.hbs', 'systems/DSA_4-1/templates/ui/partial-array-editor.hbs', 'systems/DSA_4-1/templates/dialog/modify-liturgy.hbs' ]); diff --git a/src/module/sheets/character/equipment.mjs b/src/module/sheets/character/equipment.mjs index 4739a516..8406eba8 100644 --- a/src/module/sheets/character/equipment.mjs +++ b/src/module/sheets/character/equipment.mjs @@ -30,8 +30,7 @@ export default { context.equipments = [] context.carryingweight = 0 - Object.values(actorData.items).forEach((item, index) => { - if (item.type === "Equipment") { + actorData.itemTypes.Equipment.forEach((item, index) => { // worn items are halved weight @@ -50,7 +49,7 @@ export default { worn: isWorn(item._id, object) }) context.carryingweight += item.system.quantity * effectiveWeight; - } + }) context.maxcarryingcapacity = actorData.system.attribute.kk.aktuell context.carryingpercentage = Math.min((context.carryingweight / context.maxcarryingcapacity) * 100, 100); diff --git a/src/templates/actor/character/tab-equipment.hbs b/src/templates/actor/character/tab-equipment.hbs index 213deb5c..99b1c335 100644 --- a/src/templates/actor/character/tab-equipment.hbs +++ b/src/templates/actor/character/tab-equipment.hbs @@ -1,5 +1,62 @@ -
- To be done +
+
+ +
+ +
+
+ + +
+

Inventar

+ + {{> "systems/DSA_4-1/templates/ui/partial-equipment-button.hbs" equipments}} + +
+ +
+

Ausrüstung

+ {{!-- Set Tab Navigation --}} + + {{!-- Set Body --}} +
+ {{#each this.sets}} +
+ +
+ + + + + {{#each this.slots}} +
+ {{/each}} + {{#if (eq ../actor.system.setEquipped @index)}} + + {{else}} + + {{/if}} + +
+
+ {{/each}} + +
+
+ +
\ No newline at end of file