diff --git a/lang/de.json b/lang/de.json index 55b722f5..f0b424db 100644 --- a/lang/de.json +++ b/lang/de.json @@ -232,7 +232,6 @@ "DS4.TalentRankMax": "Maximum", "DS4.TalentRankMod": "Zusätzlich", "DS4.TalentRankTotal": "Gesamt", - "DS4.TalentRankOf": "von", "DS4.CharacterLanguageLanguages": "Sprachen", "DS4.CharacterLanguageAlphabets": "Schriftzeichen", "DS4.SpecialCreatureAbilityExperiencePoints": "Erfahrungspunkte", diff --git a/lang/en.json b/lang/en.json index 2b1844fe..f7e43014 100644 --- a/lang/en.json +++ b/lang/en.json @@ -232,7 +232,6 @@ "DS4.TalentRankMax": "Maximum", "DS4.TalentRankMod": "Additional", "DS4.TalentRankTotal": "Total", - "DS4.TalentRankOf": "of", "DS4.CharacterLanguageLanguages": "Languages", "DS4.CharacterLanguageAlphabets": "Alphabets", "DS4.SpecialCreatureAbilityExperiencePoints": "Experience Points", diff --git a/scss/components/actor/_talent_rank_equation.scss b/scss/components/actor/_talent_rank_equation.scss deleted file mode 100644 index 5bf13a42..00000000 --- a/scss/components/actor/_talent_rank_equation.scss +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021 Johannes Loher - * SPDX-FileCopyrightText: 2021 Gesina Schwalbe - * - * SPDX-License-Identifier: MIT - */ - -.ds4-talent-rank-equation { - display: flex; - gap: 0.5em; - - &__value { - &[type="number"] { - background-color: transparent; - border: 0; - height: auto; - padding: 0; - text-align: center; - } - } -} diff --git a/scss/components/shared/_embedded_document_list.scss b/scss/components/shared/_embedded_document_list.scss index 1fa2ae27..b64e2e5e 100644 --- a/scss/components/shared/_embedded_document_list.scss +++ b/scss/components/shared/_embedded_document_list.scss @@ -59,7 +59,7 @@ } } &--talent { - grid-template-columns: $row-height 1fr 21ch 3fr 5ch; + grid-template-columns: $row-height 1fr 4ch 3fr 5ch; :nth-child(9n + 3) { justify-self: center; } diff --git a/scss/ds4.scss b/scss/ds4.scss index 777bb7c7..b2890eea 100644 --- a/scss/ds4.scss +++ b/scss/ds4.scss @@ -39,7 +39,6 @@ @use "components/actor/currency"; @use "components/actor/description"; @use "components/actor/profile"; -@use "components/actor/talent_rank_equation"; // item @use "components/item/item_header"; diff --git a/src/apps/sheet-helpers.ts b/src/apps/sheet-helpers.ts index 5082244d..dad3c75a 100644 --- a/src/apps/sheet-helpers.ts +++ b/src/apps/sheet-helpers.ts @@ -15,7 +15,7 @@ export function disableOverriddenFields( for (const key of Object.keys(foundry.utils.flattenObject(overrides))) { const elements = form?.querySelectorAll(selector(key)); elements?.forEach((element) => { - if (inputs.includes(element.tagName)) { + if (inputs.includes(element.tagName) && !element.hasAttribute("disabled")) { element.setAttribute("disabled", ""); const title = element.getAttribute("title"); const newTitle = title === null ? titleAddition : `${title} ${titleAddition}`; diff --git a/src/handlebars/handlebars-partials.ts b/src/handlebars/handlebars-partials.ts index 3220a2b9..1992b551 100644 --- a/src/handlebars/handlebars-partials.ts +++ b/src/handlebars/handlebars-partials.ts @@ -25,7 +25,6 @@ export async function registerHandlebarsPartials(): Promise { "systems/ds4/templates/sheets/actor/components/item-list-header.hbs", "systems/ds4/templates/sheets/actor/components/items-overview.hbs", "systems/ds4/templates/sheets/actor/components/profile.hbs", - "systems/ds4/templates/sheets/actor/components/talent-rank-equation.hbs", "systems/ds4/templates/sheets/actor/tabs/biography.hbs", "systems/ds4/templates/sheets/actor/tabs/character-abilities.hbs", "systems/ds4/templates/sheets/actor/tabs/character-inventory.hbs", diff --git a/templates/sheets/actor/components/talent-rank-equation.hbs b/templates/sheets/actor/components/talent-rank-equation.hbs deleted file mode 100644 index 3480b5f1..00000000 --- a/templates/sheets/actor/components/talent-rank-equation.hbs +++ /dev/null @@ -1,45 +0,0 @@ -{{!-- -SPDX-FileCopyrightText: 2021 Johannes Loher -SPDX-FileCopyrightText: 2021 Gesina Schwalbe - -SPDX-License-Identifier: MIT ---}} - -{{!-- ======================================================================== --}} -{{!-- INLINE PARTIAL DEFINITIONS --}} -{{!-- ======================================================================== --}} - -{{!-- -!-- Render an input element for a rank value property of an item. -!-- @param talentRank: The talentRank -!-- @param property: The key of the property in item.data (if 'base', the max value is set automatically) -!-- @param disabled: If given, is placed plainly into the input as HTML property; meant to be set to "disabled" to -disable the input element -!-- @param localizeString: The string to use as key for the localized tooltip ---}} -{{#*inline "talentRankValue"}} - -{{/inline}} - -{{!-- ======================================================================== --}} - -{{!-- -!-- Render an input element for a rank value property of an item. -!-- @param talentRank: The talent rank ---}} -
- {{!-- acquired rank --}} - {{> talentRankValue talentRank=talentRank property='base' localizeString='DS4.TalentRankBase'}} -
( {{localize "DS4.TalentRankOf"}}
- {{!-- maximum acquirable rank --}} - {{> talentRankValue talentRank=talentRank property='max' localizeString='DS4.TalentRankMax'}} -
) +
- {{!-- additional ranks --}} - {{> talentRankValue talentRank=talentRank property='mod' localizeString='DS4.TalentRankMod'}} -
=
- {{!-- derived total rank --}} - {{> talentRankValue talentRank=talentRank property='total' localizeString='DS4.TalentRankTotal' - disabled='disabled'}} -
diff --git a/templates/sheets/actor/tabs/character-abilities.hbs b/templates/sheets/actor/tabs/character-abilities.hbs index d71f2210..d1369f87 100644 --- a/templates/sheets/actor/tabs/character-abilities.hbs +++ b/templates/sheets/actor/tabs/character-abilities.hbs @@ -18,7 +18,7 @@ SPDX-License-Identifier: MIT {{#each itemsByType.talent as |itemData id|}} {{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData}} {{!-- rank --}} - {{> systems/ds4/templates/sheets/actor/components/talent-rank-equation.hbs talentRank=itemData.data.rank}} +
{{itemData.data.rank.total}}
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}} {{/each}}