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

176 lines
8.4 KiB
Handlebars
Raw 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 --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.attackType"
title="{{localize 'DS4.SortByAttackType'}}">
{{localize
'DS4.AttackTypeAbbr'}}</div>
{{!-- weapon bonus --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.weaponBonus"
title="{{localize 'DS4.SortByWeaponBonus'}}">
2021-01-18 19:59:25 +01:00
{{localize 'DS4.WeaponBonusAbbr'}}
</div>
{{!-- opponent defense --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.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 |item id|}}
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true
2021-04-13 21:40:52 +02:00
hasQuantity=true}}
{{!-- attack type --}}
<img class="ds4-embedded-document-list__image"
src="{{lookup @root/config.icons.attackTypes item.system.attackType}}"
title="{{lookup @root/config.i18n.attackTypes item.system.attackType}}" />
{{!-- weapon bonus --}}
<div>{{ item.system.weaponBonus}}</div>
{{!-- opponent defense --}}
<div>
{{#if item.system.opponentDefenseForAttackType.melee includeZero=true}}
{{#if item.system.opponentDefenseForAttackType.ranged includeZero=true}}
<span
title="{{localize 'DS4.OpponentDefenseMelee'}}">{{item.system.opponentDefenseForAttackType.melee}}</span>/<span
title="{{localize 'DS4.OpponentDefenseRanged'}}">{{item.system.opponentDefenseForAttackType.ranged}}</span>
{{else}}
{{item.system.opponentDefenseForAttackType.melee}}
{{/if}}
{{else}}
{{item.system.opponentDefenseForAttackType.ranged}}
{{/if}}
</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 --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.armorMaterialType"
title="{{localize 'DS4.SortByArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
{{!-- armor type --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.armorType"
title="{{localize 'DS4.SortByArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
{{!-- armor value --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.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 |item id|}}
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true
2021-04-13 21:40:52 +02:00
hasQuantity=true}}
{{!-- armor material type --}}
<div title="{{lookup @root/config.i18n.armorMaterialTypes item.system.armorMaterialType}}">
{{lookup @root/config.i18n.armorMaterialTypesAbbr item.system.armorMaterialType}}
2021-01-18 19:59:25 +01:00
</div>
{{!-- armor type --}}
<div title="{{lookup @root/config.i18n.armorTypes item.system.armorType}}">
{{lookup @root/config.i18n.armorTypesAbbr item.system.armorType}}
2021-01-18 19:59:25 +01:00
</div>
{{!-- armor value --}}
<div>{{ item.system.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 --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.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 |item id|}}
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true
2021-04-13 21:40:52 +02:00
hasQuantity=true}}
{{!-- armor value --}}
<div>{{item.system.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 --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.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 |item id|}}
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item isEquipable=true
2021-04-13 21:40:52 +02:00
hasQuantity=true}}
{{!-- storage location --}}
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{item.system.storageLocation}}"
data-dtype="String" data-property="system.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 --}}
2022-11-21 03:00:46 +01:00
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="system.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 |item id|}}
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs item=item hasQuantity=true}}
{{!-- storage location --}}
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{item.system.storageLocation}}"
data-dtype="String" data-property="system.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'}}