mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 15:33:37 +02:00
[V14] Refactor ArmorChange schema and fix some bugs (#1742)
* Refactor ArmorChange schema and fix some bugs * Add current back to schema * Fixed so changing armor values and taking damage works again * Fixed so that scrolltexts for armor changes work again * Removed old marks on armor.system * Restored damageReductionDialog armorScore.value * Use toggle for css class addition/removal * Fix armor change type choices * Added ArmorChange DamageThresholds --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
6193153596
commit
50dcbf4396
68 changed files with 356 additions and 428 deletions
|
|
@ -1,20 +0,0 @@
|
|||
<section class="tab scrollable{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
{{formGroup fields.tint value=source.tint rootId=rootId placeholder="#ffffff"}}
|
||||
{{formGroup fields.description value=source.description rootId=rootId}}
|
||||
{{formGroup fields.disabled value=source.disabled rootId=rootId}}
|
||||
|
||||
{{#if isActorEffect}}
|
||||
<div class="form-group">
|
||||
<label>{{localize "EFFECT.FIELDS.origin.label"}}</label>
|
||||
<div class="form-fields">
|
||||
<input type="text" value="{{source.origin}}" disabled />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if isItemEffect}}
|
||||
{{formGroup fields.transfer value=source.transfer rootId=rootId label=legacyTransfer.label hint=(localize "DAGGERHEART.EFFECTS.Attachments.transferHint")}}
|
||||
{{/if}}
|
||||
|
||||
{{formGroup fields.showIcon value=source.showIcon options=showIconOptions rootId=rootId}}
|
||||
</section>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<section class='tab-form-footer padded'>
|
||||
<button type="button" data-action="finish"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
||||
</section>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
<fieldset>
|
||||
<legend>{{localize "Armor"}}</legend>
|
||||
<div class="two-columns even">
|
||||
{{#each source.system.changes as |change index|}}
|
||||
{{formGroup @root.systemFields.changes.element.fields.value name=(concat 'system.changes.' index '.value') value=change.value localize=true}}
|
||||
{{formGroup @root.systemFields.changes.element.fields.max name=(concat 'system.changes.' index '.max') value=change.max localize=true}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.general"}}</legend>
|
||||
|
||||
{{formGroup @root.systemFields.armorInteraction name="system.armorInteraction" value=source.system.armorInteraction localize=true}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
@ -3,7 +3,9 @@
|
|||
<input type="text" class="effect-change-input" name="{{change.keyPath}}" value="{{change.key}}" />
|
||||
</div>
|
||||
<div class="type">
|
||||
{{formInput fields.type name=change.typePath value=change.type localize=true}}
|
||||
<select name="{{change.typePath}}">
|
||||
{{selectOptions types selected=change.type localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="value">
|
||||
{{formInput fields.value name=change.valuePath value=change.value elementType="input"}}
|
||||
|
|
|
|||
|
|
@ -17,15 +17,7 @@
|
|||
<fieldset class="armor-change-container">
|
||||
<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>
|
||||
<div>{{localize "DAGGERHEART.EFFECTS.ChangeTypes.armor.FIELDS.armorInteraction.label"}}</div>
|
||||
<div>{{localize "EFFECT.FIELDS.changes.element.priority.label"}}</div>
|
||||
</header>
|
||||
<ol class="scrollable">
|
||||
{{> "systems/daggerheart/templates/sheets/activeEffect/typeChanges/armorChange.hbs" typedChanges.armor fields=@root.systemFields.changes.element.fields}}
|
||||
</ol>
|
||||
{{> "systems/daggerheart/templates/sheets/activeEffect/typeChanges/armorChange.hbs" typedChanges.armor fields=@root.systemFields.changes.element.types.armor.fields}}
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,28 @@
|
|||
<li data-index="{{index}}">
|
||||
<input type="hidden" name="{{concat "system.changes." index ".key"}}" value="{{key}}" />
|
||||
<input type="hidden" name="{{concat "system.changes." index ".type"}}" value="{{type}}" />
|
||||
<input type="hidden" name="{{concat "system.changes." index ".phase"}}" value="{{phase}}" />
|
||||
<input type="hidden" name="{{concat "system.changes." index ".typeData.type"}}" value="{{typeData.type}}" />
|
||||
{{formInput fields.value name=(concat "system.changes." index ".value") value=value elementType="input" data-dtype="Number"}}
|
||||
{{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}}
|
||||
</li>
|
||||
<header>
|
||||
<div>{{localize "EFFECT.FIELDS.changes.element.value.label"}}</div>
|
||||
<div>{{localize "DAGGERHEART.GENERAL.max"}}</div>
|
||||
<div>{{localize "DAGGERHEART.EFFECTS.ChangeTypes.armor.FIELDS.interaction.label"}}</div>
|
||||
<div>{{localize "EFFECT.FIELDS.changes.element.priority.label"}}</div>
|
||||
</header>
|
||||
<ol class="scrollable">
|
||||
<li data-index="{{index}}">
|
||||
<input type="hidden" name="{{concat "system.changes." index ".type"}}" value="{{type}}" />
|
||||
<input type="hidden" name="{{concat "system.changes." index ".phase"}}" value="{{phase}}" />
|
||||
{{formInput fields.value.fields.current name=(concat "system.changes." index ".value.current") value=value.current data-dtype="Number"}}
|
||||
{{formInput fields.value.fields.max name=(concat "system.changes." index ".value.max") value=value.max data-dtype="Number"}}
|
||||
{{formInput fields.value.fields.interaction name=(concat "system.changes." index ".value.interaction") value=value.interaction localize=true}}
|
||||
{{formInput fields.priority name=(concat "system.changes." index ".priority") value=priority}}
|
||||
</li>
|
||||
</ol>
|
||||
<div class="damage-thresholds-container">
|
||||
<div class="damage-threshold-title">
|
||||
<span>{{localize "DAGGERHEART.GENERAL.DamageThresholds.title"}}</span>
|
||||
<input type="checkbox" class="armor-damage-thresholds-checkbox" data-index="{{index}}" {{checked value.damageThresholds}} />
|
||||
</div>
|
||||
{{#if value.damageThresholds}}
|
||||
<div class="flexrow">
|
||||
{{formGroup fields.value.fields.damageThresholds.fields.major name=(concat "system.changes." index ".value.damageThresholds.major") value=value.damageThresholds.major localize=true }}
|
||||
{{formGroup fields.value.fields.damageThresholds.fields.severe name=(concat "system.changes." index ".value.damageThresholds.severe") value=value.damageThresholds.severe localize=true }}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
</h3>
|
||||
<h3>
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseScore"}}:
|
||||
{{source.system.baseScore}}
|
||||
{{source.system.armorData.max}}
|
||||
<span>-</span>
|
||||
{{localize "DAGGERHEART.ITEMS.Armor.baseThresholds.base"}}:
|
||||
{{source.system.baseThresholds.major}}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="slot-bar">
|
||||
{{#times source.max}}
|
||||
<a class='armor-slot' data-value="{{add this 1}}" data-uuid="{{source.uuid}}">
|
||||
{{#if (gte ../value (add this 1))}}
|
||||
{{#if (gte ../current (add this 1))}}
|
||||
<i class="fa-solid fa-shield" data-index="{{this}}"></i>
|
||||
{{else}}
|
||||
<i class="fa-solid fa-shield-halved" data-index="{{this}}"></i>
|
||||
|
|
@ -21,13 +21,13 @@
|
|||
<p class="armor-source-label">{{source.name}}</p>
|
||||
<div class="status-bar armor-slots">
|
||||
<div class='status-value'>
|
||||
<input class="bar-input armor-marks-input" value="{{source.value}}" data-uuid="{{source.uuid}}" type="number">
|
||||
<input class="bar-input armor-marks-input" value="{{source.current}}" data-uuid="{{source.uuid}}" type="number">
|
||||
<span>/</span>
|
||||
<span class="bar-label">{{source.max}}</span>
|
||||
</div>
|
||||
<progress
|
||||
class='progress-bar stress-color'
|
||||
value='{{source.value}}'
|
||||
value='{{source.current}}'
|
||||
max='{{source.max}}'
|
||||
></progress>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue