ds4/templates/sheets/actor/components/items-overview.hbs

166 lines
8 KiB
Handlebars
Raw Permalink Normal View History

2021-06-26 22:02:00 +02:00
{{!--
SPDX-FileCopyrightText: 2021 Johannes Loher
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
SPDX-FileCopyrightText: 2021 Siegfried Krug
SPDX-License-Identifier: MIT
--}}
2021-01-18 19:59:25 +01:00
{{!-- WEAPONS --}}
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
2021-02-26 01:38:53 +01:00
{{#unless (isEmpty itemsByType.weapon)}}
<ol class="ds4-embedded-document-list ds4-embedded-document-list--weapon item-list">
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
type='weapon'}}
{{!-- attack type --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.attackType"
title="{{localize 'DS4.SortByAttackType'}}">
{{localize
'DS4.AttackTypeAbbr'}}</div>
{{!-- weapon bonus --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.weaponBonus"
title="{{localize 'DS4.SortByWeaponBonus'}}">
2021-01-18 19:59:25 +01:00
{{localize 'DS4.WeaponBonusAbbr'}}
</div>
{{!-- opponent defense --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.opponentDefense"
title="{{localize 'DS4.SortByOpponentDefense'}}">
2021-01-18 19:59:25 +01:00
{{localize 'DS4.OpponentDefenseAbbr'}}
</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
{{#each itemsByType.weapon as |itemData id|}}
2021-04-13 21:40:52 +02:00
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
hasQuantity=true}}
{{!-- attack type --}}
<img class="ds4-embedded-document-list__image"
src="{{lookup ../../config.icons.attackTypes itemData.data.attackType}}"
title="{{lookup ../../config.i18n.attackTypes itemData.data.attackType}}" />
{{!-- weapon bonus --}}
<div>{{ itemData.data.weaponBonus}}</div>
{{!-- opponent defense --}}
<div>{{ itemData.data.opponentDefense}}</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
2021-01-18 19:59:25 +01:00
{{/each}}
</ol>
2021-02-26 01:38:53 +01:00
{{/unless}}
2022-01-21 03:22:17 +01:00
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
documentType='item' type='weapon'}}
2021-01-18 19:59:25 +01:00
{{!-- ARMOR --}}
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeArmorPlural'}}</h4>
2021-02-26 01:38:53 +01:00
{{#unless (isEmpty itemsByType.armor)}}
<ol class="ds4-embedded-document-list ds4-embedded-document-list--armor item-list">
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
type="armor"}}
{{!-- armor material type --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorMaterialType"
title="{{localize 'DS4.SortByArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
{{!-- armor type --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorType"
title="{{localize 'DS4.SortByArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
{{!-- armor value --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorValue"
title="{{localize 'DS4.SortByArmorValue'}}">
2021-01-18 19:59:25 +01:00
{{localize 'DS4.ArmorValueAbbr'}}
</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
{{#each itemsByType.armor as |itemData id|}}
2021-04-13 21:40:52 +02:00
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
hasQuantity=true}}
{{!-- armor material type --}}
<div title="{{lookup ../../config.i18n.armorMaterialTypes itemData.data.armorMaterialType}}">
{{lookup ../../config.i18n.armorMaterialTypesAbbr itemData.data.armorMaterialType}}
2021-01-18 19:59:25 +01:00
</div>
{{!-- armor type --}}
<div title="{{lookup ../../config.i18n.armorTypes itemData.data.armorType}}">
{{lookup ../../config.i18n.armorTypesAbbr itemData.data.armorType}}
2021-01-18 19:59:25 +01:00
</div>
{{!-- armor value --}}
<div>{{ itemData.data.armorValue}}</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
2021-01-18 19:59:25 +01:00
{{/each}}
</ol>
2021-02-26 01:38:53 +01:00
{{/unless}}
2022-01-21 03:22:17 +01:00
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
documentType='item' type='armor'}}
2021-01-18 19:59:25 +01:00
{{!-- SHIELD --}}
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeShieldPlural'}}</h4>
2021-02-26 01:38:53 +01:00
{{#unless (isEmpty itemsByType.shield)}}
<ol class="ds4-embedded-document-list ds4-embedded-document-list--shield item-list">
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
type='shield'}}
{{!-- armor value --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorValue"
title="{{localize 'DS4.SortByArmorValue'}}">
2021-01-18 19:59:25 +01:00
{{localize 'DS4.ArmorValueAbbr'}}
</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
{{#each itemsByType.shield as |itemData id|}}
2021-04-13 21:40:52 +02:00
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
hasQuantity=true}}
{{!-- armor value --}}
<div>{{itemData.data.armorValue}}</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
2021-01-18 19:59:25 +01:00
{{/each}}
</ol>
2021-02-26 01:38:53 +01:00
{{/unless}}
2022-01-21 03:22:17 +01:00
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
documentType='item' type='shield'}}
2021-01-18 19:59:25 +01:00
2021-02-21 03:40:54 +01:00
{{!-- EQUIPMENT --}}
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
2021-02-26 01:38:53 +01:00
{{#unless (isEmpty itemsByType.equipment)}}
<ol class="ds4-embedded-document-list ds4-embedded-document-list--equipment item-list">
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
type='equipment'}}
{{!-- storage location --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.storageLocation"
title="{{localize 'DS4.SortByStorageLocation'}}">{{localize 'DS4.StorageLocation'}}</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
{{#each itemsByType.equipment as |itemData id|}}
2021-04-13 21:40:52 +02:00
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
hasQuantity=true}}
{{!-- storage location --}}
<input class="ds4-embedded-document-list__editable change-item" type="text"
value="{{itemData.data.storageLocation}}" data-dtype="String" data-property="data.storageLocation"
title="{{localize 'DS4.StorageLocation'}}">
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
2021-01-18 19:59:25 +01:00
{{/each}}
</ol>
2021-02-26 01:38:53 +01:00
{{/unless}}
2022-01-21 03:22:17 +01:00
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
documentType='item' type='equipment'}}
2021-01-18 19:59:25 +01:00
2021-02-21 03:40:54 +01:00
{{!-- LOOT --}}
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeLootPlural'}}</h4>
2021-02-26 01:38:53 +01:00
{{#unless (isEmpty itemsByType.loot)}}
<ol class="ds4-embedded-document-list ds4-embedded-document-list--loot item-list">
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs hasQuantity=true type='loot'}}
{{!-- storage location --}}
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.storageLocation"
title="{{localize 'DS4.SortByStorageLocation'}}">{{localize 'DS4.StorageLocation'}}</div>
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
{{#each itemsByType.loot as |itemData id|}}
2021-04-13 21:40:52 +02:00
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData hasQuantity=true}}
{{!-- storage location --}}
<input class="ds4-embedded-document-list__editable change-item" type="text"
value="{{itemData.data.storageLocation}}" data-dtype="String" data-property="data.storageLocation"
title="{{localize 'DS4.StorageLocation'}}">
2021-04-13 21:40:52 +02:00
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
2021-01-18 19:59:25 +01:00
{{/each}}
</ol>
2021-02-26 01:38:53 +01:00
{{/unless}}
2022-01-21 03:22:17 +01:00
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
documentType='item' type='loot'}}