{{!-- ======================================================================== --}} {{!-- INLINE PARTIAL DEFINITIONS --}} {{!-- ======================================================================== --}} {{!-- !-- 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}} {{else}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }} {{/if}} {{/inline}} {{!-- !-- Render an input element for a rank value property of an item. !-- !-- @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; !-- meant to be set to "disabled" to disable the input element --}} {{#*inline "talentRankValue"}} {{/inline}} {{!-- !-- 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"}}
  • {{!-- image --}}
    {{!-- name --}}
    {{!-- acquired rank --}} {{> talentRankValue item=item property='base' localizeString='DS4.TalentRankBase'}} ( of {{!-- maximum acquirable rank --}} {{> talentRankValue item=item property='max' localizeString='DS4.TalentRankMax'}} ) + {{!-- additional ranks --}} {{> talentRankValue item=item property='mod' localizeString='DS4.TalentRankMod'}} = {{!-- derived total rank --}} {{> talentRankValue item=item property='total' localizeString='DS4.TalentRankTotal' disabled='disabled'}}
    {{!-- description --}}
    {{{item.data.data.description}}}
    {{!-- control buttons --}} {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
  • {{/inline}} {{!-- !-- 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). !-- 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 "baseItemListEntry"}}
  • {{!-- image --}}
    {{!-- name --}} {{!-- description --}}
    {{{item.data.data.description}}}
    {{!-- control buttons --}} {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
  • {{/inline}} {{!-- !-- Render a list header for a base item list entries from a given item. !-- The partial assumes a variable dataType to be given in the context. !-- !-- @param dataType: the string item type for the list --}} {{#*inline "baseItemListHeader"}}
  • {{!-- image --}}
    {{!-- name --}}
    {{localize 'DS4.ItemName'}}
    {{!-- description --}}
    {{localize 'DS4.Description'}}
    {{!-- add button --}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
  • {{/inline}} {{!-- ======================================================================== --}}

    {{localize 'DS4.ItemTypeTalentPlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.talent dataType='talent' }}
    1. {{!-- image --}}
      {{!-- name --}}
      {{localize 'DS4.ItemName'}}
      {{!-- rank info --}}
      {{localize 'DS4.TalentRank'}}
      {{!-- description --}}
      {{localize 'DS4.Description'}}
      {{!-- add button --}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='talent' }}
    2. {{#each itemsByType.talent as |item id|}} {{> talentListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}

    {{localize 'DS4.ItemTypeRacialAbilityPlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.racialAbility dataType='racialAbility' }}
      {{> baseItemListHeader dataType='racialAbility' }} {{#each itemsByType.racialAbility as |item id|}} {{> baseItemListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}

    {{localize 'DS4.ItemTypeLanguagePlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.language dataType='language' }}
      {{> baseItemListHeader dataType='language' }} {{#each itemsByType.language as |item id|}} {{> baseItemListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}

    {{localize 'DS4.ItemTypeAlphabetPlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.alphabet dataType='alphabet' }}
      {{> baseItemListHeader dataType='alphabet' }} {{#each itemsByType.alphabet as |item id|}} {{> baseItemListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}