2021-01-13 17:20:25 +01:00
|
|
|
{{!-- TODO: Refactor to avoid code duplication with creature-special-abilities-overview and talents-overview --}}
|
|
|
|
|
2021-01-06 01:24:37 +01:00
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
|
|
|
{{!-- ======================================================================== --}}
|
2021-01-06 16:29:02 +01:00
|
|
|
|
2021-01-09 01:11:55 +01:00
|
|
|
|
|
|
|
{{!--
|
|
|
|
!-- Render the given partial block only if the given itemsArray has length > 0,
|
|
|
|
!-- else only an add button.
|
|
|
|
!--
|
|
|
|
!-- @param itemsArray: the array with the items to check the length of
|
|
|
|
!-- @param dataType: the string type of the item
|
|
|
|
--}}
|
|
|
|
{{#*inline "ifHasItemOfType"}}
|
|
|
|
{{#if (and (ne itemsArray undefined) (gt itemsArray.length 0))}}
|
|
|
|
{{> @partial-block}}
|
|
|
|
{{/if}}
|
2021-01-23 23:44:49 +01:00
|
|
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
2021-01-07 20:20:40 +01:00
|
|
|
{{!--
|
2021-01-06 16:29:02 +01:00
|
|
|
!-- Render an input element for a rank value property of an item.
|
2021-01-06 01:24:37 +01:00
|
|
|
!--
|
2021-01-06 16:29:02 +01:00
|
|
|
!-- @param item: the item
|
|
|
|
!-- @param property: the key of the property in item.data.data (if 'base', the max value is set automatically)
|
|
|
|
!-- @param disabled: if given, is placed plainly into the input as HTML property;
|
2021-01-07 20:20:40 +01:00
|
|
|
!-- meant to be set to "disabled" to disable the input element
|
2021-01-06 01:24:37 +01:00
|
|
|
--}}
|
|
|
|
{{#*inline "talentRankValue"}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<input class="item-num-val item-change" data-dtype="Number" type="number" min="0" step="1" {{#if (eq property 'base' )
|
|
|
|
}}max="{{item.data.data.rank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
|
|
|
|
value="{{lookup item.data.data.rank property}}" title="{{localize localizeString}}" />
|
2021-01-06 01:24:37 +01:00
|
|
|
{{/inline}}
|
|
|
|
|
2021-01-06 16:29:02 +01:00
|
|
|
|
2021-01-06 01:24:37 +01:00
|
|
|
{{!--
|
|
|
|
!-- Render a talent list row from a given item.
|
|
|
|
!-- It is a flexbox with a child for each item value of interest.
|
|
|
|
!-- The partial assumes a variable item to be given in the context.
|
|
|
|
!--
|
|
|
|
!-- @param item: hand over the item to the partial as hash parameter
|
|
|
|
--}}
|
|
|
|
{{#*inline "talentListEntry"}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image">
|
|
|
|
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
|
|
|
</div>
|
|
|
|
{{!-- name --}}
|
|
|
|
<input class="flex2 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
|
|
|
data-property="name" title="{{localize 'DS4.ItemName'}}">
|
|
|
|
<div class="flex3 flexrow talent-ranks-equation">
|
|
|
|
{{!-- acquired rank --}}
|
|
|
|
{{> talentRankValue item=item property='base' localizeString='DS4.TalentRankBase'}}
|
|
|
|
<span> ( of </span>
|
|
|
|
{{!-- maximum acquirable rank --}}
|
|
|
|
{{> talentRankValue item=item property='max' localizeString='DS4.TalentRankMax'}}
|
|
|
|
<span>) + </span>
|
|
|
|
{{!-- additional ranks --}}
|
|
|
|
{{> talentRankValue item=item property='mod' localizeString='DS4.TalentRankMod'}}
|
|
|
|
<span> = </span>
|
|
|
|
{{!-- derived total rank --}}
|
|
|
|
{{> talentRankValue item=item property='total' localizeString='DS4.TalentRankTotal' disabled='disabled'}}
|
|
|
|
</div>
|
|
|
|
{{!-- description --}}
|
|
|
|
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
|
|
|
{{!-- control buttons --}}
|
|
|
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
|
|
|
</li>
|
2021-01-06 01:24:37 +01:00
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
2021-01-07 20:20:40 +01:00
|
|
|
{{!--
|
2021-01-08 23:23:53 +01:00
|
|
|
!-- Render a list row for a base item from a given item.
|
|
|
|
!-- Base item means it just has an image, a description, and a name (and effects).
|
2021-01-07 20:20:40 +01:00
|
|
|
!-- It is a flexbox with a child for each item value of interest.
|
|
|
|
!-- The partial assumes a variable item to be given in the context.
|
|
|
|
!--
|
|
|
|
!-- @param item: hand over the item to the partial as hash parameter
|
|
|
|
--}}
|
2021-01-08 23:23:53 +01:00
|
|
|
{{#*inline "baseItemListEntry"}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image">
|
|
|
|
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
|
|
|
</div>
|
|
|
|
{{!-- name --}}
|
|
|
|
<input class="flex1 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
|
|
|
data-property="name" title="{{localize 'DS4.ItemName'}}">
|
|
|
|
{{!-- description --}}
|
|
|
|
<div class="flex3 item-description">{{{item.data.data.description}}}</div>
|
|
|
|
{{!-- control buttons --}}
|
|
|
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
|
|
|
</li>
|
|
|
|
{{/inline}}
|
|
|
|
|
2021-01-08 23:23:53 +01:00
|
|
|
{{!--
|
2021-01-23 23:44:49 +01:00
|
|
|
!-- Render a list header for a base item list entry from a given item.
|
2021-01-08 23:23:53 +01:00
|
|
|
!-- The partial assumes a variable dataType to be given in the context.
|
|
|
|
!--
|
|
|
|
!-- @param dataType: the string item type for the list
|
|
|
|
--}}
|
|
|
|
{{#*inline "baseItemListHeader"}}
|
|
|
|
<li class="item flexrow item-header">
|
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image"></div>
|
|
|
|
{{!-- name --}}
|
|
|
|
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div>
|
|
|
|
{{!-- description --}}
|
2021-01-10 00:30:51 +01:00
|
|
|
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
2021-01-23 23:44:49 +01:00
|
|
|
{{!-- control buttons placeholder --}}
|
|
|
|
<div></div>
|
2021-01-08 23:23:53 +01:00
|
|
|
</li>
|
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
2021-01-06 01:24:37 +01:00
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
|
|
|
|
2021-01-13 17:23:06 +01:00
|
|
|
<div class="tab talents-abilities" data-group="primary" data-tab="talents-abilities">
|
2021-01-07 20:20:40 +01:00
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTalentPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.talent dataType='talent' }}
|
2021-01-06 01:24:37 +01:00
|
|
|
<ol class="items-list">
|
|
|
|
<li class="item flexrow item-header">
|
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image"></div>
|
|
|
|
{{!-- name --}}
|
|
|
|
<div class="flex2 item-name">{{localize 'DS4.ItemName'}}</div>
|
|
|
|
{{!-- rank info --}}
|
|
|
|
<div class="flex3">{{localize 'DS4.TalentRank'}}</div>
|
|
|
|
{{!-- description --}}
|
2021-01-10 00:30:51 +01:00
|
|
|
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
2021-01-23 23:44:49 +01:00
|
|
|
{{!-- control buttons placeholder --}}
|
|
|
|
<div></div>
|
2021-01-06 01:24:37 +01:00
|
|
|
</li>
|
|
|
|
{{#each itemsByType.talent as |item id|}}
|
2021-01-07 20:20:40 +01:00
|
|
|
{{> talentListEntry item=item}}
|
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2021-01-07 20:20:40 +01:00
|
|
|
|
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeRacialAbilityPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.racialAbility dataType='racialAbility' }}
|
2021-01-07 20:20:40 +01:00
|
|
|
<ol class="items-list">
|
2021-01-08 23:23:53 +01:00
|
|
|
{{> baseItemListHeader dataType='racialAbility' }}
|
2021-01-07 20:20:40 +01:00
|
|
|
{{#each itemsByType.racialAbility as |item id|}}
|
2021-01-08 23:23:53 +01:00
|
|
|
{{> baseItemListEntry item=item}}
|
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2021-01-08 23:23:53 +01:00
|
|
|
|
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeLanguagePlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.language dataType='language' }}
|
2021-01-08 23:23:53 +01:00
|
|
|
<ol class="items-list">
|
|
|
|
{{> baseItemListHeader dataType='language' }}
|
|
|
|
{{#each itemsByType.language as |item id|}}
|
|
|
|
{{> baseItemListEntry item=item}}
|
2021-01-06 01:24:37 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2021-01-08 23:54:41 +01:00
|
|
|
|
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeAlphabetPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.alphabet dataType='alphabet' }}
|
2021-01-08 23:54:41 +01:00
|
|
|
<ol class="items-list">
|
|
|
|
{{> baseItemListHeader dataType='alphabet' }}
|
|
|
|
{{#each itemsByType.alphabet as |item id|}}
|
|
|
|
{{> baseItemListEntry item=item}}
|
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2021-01-06 01:24:37 +01:00
|
|
|
</div>
|