2021-01-09 23:39:35 +01:00
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
2021-01-16 23:47:05 +01:00
|
|
|
{{!--
|
|
|
|
!-- Base template to display a value with unit.
|
2021-01-09 23:39:35 +01:00
|
|
|
!-- @param unitDatum: the object to display; must have a value and a unit attribute
|
|
|
|
!-- @param localizationString
|
2021-01-16 23:47:05 +01:00
|
|
|
!-- @param unitNames: mapping of allowed unitDatum.unit values to localized unit name
|
|
|
|
!-- @param unitAbbrs: mapping of allowed unitDatum.unit values to unit abbreviation
|
2021-01-09 23:39:35 +01:00
|
|
|
--}}
|
2021-01-16 23:47:05 +01:00
|
|
|
{{#*inline "unit"}}
|
2021-02-25 19:07:25 +01:00
|
|
|
<div title="{{localize localizationString}} [{{lookup unitNames unitDatum.unit}}]">
|
2021-01-16 23:47:05 +01:00
|
|
|
{{#if unitDatum.value }}
|
2021-01-24 11:06:07 +01:00
|
|
|
{{unitDatum.value}} {{lookup unitAbbrs unitDatum.unit}}
|
2021-01-16 23:47:05 +01:00
|
|
|
{{else}}-{{/if}}
|
2021-01-09 23:39:35 +01:00
|
|
|
</div>
|
|
|
|
{{/inline}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{!--
|
2021-01-16 23:47:05 +01:00
|
|
|
!-- Two templates based on the "unit" template for displaying values with unit.
|
|
|
|
!-- Both accept a `config` object holding the unitNames and unitAbbr instead of
|
|
|
|
!-- directly handing over the latter two.
|
|
|
|
--}}
|
|
|
|
{{#*inline "temporalUnit"}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{> unit unitNames=config.i18n.temporalUnits unitAbbrs=config.i18n.temporalUnitsAbbr unitDatum=unitDatum
|
|
|
|
localizationString=localizationString}}
|
2021-01-16 23:47:05 +01:00
|
|
|
{{/inline}}
|
2021-01-09 23:39:35 +01:00
|
|
|
|
|
|
|
{{#*inline "distanceUnit"}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{> unit unitNames=config.i18n.distanceUnits unitAbbrs=config.i18n.distanceUnitsAbbr unitDatum=unitDatum
|
|
|
|
localizationString=localizationString}}
|
2021-01-09 23:39:35 +01:00
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
|
|
|
|
2021-01-13 17:20:25 +01:00
|
|
|
<div class="tab spells" data-group="primary" data-tab="spells">
|
2021-02-25 19:07:25 +01:00
|
|
|
<ol class="ds4-item-list ds4-item-list--spell item-list">
|
2021-02-25 23:30:45 +01:00
|
|
|
{{#> systems/ds4/templates/actor/partials/item-list-header.hbs isEquipable=true hideDescription=true}}
|
|
|
|
{{!-- spell type --}}
|
|
|
|
<div title="{{localize 'DS4.SpellType'}}">{{localize 'DS4.SpellTypeAbbr'}}</div>
|
|
|
|
{{!-- spell bonus --}}
|
|
|
|
<div title="{{localize 'DS4.SpellBonus'}}">{{localize 'DS4.SpellBonusAbbr'}}</div>
|
|
|
|
{{!-- max. distance --}}
|
|
|
|
<div title="{{localize 'DS4.SpellMaxDistance'}}"><i class="fas fa-ruler"></i></div>
|
|
|
|
{{!-- duration --}}
|
|
|
|
<div title="{{localize 'DS4.SpellDuration'}}"><i class="far fa-clock"></i></div>
|
|
|
|
{{!-- cooldown duration --}}
|
|
|
|
<div title="{{localize 'DS4.SpellCooldownDuration'}}"><i class="fas fa-hourglass-half"></i></div>
|
|
|
|
{{/systems/ds4/templates/actor/partials/item-list-header.hbs}}
|
2021-01-09 23:39:35 +01:00
|
|
|
{{#each itemsByType.spell as |item id|}}
|
2021-02-25 19:07:25 +01:00
|
|
|
<li class="ds4-item-list__row item" data-item-id="{{item._id}}">
|
2021-02-25 23:30:45 +01:00
|
|
|
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox item-change" type="checkbox"
|
|
|
|
{{checked item.data.data.equipped}} data-dtype="Boolean" data-property="data.equipped"
|
2021-02-25 19:07:25 +01:00
|
|
|
title="{{localize 'DS4.ItemEquipped'}}">
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- image --}}
|
2021-02-25 19:07:25 +01:00
|
|
|
<div class="ds4-item-list__image" style="background-image: url('{{item.img}}')" title="{{item.name}}"></div>
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- name --}}
|
2021-02-25 21:04:15 +01:00
|
|
|
<input class="ds4-item-list__editable item-change" type="text" value="{{item.name}}" data-dtype="String"
|
2021-02-20 22:41:33 +01:00
|
|
|
data-property="name" title="{{htmlToPlainText item.data.data.description}}" />
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- spell type --}}
|
2021-02-25 19:07:25 +01:00
|
|
|
<div class="ds4-item-list__image"
|
2021-02-24 04:52:32 +01:00
|
|
|
style="background-image: url('{{lookup ../config.icons.spellTypes item.data.data.spellType}}')"
|
|
|
|
title="{{lookup ../config.i18n.spellTypes item.data.data.spellType}}">
|
2021-01-09 23:39:35 +01:00
|
|
|
</div>
|
|
|
|
{{!-- spell bonus --}}
|
2021-02-25 23:30:45 +01:00
|
|
|
<input class="ds4-item-list__editable item-change" type="text" data-dtype="String"
|
|
|
|
data-property="data.bonus" value="{{item.data.data.bonus}}" title="{{localize 'DS4.SpellBonus'}}" />
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- max. distance --}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{> distanceUnit localizationString='DS4.SpellMaxDistance' unitDatum=item.data.data.maxDistance
|
|
|
|
config=../config}}
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- duration --}}
|
|
|
|
{{> temporalUnit localizationString='DS4.SpellDuration' unitDatum=item.data.data.duration config=../config}}
|
|
|
|
{{!-- cooldown duration --}}
|
2021-02-20 22:41:33 +01:00
|
|
|
{{> temporalUnit localizationString='DS4.SpellCooldownDuration' unitDatum=item.data.data.cooldownDuration
|
|
|
|
config=../config}}
|
2021-01-09 23:39:35 +01:00
|
|
|
{{!-- control buttons --}}
|
|
|
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-23 23:44:49 +01:00
|
|
|
{{!-- add button --}}
|
|
|
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='spell' }}
|
2021-02-20 22:41:33 +01:00
|
|
|
</div>
|