fix label-input matching for core values and addit text to combat values
This commit is contained in:
parent
959bfcc3e4
commit
9b7d3e5a7b
10 changed files with 63 additions and 18 deletions
|
@ -9,20 +9,24 @@ SPDX-License-Identifier: MIT
|
|||
!--
|
||||
!-- @param combat-value-key: The key of the combat value
|
||||
!-- @param combat-value-data: The data for the combat value
|
||||
!-- @param combat-value-label: The label for the combat value
|
||||
!-- @param combat-value-title: The title for the combat value
|
||||
!-- @param combat-value-label: The label for the combat value (possibly an abbreviation)
|
||||
!-- @param actor-id: The id of the actor the core value belongs to
|
||||
--}}
|
||||
|
||||
<div class="ds4-combat-value">
|
||||
<div class="ds4-combat-value__value ds4-combat-value__value--{{combat-value-key}}"
|
||||
title="{{combat-value-label}}: {{combat-value-data.tooltip}}">
|
||||
title="{{combat-value-title}}: {{combat-value-data.tooltip}}">
|
||||
{{combat-value-data.total}}
|
||||
</div>
|
||||
<span title="{{combat-value-title}}" class="ds4-combat-value__label">{{combat-value-label}}</span>
|
||||
<div class="ds4-combat-value__formula">
|
||||
<span class="ds4-combat-value__formula-base"
|
||||
title="{{combat-value-label}} {{localize 'DS4.TooltipBaseValue'}}">{{combat-value-data.base}}</span>
|
||||
title="{{combat-value-title}} {{localize 'DS4.TooltipBaseValue'}}">{{combat-value-data.base}}</span>
|
||||
<span>+</span>
|
||||
<input class="ds4-combat-value__formula-modifier" type="number" name="data.combatValues.{{combat-value-key}}.mod"
|
||||
value='{{combat-value-data.mod}}' data-dtype="Number"
|
||||
title="{{combat-value-label}} {{localize 'DS4.TooltipModifier'}}" />
|
||||
<input class="ds4-combat-value__formula-modifier" type="number"
|
||||
id="data.combatValues.{{combat-value-key}}.mod-{{actor-id}}"
|
||||
name="data.combatValues.{{combat-value-key}}.mod" value='{{combat-value-data.mod}}' data-dtype="Number"
|
||||
title="{{combat-value-title}} {{localize 'DS4.TooltipModifier'}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,8 +6,10 @@ SPDX-License-Identifier: MIT
|
|||
--}}
|
||||
|
||||
<div class="ds4-combat-values">
|
||||
{{#each config.i18n.combatValues as |combat-value-label combat-value-key|}}
|
||||
{{#each config.i18n.combatValues as |combat-value-title combat-value-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/combat-value.hbs combat-value-key=combat-value-key
|
||||
combat-value-data=(lookup ../data.data.combatValues combat-value-key) combat-value-label=combat-value-label}}
|
||||
combat-value-data=(lookup ../data.data.combatValues combat-value-key) combat-value-label=(lookup
|
||||
../config.i18n.combatValuesSheet combat-value-key) combat-value-title=combat-value-title
|
||||
actor-id=../data._id}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
@ -11,21 +11,22 @@ SPDX-License-Identifier: MIT
|
|||
!-- @param core-value-key: The key of the core value
|
||||
!-- @param core-value-data: The data for the core value
|
||||
!-- @param core-value-variant: The variant of the core value, i.e. attribute or trait
|
||||
!-- @param actor-id: The id of the actor the core value belongs to
|
||||
--}}
|
||||
|
||||
<div class="ds4-core-value ds4-core-value--{{core-value-variant}}">
|
||||
<label for="data.{{core-value-variant}}s.{{core-value-key}}.base"
|
||||
<label for="data.{{core-value-variant}}s.{{core-value-key}}.base-{{actor-id}}"
|
||||
class="ds4-core-value__label">{{core-value-label}}</label>
|
||||
<div class="ds4-core-value__value">
|
||||
<input class="ds4-core-value__value-input" type="number"
|
||||
name="data.{{core-value-variant}}s.{{core-value-key}}.base"
|
||||
id="data.{{core-value-variant}}s.{{core-value-key}}.base" value='{{core-value-data.base}}'
|
||||
id="data.{{core-value-variant}}s.{{core-value-key}}.base-{{actor-id}}" value='{{core-value-data.base}}'
|
||||
data-dtype="Number" title="{{core-value-label}} {{localize 'DS4.TooltipBaseValue'}}" />
|
||||
<span>+</span>
|
||||
<input class="ds4-core-value__value-input" type="number"
|
||||
name="data.{{core-value-variant}}s.{{core-value-key}}.mod"
|
||||
id="data.{{core-value-variant}}s.{{core-value-key}}.mod" value='{{core-value-data.mod}}' data-dtype="Number"
|
||||
title="{{core-value-label}} {{localize 'DS4.TooltipModifier'}}" />
|
||||
id="data.{{core-value-variant}}s.{{core-value-key}}.mod-{{actor-id}}" value='{{core-value-data.mod}}'
|
||||
data-dtype="Number" title="{{core-value-label}} {{localize 'DS4.TooltipModifier'}}" />
|
||||
<span class="ds4-core-value__value-arrow">➞</span>
|
||||
<span class="ds4-core-value__value-total"
|
||||
title="{{core-value-label}}: {{core-value-data.tooltip}}">{{core-value-data.total}}</span>
|
||||
|
|
|
@ -9,11 +9,11 @@ SPDX-License-Identifier: MIT
|
|||
{{#each config.i18n.attributes as |attribute-label attribute-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=attribute-label
|
||||
core-value-key=attribute-key core-value-data=(lookup ../data.data.attributes
|
||||
attribute-key) core-value-variant="attribute"}}
|
||||
attribute-key) core-value-variant="attribute" actor-id=../data._id}}
|
||||
{{/each}}
|
||||
{{#each config.i18n.traits as |trait-label trait-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=trait-label
|
||||
core-value-key=trait-key
|
||||
core-value-data=(lookup ../data.data.traits trait-key) core-value-variant="trait"}}
|
||||
core-value-data=(lookup ../data.data.traits trait-key) core-value-variant="trait" actor-id=../data._id}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
@ -5,6 +5,6 @@ SPDX-License-Identifier: MIT
|
|||
--}}
|
||||
|
||||
<div class="tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
{{editor content=data.data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue