diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 1351b96c..131e6675 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -64,6 +64,8 @@ async function registerHandlebarsPartials() { "systems/ds4/templates/actor/partials/profile.hbs", "systems/ds4/templates/actor/partials/character-progression.hbs", "systems/ds4/templates/actor/partials/special-creature-abilites-overview.hbs", + "systems/ds4/templates/actor/partials/character-inventory.hbs", + "systems/ds4/templates/actor/partials/creature-inventory.hbs", ]; return loadTemplates(templatePaths); } diff --git a/src/templates/actor/character-sheet.hbs b/src/templates/actor/character-sheet.hbs index 5c0b4358..b1008c7a 100644 --- a/src/templates/actor/character-sheet.hbs +++ b/src/templates/actor/character-sheet.hbs @@ -71,7 +71,7 @@ {{!-- Sheet Body --}}
{{!-- Items Tab --}} - {{> systems/ds4/templates/actor/partials/items-overview.hbs}} + {{> systems/ds4/templates/actor/partials/character-inventory.hbs}} {{!-- Spells Tab --}} {{> systems/ds4/templates/actor/partials/spells-overview.hbs}} diff --git a/src/templates/actor/creature-sheet.hbs b/src/templates/actor/creature-sheet.hbs index 2ebf5977..7571eaba 100644 --- a/src/templates/actor/creature-sheet.hbs +++ b/src/templates/actor/creature-sheet.hbs @@ -61,7 +61,7 @@ {{!-- Sheet Body --}}
{{!-- Items Tab --}} - {{> systems/ds4/templates/actor/partials/items-overview.hbs}} + {{> systems/ds4/templates/actor/partials/creature-inventory.hbs}} {{!-- Special Creature Abilities Tab --}} {{> systems/ds4/templates/actor/partials/special-creature-abilites-overview.hbs}} diff --git a/src/templates/actor/partials/character-inventory.hbs b/src/templates/actor/partials/character-inventory.hbs new file mode 100644 index 00000000..19a4009d --- /dev/null +++ b/src/templates/actor/partials/character-inventory.hbs @@ -0,0 +1,21 @@ +
+ + {{!-- Money--}} +

{{localize 'DS4.CharacterCurrency'}}

+
    +
  1. + + + + + + +
  2. +
+ + {{> systems/ds4/templates/actor/partials/items-overview.hbs}} + +
\ No newline at end of file diff --git a/src/templates/actor/partials/creature-inventory.hbs b/src/templates/actor/partials/creature-inventory.hbs new file mode 100644 index 00000000..b9b8acd6 --- /dev/null +++ b/src/templates/actor/partials/creature-inventory.hbs @@ -0,0 +1,5 @@ +
+ + {{> systems/ds4/templates/actor/partials/items-overview.hbs}} + +
\ No newline at end of file diff --git a/src/templates/actor/partials/items-overview.hbs b/src/templates/actor/partials/items-overview.hbs index a941e6bb..55b34411 100644 --- a/src/templates/actor/partials/items-overview.hbs +++ b/src/templates/actor/partials/items-overview.hbs @@ -93,126 +93,106 @@ {{!-- ======================================================================== --}} +{{!-- WEAPONS --}} +

{{localize 'DS4.ItemTypeWeaponPlural'}}

+{{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}} +{{#> ifHasItemOfType itemsArray=itemsByType.weapon dataType='weapon' }} +
    + {{#> itemListHeader dataType='weapon'}} +
    {{localize 'DS4.AttackTypeAbbr'}}
    +
    + {{localize 'DS4.WeaponBonusAbbr'}} +
    +
    + {{localize 'DS4.OpponentDefenseAbbr'}} +
    + {{/itemListHeader}} + {{#each itemsByType.weapon as |item id|}} + {{#> itemListEntry item=item}} +
    + +
    +
    {{ item.data.data.weaponBonus}}
    +
    {{ item.data.data.opponentDefense}}
    + {{/itemListEntry}} + {{/each}} +
+{{!-- {{else}} +{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='weapon' }} --}} +{{/ifHasItemOfType}} -
- - {{!-- Money--}} -

{{localize 'DS4.CharacterCurrency'}}

-
    -
  1. - - - - - - -
  2. -
- - {{!-- WEAPONS --}} -

{{localize 'DS4.ItemTypeWeaponPlural'}}

- {{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}} - {{#> ifHasItemOfType itemsArray=itemsByType.weapon dataType='weapon' }} -
    - {{#> itemListHeader dataType='weapon'}} -
    {{localize 'DS4.AttackTypeAbbr'}}
    -
    - {{localize 'DS4.WeaponBonusAbbr'}} -
    -
    - {{localize 'DS4.OpponentDefenseAbbr'}} -
    - {{/itemListHeader}} - {{#each itemsByType.weapon as |item id|}} - {{#> itemListEntry item=item}} -
    - -
    -
    {{ item.data.data.weaponBonus}}
    -
    {{ item.data.data.opponentDefense}}
    - {{/itemListEntry}} - {{/each}} -
- {{!-- {{else}} - {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='weapon' }} --}} - {{/ifHasItemOfType}} - - {{!-- ARMOR --}} -

{{localize 'DS4.ItemTypeArmorPlural'}}

- {{#> ifHasItemOfType itemsArray=itemsByType.armor dataType='armor' }} -
    - {{#> itemListHeader dataType='armor'}} -
    {{localize 'DS4.ArmorMaterialTypeAbbr'}}
    -
    {{localize 'DS4.ArmorTypeAbbr'}}
    -
    - {{localize 'DS4.ArmorValueAbbr'}} -
    - {{/itemListHeader}} - {{#each itemsByType.armor as |item id|}} - {{#> itemListEntry item=item }} -
    - {{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}} -
    -
    - {{lookup ../../config.armorTypesAbbr item.data.data.armorType}} -
    -
    {{ item.data.data.armorValue}}
    - {{/itemListEntry}} - {{/each}} -
- {{/ifHasItemOfType}} +{{!-- ARMOR --}} +

{{localize 'DS4.ItemTypeArmorPlural'}}

+{{#> ifHasItemOfType itemsArray=itemsByType.armor dataType='armor' }} +
    + {{#> itemListHeader dataType='armor'}} +
    {{localize 'DS4.ArmorMaterialTypeAbbr'}}
    +
    {{localize 'DS4.ArmorTypeAbbr'}}
    +
    + {{localize 'DS4.ArmorValueAbbr'}} +
    + {{/itemListHeader}} + {{#each itemsByType.armor as |item id|}} + {{#> itemListEntry item=item }} +
    + {{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}} +
    +
    + {{lookup ../../config.armorTypesAbbr item.data.data.armorType}} +
    +
    {{ item.data.data.armorValue}}
    + {{/itemListEntry}} + {{/each}} +
+{{/ifHasItemOfType}} - {{!-- SHIELD --}} -

{{localize 'DS4.ItemTypeShieldPlural'}}

{{!-- SPECIFIC --}} - {{#> ifHasItemOfType itemsArray=itemsByType.shield dataType='shield' }} -
    - {{#> itemListHeader dataType='shield' }} -
    - {{localize 'DS4.ArmorValueAbbr'}} -
    - {{/itemListHeader}} - {{#each itemsByType.shield as |item id|}} - {{#> itemListEntry item=item }} -
    {{item.data.data.armorValue}}
    {{!-- SPECIFIC --}} - {{/itemListEntry}} - {{/each}} -
- {{/ifHasItemOfType}} +{{!-- SHIELD --}} +

{{localize 'DS4.ItemTypeShieldPlural'}}

{{!-- SPECIFIC --}} +{{#> ifHasItemOfType itemsArray=itemsByType.shield dataType='shield' }} +
    + {{#> itemListHeader dataType='shield' }} +
    + {{localize 'DS4.ArmorValueAbbr'}} +
    + {{/itemListHeader}} + {{#each itemsByType.shield as |item id|}} + {{#> itemListEntry item=item }} +
    {{item.data.data.armorValue}}
    {{!-- SPECIFIC --}} + {{/itemListEntry}} + {{/each}} +
+{{/ifHasItemOfType}} - {{!-- TRINKET --}} -

{{localize 'DS4.ItemTypeTrinketPlural'}}

- {{#> ifHasItemOfType itemsArray=itemsByType.trinket dataType='trinket' }} -
    - {{#> itemListHeader dataType='trinket'}} -
    {{localize 'DS4.StorageLocation'}}
    - {{/itemListHeader}} - {{#each itemsByType.trinket as |item id|}} - {{#> itemListEntry item=item }} - - {{/itemListEntry}} - {{/each}} -
- {{/ifHasItemOfType}} +{{!-- TRINKET --}} +

{{localize 'DS4.ItemTypeTrinketPlural'}}

+{{#> ifHasItemOfType itemsArray=itemsByType.trinket dataType='trinket' }} +
    + {{#> itemListHeader dataType='trinket'}} +
    {{localize 'DS4.StorageLocation'}}
    + {{/itemListHeader}} + {{#each itemsByType.trinket as |item id|}} + {{#> itemListEntry item=item }} + + {{/itemListEntry}} + {{/each}} +
+{{/ifHasItemOfType}} - {{!-- EQUIPMENT --}} -

{{localize 'DS4.ItemTypeEquipmentPlural'}}

- {{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }} -
    - {{#> itemListHeader dataType='equipment'}} -
    {{localize 'DS4.StorageLocation'}}
    - {{/itemListHeader}} - {{#each itemsByType.equipment as |item id|}} - {{#> itemListEntry item=item }} - - {{/itemListEntry}} - {{/each}} -
- {{/ifHasItemOfType}} -
\ No newline at end of file +{{!-- EQUIPMENT --}} +

{{localize 'DS4.ItemTypeEquipmentPlural'}}

+{{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }} +
    + {{#> itemListHeader dataType='equipment'}} +
    {{localize 'DS4.StorageLocation'}}
    + {{/itemListHeader}} + {{#each itemsByType.equipment as |item id|}} + {{#> itemListEntry item=item }} + + {{/itemListEntry}} + {{/each}} +
+{{/ifHasItemOfType}} \ No newline at end of file