diff --git a/langs/en-ca.2.json b/langs/en-ca.2.json index 2d68788..fc70bb1 100644 --- a/langs/en-ca.2.json +++ b/langs/en-ca.2.json @@ -43,6 +43,14 @@ "d10": "d10", "d12": "d12", "d20": "d20" + }, + "sheet": { + "actor": { + "v2": { + "stat-not-chosen": "Select a dice to see the {name} skills", + "skill-roll-locked": "@dotdungeon.trainingLevel.locked" + } + } } } } \ No newline at end of file diff --git a/module/sheets/Actors/PC/Improved.mjs b/module/sheets/Actors/PC/Improved.mjs index 9283e69..d004963 100644 --- a/module/sheets/Actors/PC/Improved.mjs +++ b/module/sheets/Actors/PC/Improved.mjs @@ -87,7 +87,7 @@ export class PlayerSheetv2 extends GenericActorSheet { name: game.i18n.format(`dotdungeon.skills.${skill}`), value, formula: `1` + stat.value + modifierToString(value, { spaces: true }), - rollDisabled: stat.value === `` || value === -1, + rollDisabled: value === -1, }); }; diff --git a/module/utils/localizer.mjs b/module/utils/localizer.mjs index 147f7c5..0d1d800 100644 --- a/module/utils/localizer.mjs +++ b/module/utils/localizer.mjs @@ -14,8 +14,8 @@ export function localizer(key, args = {}, depth = 0) { const subkey = match.groups.key; localized = localized.slice(0, match.index) - + localizer(subkey.slice(1), args, depth + 1) - + localized.slice(match.index + subkey.length) + + localizer(subkey, args, depth + 1) + + localized.slice(match.index + subkey.length + 1) }; return localized; }; diff --git a/styles/sheets/actor/char-sheet/pages/stats.scss b/styles/sheets/actor/char-sheet/pages/stats.scss index fdc3638..772c834 100644 --- a/styles/sheets/actor/char-sheet/pages/stats.scss +++ b/styles/sheets/actor/char-sheet/pages/stats.scss @@ -7,6 +7,8 @@ .stat { border-radius: 8px; + display: flex; + flex-direction: column; select { height: 100%; @@ -28,6 +30,9 @@ } .dice-select { color: var(--stat-dice-select-text-color); + option { + background: var(--stat-dice-select-bg); + } } .roll-stat { color: var(--stat-roll-button-text-color); @@ -38,12 +43,20 @@ } } - &__skills { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: 8px; - margin: 8px; + &__empty { + display: flex; + justify-content: center; align-items: center; + flex-grow: 1; + } + + &__skills { + align-items: center; + box-sizing: border-box; + display: grid; + gap: 8px; + grid-template-columns: repeat(3, 1fr); + padding: 8px; .skill { &__label { diff --git a/styles/sheets/actor/char-sheet/themes/dark.scss b/styles/sheets/actor/char-sheet/themes/dark.scss index dfb2871..88484cb 100644 --- a/styles/sheets/actor/char-sheet/themes/dark.scss +++ b/styles/sheets/actor/char-sheet/themes/dark.scss @@ -27,10 +27,12 @@ $on-secondary: $t; --stat-header-text-color: #{$on-surface}; --stat-dice-select-text-color: #{$on-surface}; + --stat-dice-select-bg: #{$surface}; --stat-roll-button-text-color: #{$on-surface}; --stat-divider-color: #{$secondary}; + --stat-not-chosen-placeholder-text-color: #{$on-surface}; --skill-name-text-color: #{$on-surface}; - --skill-training-select: #{$surface}; + --skill-training-select-bg: #{$surface}; --skill-training-select-text-color: #{$on-surface}; --skill-roll-button-text-color: #{$on-surface}; } diff --git a/templates/actors/char-sheet/v2/partials/stats.v2.pc.hbs b/templates/actors/char-sheet/v2/partials/stats.v2.pc.hbs index 3acf48e..e3ae794 100644 --- a/templates/actors/char-sheet/v2/partials/stats.v2.pc.hbs +++ b/templates/actors/char-sheet/v2/partials/stats.v2.pc.hbs @@ -17,38 +17,46 @@ {{#if stat.skills}} -
+ {{dd-i18n "dotdungeon.sheet.actor.v2.stat-not-chosen" stat}} +