Move core values and combat values to values tab and BEMify core values
This commit is contained in:
parent
30aed22c03
commit
cf80b18ba6
16 changed files with 129 additions and 203 deletions
|
@ -2,7 +2,7 @@
|
|||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" alt="Actor Icon" title="{{actor.name}}"
|
||||
height="100" width="100" />
|
||||
height="100" width="100" />
|
||||
<div class="header-fields flexrow">
|
||||
<h1 class="charname">
|
||||
<label for="actor.name" class="hidden">Name</label>
|
||||
|
@ -15,68 +15,62 @@
|
|||
<label class="basic-property-label"
|
||||
for="data.baseInfo.race">{{config.i18n.characterBaseInfo.race}}</label>
|
||||
<input type="text" name="data.baseInfo.race" id="data.baseInfo.race" value="{{data.baseInfo.race}}"
|
||||
data-dtype="String" />
|
||||
data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.culture">{{config.i18n.characterBaseInfo.culture}}</label>
|
||||
<input id="data.baseInfo.culture" type="text" name="data.baseInfo.culture"
|
||||
value="{{data.baseInfo.culture}}"
|
||||
data-dtype="String" />
|
||||
value="{{data.baseInfo.culture}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property flex125">
|
||||
<label class="basic-property-label"
|
||||
for="data.progression.progressPoints.used">{{config.i18n.characterProgression.progressPoints}}</label>
|
||||
for="data.progression.progressPoints.used">{{config.i18n.characterProgression.progressPoints}}</label>
|
||||
<div class="flexrow">
|
||||
<input id="data.progression.progressPoints.used" type="number"
|
||||
name="data.progression.progressPoints.used"
|
||||
value="{{data.progression.progressPoints.used}}" data-dtype="Number" />
|
||||
name="data.progression.progressPoints.used" value="{{data.progression.progressPoints.used}}"
|
||||
data-dtype="Number" />
|
||||
<span class="input-divider"> / </span>
|
||||
<label class="hidden" for="data.progression.progressPoints.total">Total
|
||||
Progression Points</label>
|
||||
<input type="number"
|
||||
id="data.progression.progressPoints.total"
|
||||
name="data.progression.progressPoints.total"
|
||||
value="{{data.progression.progressPoints.total}}"
|
||||
data-dtype="Number" />
|
||||
<input type="number" id="data.progression.progressPoints.total"
|
||||
name="data.progression.progressPoints.total"
|
||||
value="{{data.progression.progressPoints.total}}" data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="basic-property flex125">
|
||||
<label class="basic-property-label"
|
||||
for="data.progression.talentPoints.used">{{config.i18n.characterProgression.talentPoints}}</label>
|
||||
for="data.progression.talentPoints.used">{{config.i18n.characterProgression.talentPoints}}</label>
|
||||
<div class="flexrow">
|
||||
<input type="number" name="data.progression.talentPoints.used"
|
||||
id="data.progression.talentPoints.used"
|
||||
value="{{data.progression.talentPoints.used}}" data-dtype="Number" />
|
||||
id="data.progression.talentPoints.used" value="{{data.progression.talentPoints.used}}"
|
||||
data-dtype="Number" />
|
||||
<span class="input-divider"> / </span>
|
||||
<label for="data.progression.talentPoints.total" class="hidden">Total Talent Points</label>
|
||||
<input type="number" name="data.progression.talentPoints.total" id="data.progression.talentPoints.total"
|
||||
value="{{data.progression.talentPoints.total}}" data-dtype="Number" />
|
||||
<input type="number" name="data.progression.talentPoints.total"
|
||||
id="data.progression.talentPoints.total" value="{{data.progression.talentPoints.total}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.class">{{config.i18n.characterBaseInfo.class}}</label>
|
||||
<input type="text" id="data.baseInfo.class" name="data.baseInfo.class"
|
||||
value="{{data.baseInfo.class}}" data-dtype="String" />
|
||||
value="{{data.baseInfo.class}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.heroClass">{{config.i18n.characterBaseInfo.heroClass}}</label>
|
||||
for="data.baseInfo.heroClass">{{config.i18n.characterBaseInfo.heroClass}}</label>
|
||||
<input type="text" id="data.baseInfo.heroClass" name="data.baseInfo.heroClass"
|
||||
value="{{data.baseInfo.heroClass}}"
|
||||
data-dtype="String" />
|
||||
value="{{data.baseInfo.heroClass}}" data-dtype="String" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="character-values">
|
||||
{{> systems/ds4/templates/actor/partials/attributes-traits.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/combat-values.hbs}}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="values">{{localize 'DS4.HeadingValues'}}</a>
|
||||
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
<a class="item" data-tab="talents-abilities">{{localize 'DS4.HeadingTalentsAbilities'}}</a>
|
||||
|
@ -88,7 +82,10 @@
|
|||
<!-- prettier-ignore-start -->
|
||||
{{!-- Sheet Body (remove indentation to avoid annoying Handlebars auto-indent) --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{!-- Values Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/values-tab.hbs}}
|
||||
|
||||
{{!-- Inventory Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/character-inventory.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
|
|
|
@ -49,14 +49,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="character-values">
|
||||
{{> systems/ds4/templates/actor/partials/attributes-traits.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/combat-values.hbs}}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="values">{{localize 'DS4.HeadingValues'}}</a>
|
||||
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="item" data-tab="special-creature-abilities">{{localize 'DS4.HeadingSpecialCreatureAbilities'}}</a>
|
||||
<a class="item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
|
@ -65,7 +62,10 @@
|
|||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{!-- Values Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/values-tab.hbs}}
|
||||
|
||||
{{!-- Inventory Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/creature-inventory.hbs}}
|
||||
|
||||
{{!-- Special Creature Abilities Tab --}}
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render an attribute.
|
||||
!--
|
||||
!-- @param attribute-label: The label to display for the attribute
|
||||
!-- @param attribute-key: The key of the attribute
|
||||
!-- @param attribute-data: The data for the attribute
|
||||
--}}
|
||||
|
||||
{{#*inline "attribute"}}
|
||||
<div class="attribute flexrow"><label for="data.attributes.body.total"
|
||||
class="attribute-label ">{{attribute-label}}</label>
|
||||
<div class="attribute-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.attributes.{{attribute-key}}.base" value='{{attribute-data.base}}' data-dtype="Number"
|
||||
title="{{attribute-label}} {{localize 'DS4.TooltipBaseValue'}}" /><span> +
|
||||
</span><input type="number" name="data.attributes.{{attribute-key}}.mod" value='{{attribute-data.mod}}'
|
||||
data-dtype="Number" title="{{attribute-label}} {{localize 'DS4.TooltipModifier'}}" /><span
|
||||
class="attribute-value-arrow">➞</span><span class="attribute-value-total"
|
||||
title="{{attribute-label}}: {{attribute-data.tooltip}}">{{attribute-data.total}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
!-- Render a trait.
|
||||
!--
|
||||
!-- @param trait-label: The label to display for the trait
|
||||
!-- @param trait-key: The key of the trait
|
||||
!-- @param trait-data: The data for the trait
|
||||
--}}
|
||||
|
||||
{{#*inline "trait"}}
|
||||
<div class="trait flexrow"><label for="data.traits.strength.total" class="trait-label">{{trait-label}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number" name="data.traits.{{trait-key}}.base"
|
||||
value='{{trait-data.base}}' data-dtype="Number"
|
||||
title="{{trait-label}} {{localize 'DS4.TooltipBaseValue'}}" /><span> +
|
||||
</span><input type="number" name="data.traits.{{trait-key}}.mod" value='{{trait-data.mod}}' data-dtype="Number"
|
||||
title="{{trait-label}} {{localize 'DS4.TooltipModifier'}}" /><span class=" trait-value-arrow">➞</span><span
|
||||
class="trait-value-total" title="{{trait-label}}: {{trait-data.tooltip}}">{{trait-data.total}}</span></div>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
<div class="attributes-traits grid grid-3col">
|
||||
{{#each config.i18n.attributes as |attribute-label attribute-key|}}
|
||||
{{> attribute attribute-label=attribute-label attribute-key=attribute-key attribute-data=(lookup ../data.attributes
|
||||
attribute-key)}}
|
||||
{{/each}}
|
||||
{{#each config.i18n.traits as |trait-label trait-key|}}
|
||||
{{> trait trait-label=trait-label trait-key=trait-key trait-data=(lookup ../data.traits trait-key)}}
|
||||
{{/each}}
|
||||
</div>
|
27
src/templates/actor/partials/core-value.hbs
Normal file
27
src/templates/actor/partials/core-value.hbs
Normal file
|
@ -0,0 +1,27 @@
|
|||
{{!--
|
||||
!-- Render a core value.
|
||||
!--
|
||||
!-- @param core-value-label: The label to display for the core value
|
||||
!-- @param core-value-key: The key of the core value
|
||||
!-- @param core-value-data: The data for the core value
|
||||
!-- @param core-value-variant: The variant of the core value, i.e. attribute or trait
|
||||
--}}
|
||||
|
||||
<div class="ds4-core-value ds4-core-value--{{core-value-variant}}">
|
||||
<label for="data.{{core-value-variant}}s.{{core-value-key}}.base"
|
||||
class="ds4-core-value__label">{{core-value-label}}</label>
|
||||
<div class="ds4-core-value__value">
|
||||
<input class="ds4-core-value__value-input" type="number"
|
||||
name="data.{{core-value-variant}}s.{{core-value-key}}.base"
|
||||
id="data.{{core-value-variant}}s.{{core-value-key}}.base" value='{{core-value-data.base}}'
|
||||
data-dtype="Number" title="{{core-value-label}} {{localize 'DS4.TooltipBaseValue'}}" />
|
||||
<span>+</span>
|
||||
<input class="ds4-core-value__value-input" type="number"
|
||||
name="data.{{core-value-variant}}s.{{core-value-key}}.mod"
|
||||
id="data.{{core-value-variant}}s.{{core-value-key}}.mod" value='{{core-value-data.mod}}' data-dtype="Number"
|
||||
title="{{core-value-label}} {{localize 'DS4.TooltipModifier'}}" />
|
||||
<span class="ds4-core-value__value-arrow">➞</span>
|
||||
<span class="ds4-core-value__value-total"
|
||||
title="{{core-value-label}}: {{core-value-data.tooltip}}">{{core-value-data.total}}</span>
|
||||
</div>
|
||||
</div>
|
11
src/templates/actor/partials/core-values.hbs
Normal file
11
src/templates/actor/partials/core-values.hbs
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="ds4-core-values">
|
||||
{{#each config.i18n.attributes as |attribute-label attribute-key|}}
|
||||
{{> systems/ds4/templates/actor/partials/core-value.hbs core-value-label=attribute-label
|
||||
core-value-key=attribute-key core-value-data=(lookup ../data.attributes
|
||||
attribute-key) core-value-variant="attribute"}}
|
||||
{{/each}}
|
||||
{{#each config.i18n.traits as |trait-label trait-key|}}
|
||||
{{> systems/ds4/templates/actor/partials/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"}}
|
||||
{{/each}}
|
||||
</div>
|
4
src/templates/actor/partials/values-tab.hbs
Normal file
4
src/templates/actor/partials/values-tab.hbs
Normal file
|
@ -0,0 +1,4 @@
|
|||
<div class="tab values" data-group="primary" data-tab="values">
|
||||
{{> systems/ds4/templates/actor/partials/core-values.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/combat-values.hbs}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue