renamed talent property from talentRank to rank
This commit is contained in:
parent
17b5eee902
commit
98f31d9e8c
5 changed files with 9 additions and 8 deletions
|
@ -16,7 +16,7 @@ interface DS4Armor extends DS4ItemBase, DS4ItemPhysical, DS4ItemEquipable, DS4It
|
|||
}
|
||||
|
||||
export interface DS4Talent extends DS4ItemBase {
|
||||
talentRank: DS4TalentRank;
|
||||
rank: DS4TalentRank;
|
||||
}
|
||||
|
||||
interface DS4TalentRank extends ModifiableData<number> {
|
||||
|
|
|
@ -23,7 +23,7 @@ export class DS4Item extends Item<DS4ItemDataType, DS4ActorDataType, DS4Actor> {
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
},
|
||||
"talent": {
|
||||
"templates": ["base"],
|
||||
"talentRank": {
|
||||
"rank": {
|
||||
"base": 0,
|
||||
"max": 0,
|
||||
"mod": 0
|
||||
|
|
|
@ -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"}}
|
||||
<input class="item-num-val item-change" data-dtype="Number" type="number" min="0" step="1"
|
||||
{{#if (eq property 'base') }}max="{{item.data.data.talentRank.max}}"{{/if}}
|
||||
{{#if (eq property 'base') }}max="{{item.data.data.rank.max}}"{{/if}}
|
||||
{{disabled}}
|
||||
data-property="data.talentRank.{{property}}" value="{{lookup item.data.data.talentRank property}}"
|
||||
data-property="data.rank.{{property}}" value="{{lookup item.data.data.rank property}}"
|
||||
title="{{localize localizeString}}" />
|
||||
{{/inline}}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
{{#*inline "talentRankSideProperty" }}
|
||||
<div class="side-property">
|
||||
<label for="data.talentRank.{{property}}">{{localize localizeString}}</label>
|
||||
<label for="data.rank.{{property}}">{{localize localizeString}}</label>
|
||||
<input type="number" min="0" step="1" data-dtype="Number" {{disabled}}
|
||||
{{#if (eq property 'base') }}max="{{data.talentRank.max}}"{{/if}}
|
||||
name="data.talentRank.{{property}}" value="{{lookup data.talentRank property}}" />
|
||||
{{#if (eq property 'base') }}max="{{data.rank.max}}"{{/if}}
|
||||
name="data.rank.{{property}}" value="{{lookup data.rank property}}" />
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue