From 3adb34d721b4e7f66762a8dede077db5852477f8 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 9 Jan 2025 15:54:41 +0100 Subject: [PATCH] Reduce default icon size, Fix #27 --- css/fvtt-cthulhu-eternal.css | 10 +++++----- module/models/protagonist.mjs | 2 +- styles/protagonist.less | 10 +++++----- templates/protagonist-equipment.hbs | 7 ++++++- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/css/fvtt-cthulhu-eternal.css b/css/fvtt-cthulhu-eternal.css index 2e6caf6..0e0e7ff 100644 --- a/css/fvtt-cthulhu-eternal.css +++ b/css/fvtt-cthulhu-eternal.css @@ -682,7 +682,7 @@ i.fvtt-cthulhu-eternal { align-items: center; gap: 4px; min-width: 13rem; - max-width: 13srem; + max-width: 13rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .rollable:hover, .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .rollable:focus { @@ -694,12 +694,12 @@ i.fvtt-cthulhu-eternal { max-width: 2rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .damage { - min-width: 5rem; - max-width: 5rem; + min-width: 6rem; + max-width: 6rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .name { - min-width: 8rem; - max-width: 8rem; + min-width: 10rem; + max-width: 10rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .item-img { width: 24px; diff --git a/module/models/protagonist.mjs b/module/models/protagonist.mjs index 7ad84d1..1b29b38 100644 --- a/module/models/protagonist.mjs +++ b/module/models/protagonist.mjs @@ -151,7 +151,7 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData } let resourceIndex = Math.max(Math.min(this.resources.permanentRating, 20), 0) - let breakdown = SYSTEM.RESOURCE_BREAKDOWN[this.resources.resourceIndex] + let breakdown = SYSTEM.RESOURCE_BREAKDOWN[resourceIndex] if (this.resources.hand !== breakdown.hand) { updates[`system.resources.hand`] = breakdown.hand } diff --git a/styles/protagonist.less b/styles/protagonist.less index c89dba4..71a9b02 100644 --- a/styles/protagonist.less +++ b/styles/protagonist.less @@ -466,7 +466,7 @@ align-items: center; gap: 4px; min-width: 13rem; - max-width: 13srem; + max-width: 13rem; .rollable:hover, .rollable:focus { text-shadow: 0 0 8px var(--color-shadow-primary); @@ -477,12 +477,12 @@ max-width: 2rem; } .damage { - min-width: 5rem; - max-width: 5rem; + min-width: 6rem; + max-width: 6rem; } .name { - min-width: 8rem; - max-width: 8rem; + min-width: 10rem; + max-width: 10rem; } .item-img { width: 24px; diff --git a/templates/protagonist-equipment.hbs b/templates/protagonist-equipment.hbs index 80ec504..701aa7b 100644 --- a/templates/protagonist-equipment.hbs +++ b/templates/protagonist-equipment.hbs @@ -9,12 +9,17 @@ {{#each weapons as |item|}} {{!log 'weapon' this}}
+ +
{{item.name}}
+ + {{localize "CTHULHUETERNAL.Label.damageShort"}} : + data-roll-value="{{item.system.damage}}"> + {{localize "CTHULHUETERNAL.Label.damageShort"}} : {{item.system.damage}}