{{!-- TODO: Refactor to avoid code duplication with special-creature-abilites-overview and talents-overview --}} {{!-- ======================================================================== --}} {{!-- 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}} {{/if}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }} {{/inline}} {{!-- ======================================================================== --}} {{!-- WEAPONS --}}

{{localize 'DS4.ItemTypeWeaponPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.weapon dataType='weapon' }}
    {{#> systems/ds4/templates/actor/partials/item-list-header.hbs isEquipable=true hasQuantity=true}} {{!-- attack type --}}
    {{localize 'DS4.AttackTypeAbbr'}}
    {{!-- weapon bonus --}}
    {{localize 'DS4.WeaponBonusAbbr'}}
    {{!-- opponent defense --}}
    {{localize 'DS4.OpponentDefenseAbbr'}}
    {{/systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.weapon as |itemData id|}} {{#> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- attack type --}}
    {{!-- weapon bonus --}}
    {{ itemData.data.weaponBonus}}
    {{!-- opponent defense --}}
    {{ itemData.data.opponentDefense}}
    {{/systems/ds4/templates/actor/partials/item-list-entry.hbs}} {{/each}}
{{/ifHasItemOfType}} {{!-- ARMOR --}}

{{localize 'DS4.ItemTypeArmorPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.armor dataType='armor' }}
    {{#> systems/ds4/templates/actor/partials/item-list-header.hbs isEquipable=true hasQuantity=true}} {{!-- armor material type --}}
    {{localize 'DS4.ArmorMaterialTypeAbbr'}}
    {{!-- armor type --}}
    {{localize 'DS4.ArmorTypeAbbr'}}
    {{!-- armor value --}}
    {{localize 'DS4.ArmorValueAbbr'}}
    {{/systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.armor as |itemData id|}} {{#> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- armor material type --}}
    {{lookup ../../config.i18n.armorMaterialTypesAbbr itemData.data.armorMaterialType}}
    {{!-- armor type --}}
    {{lookup ../../config.i18n.armorTypesAbbr itemData.dataData.armorType}}
    {{!-- armor value --}}
    {{ itemData.data.armorValue}}
    {{/systems/ds4/templates/actor/partials/item-list-entry.hbs}} {{/each}}
{{/ifHasItemOfType}} {{!-- SHIELD --}}

{{localize 'DS4.ItemTypeShieldPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.shield dataType='shield' }}
    {{#> systems/ds4/templates/actor/partials/item-list-header.hbs isEquipable=true hasQuantity=true}} {{!-- armor value --}}
    {{localize 'DS4.ArmorValueAbbr'}}
    {{/systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.shield as |itemData id|}} {{#> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- armor value --}}
    {{itemData.data.armorValue}}
    {{/systems/ds4/templates/actor/partials/item-list-entry.hbs}} {{/each}}
{{/ifHasItemOfType}} {{!-- EQUIPMENT --}}

{{localize 'DS4.ItemTypeEquipmentPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }}
    {{#> systems/ds4/templates/actor/partials/item-list-header.hbs isEquipable=true hasQuantity=true}} {{!-- storage location --}}
    {{localize 'DS4.StorageLocation'}}
    {{/systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.equipment as |itemData id|}} {{#> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData isEquipable=true hasQuantity=true}} {{!-- storage location --}} {{/systems/ds4/templates/actor/partials/item-list-entry.hbs}} {{/each}}
{{/ifHasItemOfType}} {{!-- LOOT --}}

{{localize 'DS4.ItemTypeLootPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.loot dataType='loot' }}
    {{#> systems/ds4/templates/actor/partials/item-list-header.hbs hasQuantity=true}} {{!-- storage location --}}
    {{localize 'DS4.StorageLocation'}}
    {{/systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.loot as |itemData id|}} {{#> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData hasQuantity=true}} {{!-- storage location --}} {{/systems/ds4/templates/actor/partials/item-list-entry.hbs}} {{/each}}
{{/ifHasItemOfType}}