moved icon mappings in CONFIG.DS4.icons

This commit is contained in:
Gesina Schwalbe 2021-01-24 17:56:32 +01:00
parent d831f376e1
commit 62ab89f83b
3 changed files with 19 additions and 14 deletions

View file

@ -299,20 +299,25 @@ export const DS4 = {
}, },
/** /**
* Define the file paths to icon images * A dictionary of dictionaries mapping keys to icon file paths.
*/ */
attackTypesIcons: { icons: {
melee: "systems/ds4/assets/icons/official/combat-values/melee-attack.png", /**
meleeRanged: "systems/ds4/assets/icons/official/combat-values/melee-ranged-attack.png", * Define the file paths to icon images
ranged: "systems/ds4/assets/icons/official/combat-values/ranged-attack.png", */
}, attackTypes: {
melee: "systems/ds4/assets/icons/official/combat-values/melee-attack.png",
meleeRanged: "systems/ds4/assets/icons/official/combat-values/melee-ranged-attack.png",
ranged: "systems/ds4/assets/icons/official/combat-values/ranged-attack.png",
},
/** /**
* Define the file paths to icon images * Define the file paths to icon images
*/ */
spellTypesIcons: { spellTypes: {
spellcasting: "systems/ds4/assets/icons/official/combat-values/spellcasting.png", spellcasting: "systems/ds4/assets/icons/official/combat-values/spellcasting.png",
targetedSpellcasting: "systems/ds4/assets/icons/official/combat-values/targeted-spellcasting.png", targetedSpellcasting: "systems/ds4/assets/icons/official/combat-values/targeted-spellcasting.png",
},
}, },
/** /**

View file

@ -110,7 +110,7 @@
{{#each itemsByType.weapon as |item id|}} {{#each itemsByType.weapon as |item id|}}
{{#> itemListEntry item=item}} {{#> itemListEntry item=item}}
<div class="flex05 item-image"> <div class="flex05 item-image">
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}" <img src="{{lookup ../../config.icons.attackTypes item.data.data.attackType}}"
title="{{lookup ../../config.i18n.attackTypes item.data.data.attackType}}" width="24" height="24" /> title="{{lookup ../../config.i18n.attackTypes item.data.data.attackType}}" width="24" height="24" />
</div> </div>
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div> <div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>

View file

@ -71,7 +71,7 @@
data-property="name" title="{{localize 'DS4.ItemName'}}" /> data-property="name" title="{{localize 'DS4.ItemName'}}" />
{{!-- spell type --}} {{!-- spell type --}}
<div class="flex05 item-image"> <div class="flex05 item-image">
<img src="{{lookup ../config.spellTypesIcons item.data.data.spellType}}" <img src="{{lookup ../config.icons.spellTypes item.data.data.spellType}}"
title="{{lookup ../config.i18n.spellTypes item.data.data.spellType}}" width="24" height="24" /> title="{{lookup ../config.i18n.spellTypes item.data.data.spellType}}" width="24" height="24" />
</div> </div>
{{!-- spell bonus --}} {{!-- spell bonus --}}