From 98f31d9e8c13c9d613c3999b66c3229686370e08 Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Wed, 6 Jan 2021 11:52:11 +0100 Subject: [PATCH] renamed talent property from talentRank to rank --- src/module/item/item-data.ts | 2 +- src/module/item/item.ts | 2 +- src/template.json | 2 +- src/templates/actor/partials/talents-overview.hbs | 5 +++-- src/templates/item/talent-sheet.hbs | 6 +++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/module/item/item-data.ts b/src/module/item/item-data.ts index 4bf5f16d..be1a0042 100644 --- a/src/module/item/item-data.ts +++ b/src/module/item/item-data.ts @@ -16,7 +16,7 @@ interface DS4Armor extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable, DS4It } export interface DS4Talent extends DS4ItemBase { - talentRank: DS4TalentRank; + rank: DS4TalentRank; } interface DS4TalentRank extends ModifiableData { diff --git a/src/module/item/item.ts b/src/module/item/item.ts index 2859aedf..e9a1aa3e 100644 --- a/src/module/item/item.ts +++ b/src/module/item/item.ts @@ -23,7 +23,7 @@ export class DS4Item extends Item { prepareDerivedData(): void { if (this.type === "talent") { const data = this.data.data as DS4Talent; - data.talentRank.total = data.talentRank.base + data.talentRank.mod; + data.rank.total = data.rank.base + data.rank.mod; } } } diff --git a/src/template.json b/src/template.json index f412936e..39b96699 100644 --- a/src/template.json +++ b/src/template.json @@ -140,7 +140,7 @@ }, "talent": { "templates": ["base"], - "talentRank": { + "rank": { "base": 0, "max": 0, "mod": 0 diff --git a/src/templates/actor/partials/talents-overview.hbs b/src/templates/actor/partials/talents-overview.hbs index 81839750..f70421e3 100644 --- a/src/templates/actor/partials/talents-overview.hbs +++ b/src/templates/actor/partials/talents-overview.hbs @@ -1,6 +1,7 @@ {{!-- ======================================================================== --}} {{!-- INLINE PARTIAL DEFINITIONS --}} {{!-- ======================================================================== --}} +{{!-- TODO: remove duplicate add and delete button definition --}} {{!-- !-- Render an "add" button for a given data type. @@ -28,9 +29,9 @@ {{#*inline "talentRankValue"}} {{/inline}} diff --git a/src/templates/item/talent-sheet.hbs b/src/templates/item/talent-sheet.hbs index 27529f06..0c9dc198 100644 --- a/src/templates/item/talent-sheet.hbs +++ b/src/templates/item/talent-sheet.hbs @@ -5,10 +5,10 @@ {{#*inline "talentRankSideProperty" }}
- + + {{#if (eq property 'base') }}max="{{data.rank.max}}"{{/if}} + name="data.rank.{{property}}" value="{{lookup data.rank property}}" />
{{/inline}}