From 99d2f92b4198602a5306bef20dc9df08b5885dab Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Tue, 29 Dec 2020 19:07:20 +0100 Subject: [PATCH] added armor list to items tab in char sheet Additions: - added armor list to items tab in char sheet - added localization - added CSS class for flex 0.5 --- src/lang/en.json | 2 + src/scss/global/_flex.scss | 6 +++ src/templates/actor/partials/items.hbs | 53 ++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) diff --git a/src/lang/en.json b/src/lang/en.json index 8f4cd3ea..42437b0e 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -33,7 +33,9 @@ "DS4.ArmorType": "Armor Type", "DS4.ArmorTypeAbbr": "AT", "DS4.ArmorMaterialType": "Material Type", + "DS4.ArmorMaterialTypeAbbr": "Mat.", "DS4.ArmorValue": "Armor Value", + "DS4.ArmorValueAbbr": "AV", "DS4.ArmorTypeBody": "Body", "DS4.ArmorTypeHelmet": "Helmet", "DS4.ArmorTypeVambrace": "Vambrace", diff --git a/src/scss/global/_flex.scss b/src/scss/global/_flex.scss index d96c79c5..4027bbc7 100644 --- a/src/scss/global/_flex.scss +++ b/src/scss/global/_flex.scss @@ -12,6 +12,9 @@ flex: 1; } + .flex05 { + flex: 0.5; + } .flex1 { flex: 1; } @@ -38,6 +41,9 @@ flex: 1; } + .flex05 { + flex: 0.5; + } .flex1 { flex: 1; } diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items.hbs index 7aed8ee3..03da82f5 100644 --- a/src/templates/actor/partials/items.hbs +++ b/src/templates/actor/partials/items.hbs @@ -60,4 +60,57 @@ {{/with}} {{/each}} + + {{!-- ARMOR --}} +

{{localize "DS4.ItemTypeArmor"}}

{{!-- SPECIFIC --}} +
    +
  1. +
    +
    {{!-- equipped --}} +
    +
    #
    {{!-- amount --}} +
    +
    {{localize "DS4.ItemName"}}
    +
    {{localize "DS4.ArmorMaterialTypeAbbr"}}
    {{!-- SPECIFIC --}} +
    {{localize "DS4.ArmorTypeAbbr"}}
    {{!-- SPECIFIC --}} +
    {{localize "DS4.ArmorValueAbbr"}}
    {{!-- SPECIFIC --}} +
    {{localize "DS4.Description"}}
    + {{!-- add button --}} +
    {{!-- SPECIFIC --}} + + {{localize "DS4.ActionAddItem"}} {{!-- SPECIFIC --}} +
    +
  2. + {{#each itemsByType.armor as |item id|}} {{!-- SPECIFIC --}} + {{#with item.data.data as |itemData|}} +
  3. +
    + {{!-- equipped? --}} + {{#if itemData.equipped}} + {{else}} + {{/if}} {{!--SPECIFIC --}} + {{!-- image --}} +
    + +
    + {{!-- amount --}} +
    {{itemData.quantity}}
    +
    + {{!-- name --}} +

    {{item.name}}

    + {{!-- item specifics --}} +
    {{lookup ../../config.armorMaterialTypes itemData.armorMaterialType}}
    {{!-- SPECIFIC --}} +
    {{lookup ../../config.armorTypes itemData.armorType}}
    {{!-- SPECIFIC --}} +
    {{itemData.armorValue}}
    {{!-- SPECIFIC --}} + {{!-- description --}} +
    {{{itemData.description}}}
    + {{!-- edit & delete buttons --}} +
    + + +
    +
  4. + {{/with}} + {{/each}} +
\ No newline at end of file