2020-12-30 23:50:27 +01:00
|
|
|
{{!-- TODO: For items list: only show header, if list is not empty --}}
|
2021-01-02 01:01:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
|
|
|
|
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}}
|
|
|
|
{{else}}
|
|
|
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
|
|
|
{{/if}}
|
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!--
|
|
|
|
!-- Render a header row for a given data type.
|
|
|
|
!-- It is a flexbox with a child for each column head.
|
|
|
|
!-- An "equipped" heading is rendered except for the case dataType==='equipment'.
|
|
|
|
!-- The partial assumes a variable dataType to be given in the context.
|
|
|
|
!-- If the partial is called with a partial block, the partial block
|
|
|
|
!-- content is inserted before the description heading.
|
|
|
|
|
|
|
|
!-- @param datType: hand over the dataType to the partial as hash parameter
|
|
|
|
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
|
|
|
--}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#*inline "itemListHeader" }}
|
2021-01-02 01:01:41 +01:00
|
|
|
<li class="item flexrow item-header">
|
|
|
|
{{!-- equipped --}}
|
|
|
|
{{#if (ne dataType 'equipment')}}
|
2021-01-09 23:39:35 +01:00
|
|
|
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">{{localize 'DS4.ItemEquippedAbbr'}}</div>
|
2021-01-02 01:01:41 +01:00
|
|
|
{{/if}}
|
|
|
|
{{!-- image --}}
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex05 item-image"></div>
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!-- amount --}}
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex05 item-num-val" title="{{localize 'DS4.Quantity'}}">#</div>
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!-- name --}}
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex3 item-name">{{localize 'DS4.ItemName'}}</div>
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!-- item type specifics --}}
|
|
|
|
{{> @partial-block }}
|
|
|
|
{{!-- description --}}
|
2021-01-10 00:30:51 +01:00
|
|
|
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!-- add button --}}
|
2021-01-06 16:29:02 +01:00
|
|
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
2021-01-02 01:01:41 +01:00
|
|
|
</li>
|
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
{{!--
|
|
|
|
!-- Render a list row from a given item.
|
|
|
|
!-- It is a flexbox with a child for each item value of interest.
|
|
|
|
!-- An equipped checkbox is rendered if item.data.data.equipped is defined.
|
|
|
|
!-- The partial assumes a variable item to be given in the context.
|
|
|
|
!-- If the partial is called with a partial block, the partial block
|
|
|
|
!-- content is inserted before the description.
|
|
|
|
|
|
|
|
!-- @param item: hand over the item to the partial as hash parameter
|
|
|
|
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
|
|
|
--}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#*inline "itemListEntry"}}
|
2021-01-02 01:01:41 +01:00
|
|
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
|
|
|
{{!-- equipped --}}
|
|
|
|
{{#if (ne item.data.data.equipped undefined)}}
|
2021-01-03 21:14:11 +01:00
|
|
|
<input class="flex05 item-change" type="checkbox" {{checked item.data.data.equipped}} data-dtype="Boolean"
|
|
|
|
data-property="data.equipped" title="{{localize 'DS4.ItemEquipped'}}">
|
2021-01-02 01:01:41 +01:00
|
|
|
{{/if}}
|
2021-01-03 21:14:11 +01:00
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image">
|
|
|
|
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
2021-01-02 01:01:41 +01:00
|
|
|
</div>
|
2021-01-03 21:14:11 +01:00
|
|
|
{{!-- amount --}}
|
2021-01-03 23:27:51 +01:00
|
|
|
<input class="flex05 item-num-val item-change" type="number" min="0" step="1" value="{{item.data.data.quantity}}" data-dtype="Number"
|
2021-01-09 23:39:35 +01:00
|
|
|
data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!-- name --}}
|
2021-01-03 21:14:11 +01:00
|
|
|
<input class="flex3 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
2021-01-09 23:39:35 +01:00
|
|
|
data-property="name" title="{{localize 'DS4.ItemName'}}" />
|
2021-01-02 01:01:41 +01:00
|
|
|
{{!-- item type specifics --}}
|
|
|
|
{{> @partial-block}}
|
|
|
|
{{!-- description --}}
|
|
|
|
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
|
|
|
{{!-- control buttons --}}
|
2021-01-06 16:29:02 +01:00
|
|
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
2021-01-02 01:01:41 +01:00
|
|
|
</li>
|
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
|
|
|
|
2021-01-07 20:20:40 +01:00
|
|
|
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
2020-12-29 01:44:54 +01:00
|
|
|
|
|
|
|
{{!-- WEAPONS --}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}}
|
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.weapon dataType='weapon' }}
|
2020-12-28 20:38:02 +01:00
|
|
|
<ol class="items-list">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListHeader dataType='weapon'}}
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex05 item-image" title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div>
|
|
|
|
<div class="flex05 item-num-val" title="{{localize 'DS4.WeaponBonus'}}">
|
2021-01-02 01:01:41 +01:00
|
|
|
{{localize 'DS4.WeaponBonusAbbr'}}
|
|
|
|
</div>
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex05 item-num-val" title="{{localize 'DS4.OpponentDefense'}}">
|
2021-01-02 01:01:41 +01:00
|
|
|
{{localize 'DS4.OpponentDefenseAbbr'}}
|
|
|
|
</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListHeader}}
|
2021-01-02 01:01:41 +01:00
|
|
|
{{#each itemsByType.weapon as |item id|}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListEntry item=item}}
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex05 item-image">
|
2021-01-02 01:01:41 +01:00
|
|
|
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
|
|
|
|
title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" />
|
2020-12-29 01:44:54 +01:00
|
|
|
</div>
|
2021-01-03 21:24:32 +01:00
|
|
|
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>
|
|
|
|
<div class="flex05 item-num-val">{{ item.data.data.opponentDefense}}</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListEntry}}
|
2020-12-28 20:38:02 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{!-- {{else}}
|
|
|
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='weapon' }} --}}
|
|
|
|
{{/ifHasItemOfType}}
|
2020-12-29 19:07:20 +01:00
|
|
|
|
|
|
|
{{!-- ARMOR --}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmorPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.armor dataType='armor' }}
|
2020-12-29 19:07:20 +01:00
|
|
|
<ol class="items-list">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListHeader dataType='armor'}}
|
2021-01-02 01:01:41 +01:00
|
|
|
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
|
|
|
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
|
2020-12-30 01:03:06 +01:00
|
|
|
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
|
|
|
{{localize 'DS4.ArmorValueAbbr'}}
|
2020-12-29 19:07:20 +01:00
|
|
|
</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListHeader}}
|
2021-01-02 01:01:41 +01:00
|
|
|
{{#each itemsByType.armor as |item id|}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListEntry item=item }}
|
2021-01-02 01:01:41 +01:00
|
|
|
<div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}">
|
|
|
|
{{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
|
2020-12-29 19:07:20 +01:00
|
|
|
</div>
|
2021-01-02 01:01:41 +01:00
|
|
|
<div title="{{lookup ../../config.armorTypes item.data.data.armorType}}">
|
|
|
|
{{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
|
|
|
|
</div>
|
|
|
|
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListEntry}}
|
2020-12-29 19:07:20 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2020-12-29 20:37:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
{{!-- SHIELD --}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShieldPlural'}}</h4> {{!-- SPECIFIC --}}
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.shield dataType='shield' }}
|
2020-12-29 20:37:30 +01:00
|
|
|
<ol class="items-list">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListHeader dataType='shield' }}
|
2021-01-02 01:01:41 +01:00
|
|
|
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
|
|
|
{{localize 'DS4.ArmorValueAbbr'}}
|
2020-12-29 20:37:30 +01:00
|
|
|
</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListHeader}}
|
2021-01-02 01:01:41 +01:00
|
|
|
{{#each itemsByType.shield as |item id|}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListEntry item=item }}
|
2021-01-02 01:01:41 +01:00
|
|
|
<div class="flex05 item-num-val">{{item.data.data.armorValue}}</div> {{!-- SPECIFIC --}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListEntry}}
|
2020-12-29 20:37:30 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2020-12-29 21:27:50 +01:00
|
|
|
|
|
|
|
{{!-- TRINKET --}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinketPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.trinket dataType='trinket' }}
|
2020-12-29 21:27:50 +01:00
|
|
|
<ol class="items-list">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListHeader dataType='trinket'}}
|
2021-01-02 01:01:41 +01:00
|
|
|
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListHeader}}
|
2021-01-02 01:01:41 +01:00
|
|
|
{{#each itemsByType.trinket as |item id|}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListEntry item=item }}
|
2021-01-03 21:24:32 +01:00
|
|
|
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
2021-01-03 21:14:11 +01:00
|
|
|
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListEntry}}
|
2020-12-29 22:02:43 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2020-12-29 22:02:43 +01:00
|
|
|
|
|
|
|
{{!-- EQUIPMENT --}}
|
2021-01-07 20:20:40 +01:00
|
|
|
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }}
|
2020-12-29 22:02:43 +01:00
|
|
|
<ol class="items-list">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListHeader dataType='equipment'}}
|
2021-01-02 01:01:41 +01:00
|
|
|
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListHeader}}
|
2021-01-02 01:01:41 +01:00
|
|
|
{{#each itemsByType.equipment as |item id|}}
|
2021-01-03 00:08:21 +01:00
|
|
|
{{#> itemListEntry item=item }}
|
2021-01-03 21:24:32 +01:00
|
|
|
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
2021-01-03 21:14:11 +01:00
|
|
|
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
2021-01-03 00:08:21 +01:00
|
|
|
{{/itemListEntry}}
|
2020-12-29 21:27:50 +01:00
|
|
|
{{/each}}
|
|
|
|
</ol>
|
2021-01-09 01:11:55 +01:00
|
|
|
{{/ifHasItemOfType}}
|
2020-12-28 20:38:02 +01:00
|
|
|
</div>
|