From 61b757ae8f90321a476d2f6ff99562a378bc37d4 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 30 Jun 2021 19:14:52 +0200 Subject: [PATCH] Fix Actor sheets --- .../sheets/actor/character-sheet.hbs | 28 +++++++++---------- .../components/character-progression.hbs | 14 ++++++---- .../sheets/actor/components/checks.hbs | 2 +- .../sheets/actor/components/combat-values.hbs | 2 +- .../sheets/actor/components/core-values.hbs | 4 +-- .../sheets/actor/components/currency.hbs | 2 +- src/templates/sheets/actor/creature-sheet.hbs | 19 +++++++------ src/templates/sheets/actor/tabs/biography.hbs | 2 +- src/templates/sheets/actor/tabs/profile.hbs | 4 +-- .../sheets/item/components/sheet-header.hbs | 4 +-- 10 files changed, 42 insertions(+), 39 deletions(-) diff --git a/src/templates/sheets/actor/character-sheet.hbs b/src/templates/sheets/actor/character-sheet.hbs index b2a2415..b5d23ca 100644 --- a/src/templates/sheets/actor/character-sheet.hbs +++ b/src/templates/sheets/actor/character-sheet.hbs @@ -9,12 +9,12 @@ SPDX-License-Identifier: MIT
{{!-- Sheet Header --}}
- Actor Icon

- - + +

{{> systems/ds4/templates/sheets/actor/components/character-progression.hbs}} @@ -22,28 +22,28 @@ SPDX-License-Identifier: MIT
- +
+ value="{{data.data.baseInfo.culture}}" data-dtype="String" />
+ name="data.progression.progressPoints.used" + value="{{data.data.progression.progressPoints.used}}" data-dtype="Number" /> / + value="{{data.data.progression.progressPoints.total}}" data-dtype="Number" />
@@ -51,26 +51,26 @@ SPDX-License-Identifier: MIT for="data.progression.talentPoints.used">{{config.i18n.characterProgression.talentPoints}}
/ + id="data.progression.talentPoints.total" + value="{{data.data.progression.talentPoints.total}}" data-dtype="Number" />
+ value="{{data.data.baseInfo.class}}" data-dtype="String" />
+ value="{{data.data.baseInfo.heroClass}}" data-dtype="String" />
diff --git a/src/templates/sheets/actor/components/character-progression.hbs b/src/templates/sheets/actor/components/character-progression.hbs index cb43ed6..9788ea5 100644 --- a/src/templates/sheets/actor/components/character-progression.hbs +++ b/src/templates/sheets/actor/components/character-progression.hbs @@ -13,7 +13,8 @@ SPDX-License-Identifier: MIT "DS4.CombatValuesHitPointsCurrentAbbr"}} + id="data.combatValues.hitPoints.value" value="{{data.data.combatValues.hitPoints.value}}" + data-dtype="Number" /> {{#if (eq actor.type "character")}} {{#if settings.showSlayerPoints}} @@ -21,9 +22,9 @@ SPDX-License-Identifier: MIT

- + {{/if}}
@@ -32,7 +33,7 @@ SPDX-License-Identifier: MIT "DS4.CharacterProgressionLevelAbbr"}} + value="{{data.data.progression.level}}" data-dtype="Number" />

+ id="data.progression.experiencePoints" value="{{data.data.progression.experiencePoints}}" + data-dtype="Number" />
{{/if}} diff --git a/src/templates/sheets/actor/components/checks.hbs b/src/templates/sheets/actor/components/checks.hbs index bdffe15..4accdae 100644 --- a/src/templates/sheets/actor/components/checks.hbs +++ b/src/templates/sheets/actor/components/checks.hbs @@ -7,6 +7,6 @@ SPDX-License-Identifier: MIT
{{#each config.i18n.checks as |check-label check-key|}} {{> systems/ds4/templates/sheets/actor/components/check.hbs check-key=check-key check-target-number=(lookup - ../data.checks check-key) check-label=check-label}} + ../data.data.checks check-key) check-label=check-label}} {{/each}}
diff --git a/src/templates/sheets/actor/components/combat-values.hbs b/src/templates/sheets/actor/components/combat-values.hbs index 4c05153..fe0fabc 100644 --- a/src/templates/sheets/actor/components/combat-values.hbs +++ b/src/templates/sheets/actor/components/combat-values.hbs @@ -8,6 +8,6 @@ SPDX-License-Identifier: MIT
{{#each config.i18n.combatValues as |combat-value-label combat-value-key|}} {{> systems/ds4/templates/sheets/actor/components/combat-value.hbs combat-value-key=combat-value-key - combat-value-data=(lookup ../data.combatValues combat-value-key) combat-value-label=combat-value-label}} + combat-value-data=(lookup ../data.data.combatValues combat-value-key) combat-value-label=combat-value-label}} {{/each}}
diff --git a/src/templates/sheets/actor/components/core-values.hbs b/src/templates/sheets/actor/components/core-values.hbs index 762624f..e476ce0 100644 --- a/src/templates/sheets/actor/components/core-values.hbs +++ b/src/templates/sheets/actor/components/core-values.hbs @@ -8,12 +8,12 @@ SPDX-License-Identifier: MIT
{{#each config.i18n.attributes as |attribute-label attribute-key|}} {{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=attribute-label - core-value-key=attribute-key core-value-data=(lookup ../data.attributes + core-value-key=attribute-key core-value-data=(lookup ../data.data.attributes attribute-key) core-value-variant="attribute"}} {{/each}} {{#each config.i18n.traits as |trait-label trait-key|}} {{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=trait-label core-value-key=trait-key - core-value-data=(lookup ../data.traits trait-key) core-value-variant="trait"}} + core-value-data=(lookup ../data.data.traits trait-key) core-value-variant="trait"}} {{/each}}
diff --git a/src/templates/sheets/actor/components/currency.hbs b/src/templates/sheets/actor/components/currency.hbs index 6cb61f0..99e7019 100644 --- a/src/templates/sheets/actor/components/currency.hbs +++ b/src/templates/sheets/actor/components/currency.hbs @@ -8,7 +8,7 @@ SPDX-License-Identifier: MIT

{{localize 'DS4.CharacterCurrency'}}

- {{#each data.currency as |value key|}} + {{#each data.data.currency as |value key|}} diff --git a/src/templates/sheets/actor/creature-sheet.hbs b/src/templates/sheets/actor/creature-sheet.hbs index fa128d8..1b034bc 100644 --- a/src/templates/sheets/actor/creature-sheet.hbs +++ b/src/templates/sheets/actor/creature-sheet.hbs @@ -9,11 +9,11 @@ SPDX-License-Identifier: MIT {{!-- Sheet Header --}}
- +

- - + +

{{> systems/ds4/templates/sheets/actor/components/character-progression.hbs}} @@ -21,7 +21,7 @@ SPDX-License-Identifier: MIT
+
-
+
diff --git a/src/templates/sheets/actor/tabs/biography.hbs b/src/templates/sheets/actor/tabs/biography.hbs index ee49b3b..42e2612 100644 --- a/src/templates/sheets/actor/tabs/biography.hbs +++ b/src/templates/sheets/actor/tabs/biography.hbs @@ -5,6 +5,6 @@ SPDX-License-Identifier: MIT --}}
- {{editor content=data.profile.biography target="data.profile.biography" button=true owner=owner + {{editor content=data.data.profile.biography target="data.profile.biography" button=true owner=owner editable=editable}}
diff --git a/src/templates/sheets/actor/tabs/profile.hbs b/src/templates/sheets/actor/tabs/profile.hbs index 5c5db70..4cabb45 100644 --- a/src/templates/sheets/actor/tabs/profile.hbs +++ b/src/templates/sheets/actor/tabs/profile.hbs @@ -7,7 +7,7 @@ SPDX-License-Identifier: MIT
- {{#each data.profile as |profile-data-value profile-data-key|}} + {{#each data.data.profile as |profile-data-value profile-data-key|}} {{#if (and (ne profile-data-key 'biography') (ne profile-data-key 'specialCharacteristics'))}}
+ rows="4">{{data.data.profile.specialCharacteristics}}
diff --git a/src/templates/sheets/item/components/sheet-header.hbs b/src/templates/sheets/item/components/sheet-header.hbs index 7d84e2b..50bed6b 100644 --- a/src/templates/sheets/item/components/sheet-header.hbs +++ b/src/templates/sheets/item/components/sheet-header.hbs @@ -6,9 +6,9 @@ SPDX-License-Identifier: MIT --}}
- +
-

+

{{lookup config.i18n.itemTypes item.type}}

{{> @partial-block}}