Single armor rework start

This commit is contained in:
WBHarry 2026-03-19 13:26:11 +01:00
parent 6e75b81806
commit caea55ade4
7 changed files with 53 additions and 32 deletions

View file

@ -15,8 +15,8 @@
</ol>
<fieldset class="armor-change-container">
<legend>{{localize "DAGGERHEART.GENERAL.armor"}} <a data-action="addTypedChange"><i class="fa-solid fa-plus"></i></a></legend>
<legend>{{localize "DAGGERHEART.GENERAL.armor"}} <input type="checkbox" class="armor-change-checkbox" data-index="{{typedChanges.armor.index}}" {{checked typedChanges.armor}} /></legend>
{{#if typedChanges.armor}}
<header>
<div>{{localize "EFFECT.FIELDS.changes.element.value.label"}}</div>
<div>{{localize "DAGGERHEART.GENERAL.max"}}</div>
@ -24,10 +24,8 @@
<div>{{localize "EFFECT.FIELDS.changes.element.priority.label"}}</div>
</header>
<ol class="scrollable">
{{#each typedChanges.armor as |armor|}}
{{> "systems/daggerheart/templates/sheets/activeEffect/typeChanges/armorChange.hbs" armor fields=@root.systemFields.changes.element.fields}}
{{/each}}
{{> "systems/daggerheart/templates/sheets/activeEffect/typeChanges/armorChange.hbs" typedChanges.armor fields=@root.systemFields.changes.element.fields}}
</ol>
{{/if}}
</fieldset>
</section>

View file

@ -7,5 +7,4 @@
{{formInput fields.typeData.types.armor.fields.max name=(concat "system.changes." index ".typeData.max") value=typeData.max data-dtype="Number"}}
{{formInput fields.typeData.types.armor.fields.armorInteraction name=(concat "system.changes." index ".typeData.armorInteraction") value=typeData.armorInteraction localize=true}}
{{formInput fields.priority name=(concat "system.changes." index ".priority") value=priority}}
<a data-action="deleteChange"><i class="fa-solid fa-trash"></i></a>
</li>