Merge remote-tracking branch 'origin/master' into 051-fixSpellProperties
This commit is contained in:
commit
5f8848ede8
28 changed files with 965 additions and 484 deletions
|
@ -12,19 +12,21 @@
|
|||
|
||||
<div class="flexrow basic-properties">
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label" for="data.baseInfo.race">{{config.baseInfo.race}}</label>
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.race">{{config.characterBaseInfo.race}}</label>
|
||||
<input type="text" name="data.baseInfo.race" id="data.baseInfo.race" value="{{data.baseInfo.race}}"
|
||||
data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label" for="data.baseInfo.culture">{{config.baseInfo.culture}}</label>
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.culture">{{config.characterBaseInfo.culture}}</label>
|
||||
<input id="data.baseInfo.culture" type="text" name="data.baseInfo.culture"
|
||||
value="{{data.baseInfo.culture}}"
|
||||
data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property flex125">
|
||||
<label class="basic-property-label"
|
||||
for="data.progression.progressPoints.used">{{config.progression.progressPoints}}</label>
|
||||
for="data.progression.progressPoints.used">{{config.characterProgression.progressPoints}}</label>
|
||||
<div class="flexrow">
|
||||
<input id="data.progression.progressPoints.used" type="number"
|
||||
name="data.progression.progressPoints.used"
|
||||
|
@ -41,7 +43,7 @@
|
|||
</div>
|
||||
<div class="basic-property flex125">
|
||||
<label class="basic-property-label"
|
||||
for="data.progression.talentPoints.used">{{config.progression.talentPoints}}</label>
|
||||
for="data.progression.talentPoints.used">{{config.characterProgression.talentPoints}}</label>
|
||||
<div class="flexrow">
|
||||
<input type="number" name="data.progression.talentPoints.used"
|
||||
id="data.progression.talentPoints.used"
|
||||
|
@ -53,13 +55,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label" for="data.baseInfo.class">{{config.baseInfo.class}}</label>
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.class">{{config.characterBaseInfo.class}}</label>
|
||||
<input type="text" id="data.baseInfo.class" name="data.baseInfo.class"
|
||||
value="{{data.baseInfo.class}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.heroClass">{{config.baseInfo.heroClass}}</label>
|
||||
for="data.baseInfo.heroClass">{{config.characterBaseInfo.heroClass}}</label>
|
||||
<input type="text" id="data.baseInfo.heroClass" name="data.baseInfo.heroClass"
|
||||
value="{{data.baseInfo.heroClass}}"
|
||||
data-dtype="String" />
|
||||
|
@ -76,7 +79,7 @@
|
|||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<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">{{localize 'DS4.HeadingTalents'}}</a>
|
||||
<a class="item" data-tab="talents-abilities">{{localize 'DS4.HeadingTalentsAbilities'}}</a>
|
||||
<a class="item" data-tab="profile">{{localize "DS4.HeadingProfile"}}</a>
|
||||
<a class="item" data-tab="biography">{{localize 'DS4.HeadingBiography'}}</a>
|
||||
</nav>
|
||||
|
@ -84,20 +87,21 @@
|
|||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/character-inventory.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
|
||||
{{!-- Talents Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/talents-overview.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/talents-abilities-overview.hbs}}
|
||||
|
||||
{{! Profile Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/profile.hbs}}
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="biography">
|
||||
{{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}}
|
||||
{{editor content=data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
78
src/templates/actor/creature-sheet.hbs
Normal file
78
src/templates/actor/creature-sheet.hbs
Normal file
|
@ -0,0 +1,78 @@
|
|||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100" />
|
||||
<div class="header-fields flexrow">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
|
||||
<div class="flexrow basic-properties">
|
||||
<div class="basic-property">
|
||||
<label>{{config.creatureBaseInfo.creatureType}}</label>
|
||||
<select name="data.baseInfo.creatureType" data-type="String">
|
||||
{{#select data.baseInfo.creatureType}}
|
||||
{{#each config.creatureTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.loot">{{config.creatureBaseInfo.loot}}</label>
|
||||
<input type="text" name="data.baseInfo.loot" value="{{data.baseInfo.loot}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.foeFactor">{{config.creatureBaseInfo.foeFactor}}</label>
|
||||
<input type="text" name="data.baseInfo.foeFactor" value="{{data.baseInfo.foeFactor}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label>{{config.creatureBaseInfo.sizeCategory}}</label>
|
||||
<select name="data.baseInfo.sizeCategory" data-type="String">
|
||||
{{#select data.baseInfo.sizeCategory}}
|
||||
{{#each config.creatureSizeCategories as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label class="basic-property-label"
|
||||
for="data.baseInfo.experiencePoints">{{config.creatureBaseInfo.experiencePoints}}</label>
|
||||
<input type="text" name="data.baseInfo.experiencePoints" value="{{data.baseInfo.experiencePoints}}"
|
||||
data-dtype="Number" />
|
||||
</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="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="item" data-tab="special-creature-abilites">{{localize 'DS4.HeadingSpecialCreatureAbilites'}}</a>
|
||||
<a class="item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
<a class="item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/creature-inventory.hbs}}
|
||||
|
||||
{{!-- Special Creature Abilities Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/special-creature-abilites-overview.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
21
src/templates/actor/partials/character-inventory.hbs
Normal file
21
src/templates/actor/partials/character-inventory.hbs
Normal file
|
@ -0,0 +1,21 @@
|
|||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
|
||||
{{!-- Money--}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.CharacterCurrency'}}</h4>
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<label for="data.currency.gold" class="flex05">{{config.characterCurrency.gold}}</label>
|
||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.gold"
|
||||
id="data.currency.gold" value="{{data.currency.gold}}" data-dtype="Number" />
|
||||
<label for="data.currency.silver" class="flex05">{{config.characterCurrency.silver}}</label>
|
||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.silver"
|
||||
id="data.currency.silver" value="{{data.currency.silver}}" data-dtype="Number" />
|
||||
<label for="data.currency.copper" class="flex05">{{config.characterCurrency.copper}}</label>
|
||||
<input class="flex3 item-num-val item-change" type="number" min="0" step="1" name="data.currency.copper"
|
||||
id="data.currency.copper" value="{{data.currency.copper}}" data-dtype="Number" />
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
|
||||
</div>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="progression flexrow">
|
||||
<div class="progression-entry">
|
||||
<h2 class="progression-label"><label for="data.progression.level">{{config.progression.level}}</label>
|
||||
<h2 class="progression-label"><label for="data.progression.level">{{config.characterProgression.level}}</label>
|
||||
</h2>
|
||||
<label for="data.progression.level" class="hidden">Progression Level</label>
|
||||
<input class="progression-value" type="number" name="data.progression.level" id="data.progression.level" value="{{data.progression.level}}"
|
||||
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="progression-entry">
|
||||
<h2 class="progression-label"><label
|
||||
for="data.progression.experiencePoints">{{config.progression.experiencePoints}}</label>
|
||||
for="data.progression.experiencePoints">{{config.characterProgression.experiencePoints}}</label>
|
||||
</h2>
|
||||
<label for="data.progression.experiencePoints" class="hidden">Experience Points</label>
|
||||
<input class="progression-value" type="number" name="data.progression.experiencePoints" id="data.progression.experiencePoints"
|
||||
|
|
5
src/templates/actor/partials/creature-inventory.hbs
Normal file
5
src/templates/actor/partials/creature-inventory.hbs
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
|
||||
</div>
|
|
@ -1,5 +1,4 @@
|
|||
{{!-- TODO: For items list: only show header, if list is not empty --}}
|
||||
|
||||
{{!-- TODO: Refactor to avoid code duplication with special-creature-abilites-overview and talents-overview --}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
|
@ -15,9 +14,9 @@
|
|||
--}}
|
||||
{{#*inline "ifHasItemOfType"}}
|
||||
{{#if (and (ne itemsArray undefined) (gt itemsArray.length 0))}}
|
||||
{{> @partial-block}}
|
||||
{{> @partial-block}}
|
||||
{{else}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{/if}}
|
||||
{{/inline}}
|
||||
|
||||
|
@ -34,24 +33,24 @@
|
|||
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
||||
--}}
|
||||
{{#*inline "itemListHeader" }}
|
||||
<li class="item flexrow item-header">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne dataType 'equipment')}}
|
||||
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">{{localize 'DS4.ItemEquippedAbbr'}}</div>
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image"></div>
|
||||
{{!-- amount --}}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.Quantity'}}">#</div>
|
||||
{{!-- name --}}
|
||||
<div class="flex3 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block }}
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
</li>
|
||||
<li class="item flexrow item-header">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne dataType 'equipment')}}
|
||||
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">{{localize 'DS4.ItemEquippedAbbr'}}</div>
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image"></div>
|
||||
{{!-- amount --}}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.Quantity'}}">#</div>
|
||||
{{!-- name --}}
|
||||
<div class="flex3 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block }}
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
|
@ -59,145 +58,141 @@
|
|||
!-- It is a flexbox with a child for each item value of interest.
|
||||
!-- An equipped checkbox is rendered if item.data.data.equipped is defined.
|
||||
!-- The partial assumes a variable item to be given in the context.
|
||||
!-- If the partial is called with a partial block, the partial block
|
||||
!-- If the partial is called with a partial block, the partial block
|
||||
!-- content is inserted before the description.
|
||||
|
||||
!-- @param item: hand over the item to the partial as hash parameter
|
||||
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
||||
--}}
|
||||
{{#*inline "itemListEntry"}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne item.data.data.equipped undefined)}}
|
||||
<input class="flex05 item-change" type="checkbox" {{checked item.data.data.equipped}} data-dtype="Boolean"
|
||||
data-property="data.equipped" title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<input class="flex05 item-num-val item-change" type="number" min="0" step="1" value="{{item.data.data.quantity}}" data-dtype="Number"
|
||||
data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
{{!-- name --}}
|
||||
<input class="flex3 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}" />
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block}}
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
||||
{{!-- control buttons --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||
</li>
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne item.data.data.equipped undefined)}}
|
||||
<input class="flex05 item-change" type="checkbox" {{checked item.data.data.equipped}} data-dtype="Boolean"
|
||||
data-property="data.equipped" title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<input class="flex05 item-num-val item-change" type="number" min="0" step="1" value="{{item.data.data.quantity}}"
|
||||
data-dtype="Number" data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
{{!-- name --}}
|
||||
<input class="flex3 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}" />
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block}}
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
||||
{{!-- control buttons --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
|
||||
{{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}}
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.weapon dataType='weapon' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='weapon'}}
|
||||
<div class="flex05 item-image" title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.WeaponBonus'}}">
|
||||
{{localize 'DS4.WeaponBonusAbbr'}}
|
||||
</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.OpponentDefense'}}">
|
||||
{{localize 'DS4.OpponentDefenseAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.weapon as |item id|}}
|
||||
{{#> itemListEntry item=item}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
|
||||
title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" />
|
||||
</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.opponentDefense}}</div>
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{!-- {{else}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='weapon' }} --}}
|
||||
{{/ifHasItemOfType}}
|
||||
|
||||
<div class="tab inventory" data-group="primary" data-tab="inventory">
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
|
||||
{{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}}
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.weapon dataType='weapon' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='weapon'}}
|
||||
<div class="flex05 item-image" title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.WeaponBonus'}}">
|
||||
{{localize 'DS4.WeaponBonusAbbr'}}
|
||||
</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.OpponentDefense'}}">
|
||||
{{localize 'DS4.OpponentDefenseAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.weapon as |item id|}}
|
||||
{{#> itemListEntry item=item}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
|
||||
title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" />
|
||||
</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.opponentDefense}}</div>
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{!-- {{else}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='weapon' }} --}}
|
||||
{{/ifHasItemOfType}}
|
||||
|
||||
{{!-- ARMOR --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmorPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.armor dataType='armor' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='armor'}}
|
||||
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
||||
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.armor as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}">
|
||||
{{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
|
||||
</div>
|
||||
<div title="{{lookup ../../config.armorTypes item.data.data.armorType}}">
|
||||
{{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
|
||||
</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
{{!-- ARMOR --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmorPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.armor dataType='armor' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='armor'}}
|
||||
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
||||
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.armor as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}">
|
||||
{{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
|
||||
</div>
|
||||
<div title="{{lookup ../../config.armorTypes item.data.data.armorType}}">
|
||||
{{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
|
||||
</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
|
||||
|
||||
{{!-- SHIELD --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShieldPlural'}}</h4> {{!-- SPECIFIC --}}
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.shield dataType='shield' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='shield' }}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.shield as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<div class="flex05 item-num-val">{{item.data.data.armorValue}}</div> {{!-- SPECIFIC --}}
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
{{!-- SHIELD --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShieldPlural'}}</h4> {{!-- SPECIFIC --}}
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.shield dataType='shield' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='shield' }}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.shield as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<div class="flex05 item-num-val">{{item.data.data.armorValue}}</div> {{!-- SPECIFIC --}}
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
|
||||
{{!-- TRINKET --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinketPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.trinket dataType='trinket' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='trinket'}}
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.trinket as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
{{!-- TRINKET --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinketPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.trinket dataType='trinket' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='trinket'}}
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.trinket as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
|
||||
{{!-- EQUIPMENT --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='equipment'}}
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.equipment as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
||||
</div>
|
||||
{{!-- EQUIPMENT --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.equipment dataType='equipment' }}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='equipment'}}
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.equipment as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/ifHasItemOfType}}
|
|
@ -1,13 +1,15 @@
|
|||
<div class="tab profile" data-group="primary" data-tab="profile">
|
||||
<div class="grid grid-2col">
|
||||
{{#each data.profile as |profile-data-value profile-data-key|}}
|
||||
{{#if (ne profile-data-key 'biography')}}
|
||||
<div class="profile-entry">
|
||||
<label for="data.profile.{{profile-data-key}}">
|
||||
{{lookup ../config.profile profile-data-key}}
|
||||
{{lookup ../config.characterProfile profile-data-key}}
|
||||
</label>
|
||||
<input type="text" name="data.profile.{{profile-data-key}}" value="{{profile-data-value}}"
|
||||
data-dtype="{{lookup ../config/profileDTypes profile-data-key}}" />
|
||||
data-dtype="{{lookup ../config/characterProfileDTypes profile-data-key}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
{{!-- TODO: Refactor to avoid code duplication with items-overview and talents-overview --}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render a list row for a base item from a given item.
|
||||
!-- Base item means it just has an image, a description, and a name (and effects).
|
||||
!-- It is a flexbox with a child for each item value of interest.
|
||||
!-- The partial assumes a variable item to be given in the context.
|
||||
!--
|
||||
!-- @param item: hand over the item to the partial as hash parameter
|
||||
--}}
|
||||
{{#*inline "baseItemListEntry"}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<input class="flex1 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}">
|
||||
{{!-- description --}}
|
||||
<div class="flex3 item-description">{{{item.data.data.description}}}</div>
|
||||
{{!-- control buttons --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
!-- Render a list header for a base item list entries from a given item.
|
||||
!-- The partial assumes a variable dataType to be given in the context.
|
||||
!--
|
||||
!-- @param dataType: the string item type for the list
|
||||
--}}
|
||||
{{#*inline "baseItemListHeader"}}
|
||||
<li class="item flexrow item-header">
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image"></div>
|
||||
{{!-- name --}}
|
||||
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="tab special-creature-abilites" data-group="primary" data-tab="special-creature-abilites">
|
||||
<ol class="items-list">
|
||||
{{> baseItemListHeader dataType='specialCreatureAbility' }}
|
||||
{{#each itemsByType.specialCreatureAbility as |item id|}}
|
||||
{{> baseItemListEntry item=item}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
|
@ -2,32 +2,39 @@
|
|||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
{{!--
|
||||
!-- Two templates for displaying values with unit.
|
||||
{{!--
|
||||
!-- Base template to display a value with unit.
|
||||
!-- @param unitDatum: the object to display; must have a value and a unit attribute
|
||||
!-- @param localizationString
|
||||
!-- @param config: the config object
|
||||
!-- @param unitNames: mapping of allowed unitDatum.unit values to localized unit name
|
||||
!-- @param unitAbbrs: mapping of allowed unitDatum.unit values to unit abbreviation
|
||||
--}}
|
||||
{{#*inline "unit"}}
|
||||
<div class="unit-data-pair item-num-val"
|
||||
title="{{localize localizationString}} [{{lookup unitNames unitDatum.unit}}]" >
|
||||
{{#if unitDatum.value }}
|
||||
{{unitDatum.value}}{{lookup unitAbbrs unitDatum.unit}}
|
||||
{{else}}-{{/if}}
|
||||
</div>
|
||||
{{/inline}}
|
||||
{{!--
|
||||
!-- Two templates based on the "unit" template for displaying values with unit.
|
||||
!-- Both accept a `config` object holding the unitNames and unitAbbr instead of
|
||||
!-- directly handing over the latter two.
|
||||
--}}
|
||||
{{#*inline "temporalUnit"}}
|
||||
<div class="unit-data-pair item-num-val"
|
||||
title="{{localize localizationString}} [{{lookup config.temporalUnits unitDatum.unit}}]" >
|
||||
{{unitDatum.value}}{{lookup config.temporalUnitsAbbr unitDatum.unit}}
|
||||
</div>
|
||||
{{> unit unitNames=config.temporalUnits unitAbbrs=config.temporalUnitsAbbr unitDatum=unitDatum localizationString=localizationString}}
|
||||
{{/inline}}
|
||||
|
||||
{{#*inline "distanceUnit"}}
|
||||
<div class="unit-data-pair item-num-val"
|
||||
title="{{localize localizationString}} [{{lookup config.distanceUnits unitDatum.unit}}]" >
|
||||
{{unitDatum.value}}{{lookup config.distanceUnitsAbbr unitDatum.unit}}
|
||||
</div>
|
||||
{{> unit unitNames=config.distanceUnits unitAbbrs=config.distanceUnitsAbbr unitDatum=unitDatum localizationString=localizationString}}
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="tab items" data-group="primary" data-tab="spells">
|
||||
<div class="tab spells" data-group="primary" data-tab="spells">
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
{{!-- equipped --}}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{{!-- TODO: Refactor to avoid code duplication with creature-special-abilities-overview and talents-overview --}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
@ -118,7 +120,7 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="tab items" data-group="primary" data-tab="talents">
|
||||
<div class="tab talents-abilities" data-group="primary" data-tab="talents-abilities">
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTalentPlural'}}</h4>
|
||||
{{#> ifHasItemOfType itemsArray=itemsByType.talent dataType='talent' }}
|
||||
<ol class="items-list">
|
Loading…
Add table
Add a link
Reference in a new issue