Rename loot and equipment

This commit is contained in:
Johannes Loher 2021-02-21 03:40:54 +01:00
parent dacce1b29d
commit 343a888b68
13 changed files with 267 additions and 128 deletions

View file

@ -23,7 +23,7 @@
{{!--
!-- 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'.
!-- An "equipped" heading is rendered except for the case dataType==='loot'.
!-- 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.
@ -34,7 +34,7 @@
{{#*inline "itemListHeader" }}
<li class="item flexrow item-header">
{{!-- equipped --}}
{{#if (ne dataType 'equipment')}}
{{#if (ne dataType 'loot')}}
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">{{localize 'DS4.ItemEquippedAbbr'}}</div>
{{/if}}
{{!-- image --}}
@ -165,22 +165,6 @@
</ol>
{{/ifHasItemOfType}}
{{!-- TRINKET --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinketPlural'}}</h4>
{{#> ifHasItemOfType itemsArray=itemsByType.trinket dataType='trinket' }}
<ol class="items-list">
{{#> itemListHeader dataType='trinket'}}
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
{{/itemListHeader}}
{{#each itemsByType.trinket as |item id|}}
{{#> itemListEntry item=item }}
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
{{/itemListEntry}}
{{/each}}
</ol>
{{/ifHasItemOfType}}
{{!-- EQUIPMENT --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
{{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }}
@ -196,3 +180,19 @@
{{/each}}
</ol>
{{/ifHasItemOfType}}
{{!-- LOOT --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeLootPlural'}}</h4>
{{#> ifHasItemOfType itemsArray=itemsByType.loot dataType='loot' }}
<ol class="items-list">
{{#> itemListHeader dataType='loot'}}
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
{{/itemListHeader}}
{{#each itemsByType.loot as |item id|}}
{{#> itemListEntry item=item }}
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
{{/itemListEntry}}
{{/each}}
</ol>
{{/ifHasItemOfType}}

View file

@ -4,4 +4,4 @@
{{!-- Common Item body --}}
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form>
</form>