diff --git a/src/assets/DS4-MAT.png b/src/assets/DS4-MAT.png new file mode 100644 index 00000000..09e41dfc Binary files /dev/null and b/src/assets/DS4-MAT.png differ diff --git a/src/assets/DS4-MRA.png b/src/assets/DS4-MRA.png new file mode 100644 index 00000000..82e6501b Binary files /dev/null and b/src/assets/DS4-MRA.png differ diff --git a/src/assets/DS4-RAT.png b/src/assets/DS4-RAT.png new file mode 100644 index 00000000..c292458d Binary files /dev/null and b/src/assets/DS4-RAT.png differ diff --git a/src/lang/en.json b/src/lang/en.json index b7c84f1d..601ffc37 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -38,12 +38,21 @@ "DS4.ArmorValue": "Armor Value", "DS4.ArmorValueAbbr": "AV", "DS4.ArmorTypeBody": "Body", + "DS4.ArmorTypeBodyAbbr": "Body", "DS4.ArmorTypeHelmet": "Helmet", + "DS4.ArmorTypeHelmetAbbr": "Helm", "DS4.ArmorTypeVambrace": "Vambrace", + "DS4.ArmorTypeVambraceAbbr": "Vambr", "DS4.ArmorTypeGreaves": "Greaves", + "DS4.ArmorTypeGreavesAbbr": "Greav", "DS4.ArmorTypeVambraceGreaves": "Vambrace + Greaves", + "DS4.ArmorTypeVambraceGreavesAbbr": "V+G", "DS4.ArmorMaterialTypeCloth": "Cloth", + "DS4.ArmorMaterialTypeClothAbbr": "Cloth", "DS4.ArmorMaterialTypeLeather": "Leather", + "DS4.ArmorMaterialTypeLeatherAbbr": "Leath", "DS4.ArmorMaterialTypeChain": "Chain", - "DS4.ArmorMaterialTypePlate": "Plate" + "DS4.ArmorMaterialTypeChainAbbr": "Chain", + "DS4.ArmorMaterialTypePlate": "Plate", + "DS4.ArmorMaterialTypePlateAbbr": "Plate" } diff --git a/src/module/config.ts b/src/module/config.ts index 07c97ca1..3ea52ba3 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -18,6 +18,16 @@ export const DS4 = { meleeRanged: "DS4.AttackTypeMeleeRanged", }, + /** + * * Define the file paths to icon images + * @type {Object} + */ + attackTypesIcons: { + melee: "systems/ds4/assets/DS4-MAT.png", + meleeRanged: "systems/ds4/assets/DS4-MRA.png", + ranged: "systems/ds4/assets/DS4-RAT.png", + }, + /** * Define the set of item availabilties * @type {Object} @@ -56,6 +66,18 @@ export const DS4 = { vambraceGreaves: "DS4.ArmorTypeVambraceGreaves", }, + /** + * * Define abbreviations for the armor types + * @type {Object} + */ + armorTypesAbbr: { + body: "DS4.ArmorTypeBodyAbbr", + helmet: "DS4.ArmorTypeHelmetAbbr", + vambrace: "DS4.ArmorTypeVambraceAbbr", + greaves: "DS4.ArmorTypeGreavesAbbr", + vambraceGreaves: "DS4.ArmorTypeVambraceGreavesAbbr", + }, + /** * * Define the set of armor materials, used to determine if a characer may wear the armor without additional penalties * @type {Object} @@ -66,4 +88,15 @@ export const DS4 = { chain: "DS4.ArmorMaterialTypeChain", plate: "DS4.ArmorMaterialTypePlate", }, + + /** + * * Define the abbreviations of armor materials + * @type {Object} + */ + armorMaterialTypesAbbr: { + cloth: "DS4.ArmorMaterialTypeClothAbbr", + leather: "DS4.ArmorMaterialTypeLeatherAbbr", + chain: "DS4.ArmorMaterialTypeChainAbbr", + plate: "DS4.ArmorMaterialTypePlateAbbr", + }, }; diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 09899c42..5cf5d4a0 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -50,7 +50,15 @@ async function registerHandlebarsPartials() { */ Hooks.once("setup", function () { // Localize CONFIG objects once up-front - const toLocalize = ["attackTypes", "itemAvailabilities", "itemTypes", "armorTypes", "armorMaterialTypes"]; + const toLocalize = [ + "attackTypes", + "itemAvailabilities", + "itemTypes", + "armorTypes", + "armorTypesAbbr", + "armorMaterialTypes", + "armorMaterialTypesAbbr", + ]; // Exclude some from sorting where the default order matters const noSort = []; diff --git a/src/scss/components/_items.scss b/src/scss/components/_items.scss index 9c725e83..d35a84a5 100644 --- a/src/scss/components/_items.scss +++ b/src/scss/components/_items.scss @@ -21,6 +21,7 @@ img { display: block; + border: none; } } diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items.hbs index 2e773eba..1c72cd46 100644 --- a/src/templates/actor/partials/items.hbs +++ b/src/templates/actor/partials/items.hbs @@ -3,26 +3,28 @@
{{!-- WEAPONS --}} -

{{localize "DS4.ItemTypeWeapon"}}

{{!-- SPECIFIC --}} +

{{localize 'DS4.ItemTypeWeapon'}}

{{!-- SPECIFIC --}}
  1. -
    E
    {{!-- equipped --}} {{!-- SPECIFIC --}} +
    E
    {{!-- equipped --}} {{!-- SPECIFIC --}}
    -
    #
    {{!-- amount --}} +
    #
    {{!-- amount --}}
    -
    {{localize "DS4.ItemName"}}
    -
    {{localize "DS4.AttackTypeAbbr"}}
    {{!-- SPECIFIC --}} +
    {{localize 'DS4.ItemName'}}
    +
    {{localize 'DS4.AttackTypeAbbr'}}
    {{!-- SPECIFIC --}}
    -
    {{localize "DS4.WeaponBonusAbbr"}}
    {{!-- SPECIFIC --}} -
    {{localize "DS4.OpponentDefenseAbbr"}}
    {{!-- SPECIFIC --}} +
    {{localize 'DS4.WeaponBonusAbbr'}} +
    {{!-- SPECIFIC --}} +
    {{localize + 'DS4.OpponentDefenseAbbr'}}
    {{!-- SPECIFIC --}}
    -
    {{localize "DS4.Description"}}
    +
    {{localize 'DS4.Description'}}
    {{!-- add button --}}
    {{!-- SPECIFIC --}} - + - {{localize "DS4.UserInteractionAddItem"}} + {{localize 'DS4.UserInteractionAddItem'}}
  2. {{#each itemsByType.weapon as |item id|}} {{!-- SPECIFIC --}} @@ -43,7 +45,10 @@ {{!-- name --}}

    {{item.name}}

    {{!-- item specifics --}} -
    {{lookup ../../config.attackTypes itemData.attackType}}
    {{!-- SPECIFIC --}} +
    + +
    {{!-- SPECIFIC --}}
    {{itemData.weaponBonus}}
    {{!-- SPECIFIC --}}
    {{itemData.opponentDefense}}
    {{!-- SPECIFIC --}} @@ -61,24 +66,27 @@
{{!-- ARMOR --}} -

{{localize "DS4.ItemTypeArmor"}}

{{!-- SPECIFIC --}} +

{{localize 'DS4.ItemTypeArmor'}}

{{!-- SPECIFIC --}}
  1. -
    E
    {{!-- equipped --}} {{!-- SPECIFIC --}} +
    E
    {{!-- equipped --}} {{!-- SPECIFIC --}}
    -
    #
    {{!-- amount --}} +
    #
    {{!-- amount --}}
    -
    {{localize "DS4.ItemName"}}
    -
    {{localize "DS4.ArmorMaterialTypeAbbr"}}
    {{!-- SPECIFIC --}} -
    {{localize "DS4.ArmorTypeAbbr"}}
    {{!-- SPECIFIC --}} -
    {{localize "DS4.ArmorValueAbbr"}}
    {{!-- SPECIFIC --}} -
    {{localize "DS4.Description"}}
    +
    {{localize 'DS4.ItemName'}}
    +
    {{localize 'DS4.ArmorMaterialTypeAbbr'}}
    {{!-- + SPECIFIC --}} +
    {{localize 'DS4.ArmorTypeAbbr'}}
    {{!-- SPECIFIC --}} +
    + {{localize 'DS4.ArmorValueAbbr'}} +
    {{!-- SPECIFIC --}} +
    {{localize 'DS4.Description'}}
    {{!-- add button --}}
    {{!-- SPECIFIC --}} - + - {{localize "DS4.UserInteractionAddItem"}} + {{localize 'DS4.UserInteractionAddItem'}}
  2. {{#each itemsByType.armor as |item id|}} {{!-- SPECIFIC --}} @@ -99,11 +107,15 @@ {{!-- name --}}

    {{item.name}}

    {{!-- item specifics --}} -
    {{lookup ../../config.armorMaterialTypes itemData.armorMaterialType}}
    {{!-- SPECIFIC --}} -
    {{lookup ../../config.armorTypes itemData.armorType}}
    {{!-- SPECIFIC --}} +
    + {{lookup ../../config.armorMaterialTypesAbbr itemData.armorMaterialType}} +
    {{!-- SPECIFIC --}} +
    + {{lookup ../../config.armorTypesAbbr itemData.armorType}} +
    {{!-- SPECIFIC --}}
    {{itemData.armorValue}}
    {{!-- SPECIFIC --}} {{!-- description --}} -
    {{{itemData.description}}}
    +
    {{{itemData.description}}}
    {{!-- edit & delete buttons --}}
    @@ -116,22 +128,23 @@ {{!-- SHIELD --}} -

    {{localize "DS4.ItemTypeShield"}}

    {{!-- SPECIFIC --}} +

    {{localize 'DS4.ItemTypeShield'}}

    {{!-- SPECIFIC --}}
    1. -
      E
      {{!-- equipped --}} {{!-- SPECIFIC --}} +
      E
      {{!-- equipped --}} {{!-- SPECIFIC --}}
      -
      #
      {{!-- amount --}} +
      #
      {{!-- amount --}}
      -
      {{localize "DS4.ItemName"}}
      -
      {{localize "DS4.ArmorValueAbbr"}}
      {{!-- SPECIFIC --}} -
      {{localize "DS4.Description"}}
      +
      {{localize 'DS4.ItemName'}}
      +
      {{localize 'DS4.ArmorValueAbbr'}} +
      {{!-- SPECIFIC --}} +
      {{localize 'DS4.Description'}}
      {{!-- add button --}}
      {{!-- SPECIFIC --}} - + - {{localize "DS4.UserInteractionAddItem"}} + {{localize 'DS4.UserInteractionAddItem'}}
    2. {{#each itemsByType.shield as |item id|}} {{!-- SPECIFIC --}} @@ -166,22 +179,22 @@
    {{!-- TRINKET --}} -

    {{localize "DS4.ItemTypeTrinket"}}

    {{!-- SPECIFIC --}} +

    {{localize 'DS4.ItemTypeTrinket'}}

    {{!-- SPECIFIC --}}
    1. -
      E
      {{!-- equipped --}} {{!-- SPECIFIC --}} +
      E
      {{!-- equipped --}} {{!-- SPECIFIC --}}
      -
      #
      {{!-- amount --}} +
      #
      {{!-- amount --}}
      -
      {{localize "DS4.ItemName"}}
      -
      {{localize "DS4.StorageLocation"}}
      {{!-- SPECIFIC --}} -
      {{localize "DS4.Description"}}
      +
      {{localize 'DS4.ItemName'}}
      +
      {{localize 'DS4.StorageLocation'}}
      {{!-- SPECIFIC --}} +
      {{localize 'DS4.Description'}}
      {{!-- add button --}}
      {{!-- SPECIFIC --}} - + - {{localize "DS4.UserInteractionAddItem"}} + {{localize 'DS4.UserInteractionAddItem'}}
    2. {{#each itemsByType.trinket as |item id|}} {{!-- SPECIFIC --}} @@ -202,7 +215,7 @@ {{!-- name --}}

      {{item.name}}

      {{!-- storage location --}} -
      {{{itemData.storageLocation}}}
      {{!-- SPECIFIC --}} +
      {{{itemData.storageLocation}}}
      {{!-- SPECIFIC --}} {{!-- description --}}
      {{{itemData.description}}}
      {{!-- edit & delete buttons --}} @@ -216,21 +229,21 @@
    {{!-- EQUIPMENT --}} -

    {{localize "DS4.ItemTypeEquipment"}}

    {{!-- SPECIFIC --}} +

    {{localize 'DS4.ItemTypeEquipment'}}

    {{!-- SPECIFIC --}}
    1. -
      #
      {{!-- amount --}} +
      #
      {{!-- amount --}}
      -
      {{localize "DS4.ItemName"}}
      -
      {{localize "DS4.StorageLocation"}}
      {{!-- SPECIFIC --}} -
      {{localize "DS4.Description"}}
      +
      {{localize 'DS4.ItemName'}}
      +
      {{localize 'DS4.StorageLocation'}}
      {{!-- SPECIFIC --}} +
      {{localize 'DS4.Description'}}
      {{!-- add button --}}
      {{!-- SPECIFIC --}} - {{localize "DS4.UserInteractionAddItem"}} + {{localize 'DS4.UserInteractionAddItem'}}
    2. {{#each itemsByType.equipment as |item id|}} {{!-- SPECIFIC --}} @@ -247,7 +260,7 @@ {{!-- name --}}

      {{item.name}}

      {{!-- storage location --}} -
      {{{itemData.storageLocation}}}
      {{!-- SPECIFIC --}} +
      {{{itemData.storageLocation}}}
      {{!-- SPECIFIC --}} {{!-- description --}}
      {{{itemData.description}}}
      {{!-- edit & delete buttons --}}