Merge master
This commit is contained in:
commit
7ada67b7c3
32 changed files with 662 additions and 158 deletions
|
@ -58,26 +58,30 @@
|
|||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</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">{{localize 'DS4.HeadingTalents'}}</a>
|
||||
<a class="item" data-tab="profile">{{localize "DS4.HeadingProfile"}}</a>
|
||||
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="item" data-tab="biography">{{localize 'DS4.HeadingBiography'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="description">
|
||||
{{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
|
||||
{{! Profile Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/profile.hbs}}
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
|
||||
{{!-- Talents Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/talents-overview.hbs}}
|
||||
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items-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}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
|
@ -37,7 +37,7 @@
|
|||
<li class="item flexrow item-header">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne dataType 'equipment')}}
|
||||
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">E</div>
|
||||
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">{{localize 'DS4.ItemEquippedAbbr'}}</div>
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image"></div>
|
||||
|
@ -48,7 +48,7 @@
|
|||
{{!-- item type specifics --}}
|
||||
{{> @partial-block }}
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.HeadingDescription'}}</div>
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
</li>
|
||||
|
@ -78,10 +78,10 @@
|
|||
</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'}}">
|
||||
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'}}">
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}" />
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block}}
|
||||
{{!-- description --}}
|
||||
|
|
86
src/templates/actor/partials/spells-overview.hbs
Normal file
86
src/templates/actor/partials/spells-overview.hbs
Normal file
|
@ -0,0 +1,86 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
{{!--
|
||||
!-- Two templates for displaying values with unit.
|
||||
!-- @param unitDatum: the object to display; must have a value and a unit attribute
|
||||
!-- @param localizationString
|
||||
!-- @param config: the config object
|
||||
--}}
|
||||
{{#*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>
|
||||
{{/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>
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="tab items" data-group="primary" data-tab="spells">
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
{{!-- equipped --}}
|
||||
<div class="flex05 item-image" title="{{localize 'DS4.ItemEquipped'}}">{{localize 'DS4.ItemEquippedAbbr'}}</div>
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image"></div>
|
||||
{{!-- name --}}
|
||||
<div class="flex2 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- spell type --}}
|
||||
<div class="item-image" title="{{localize 'DS4.SpellType'}}">{{localize 'DS4.SpellTypeAbbr'}}</div>
|
||||
{{!-- spell bonus --}}
|
||||
<div class="item-num-val" title="{{localize 'DS4.SpellBonus'}}">{{localize 'DS4.SpellBonusAbbr'}}</div>
|
||||
{{!-- max. distance --}}
|
||||
<div class="item-num-val" title="{{localize 'DS4.SpellMaxDistance'}}"><i class="fas fa-ruler"></i></div>
|
||||
{{!-- duration --}}
|
||||
<div class="item-num-val" title="{{localize 'DS4.SpellDuration'}}"><i class="far fa-clock"></i></div>
|
||||
{{!-- cooldown duration --}}
|
||||
<div class="item-num-val" title="{{localize 'DS4.SpellCooldownDuration'}}"><i class="fas fa-hourglass-half"></i></div>
|
||||
{{!-- description --}}
|
||||
{{!-- <div class="flex3">{{localize 'DS4.Description'}}</div> --}}
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='spell' }}
|
||||
</li>
|
||||
{{#each itemsByType.spell as |item id|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<input class="flex05 item-image item-change" type="checkbox" {{checked item.data.data.equipped}} data-dtype="Boolean"
|
||||
data-property="data.equipped" title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<input class="flex2 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}" />
|
||||
{{!-- spell type --}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{lookup ../config.spellTypesIcons item.data.data.spellType}}"
|
||||
title="{{lookup ../config.spellTypes item.data.data.spellType}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- spell bonus --}}
|
||||
<input class="item-num-val item-change" type="text" data-dtype="String"
|
||||
data-property="data.bonus" value="{{item.data.data.bonus}}" title="{{localize 'DS4.SpellBonus'}}" />
|
||||
{{!-- max. distance --}}
|
||||
{{> distanceUnit localizationString='DS4.SpellMaxDistance' unitDatum=item.data.data.maxDistance config=../config}}
|
||||
{{!-- duration --}}
|
||||
{{> temporalUnit localizationString='DS4.SpellDuration' unitDatum=item.data.data.duration config=../config}}
|
||||
{{!-- cooldown duration --}}
|
||||
{{> temporalUnit localizationString='DS4.SpellCooldownDuration' unitDatum=item.data.data.cooldownDuration config=../config}}
|
||||
{{!-- description --}}
|
||||
{{!-- <div class="flex3 item-description">{{{item.data.data.description}}}</div> --}}
|
||||
{{!-- control buttons --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
|
@ -1,8 +1,6 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- TODO: remove duplicate add and delete button definition --}}
|
||||
|
||||
|
||||
|
||||
{{!--
|
||||
|
@ -110,7 +108,7 @@
|
|||
{{!-- name --}}
|
||||
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex3">{{localize 'DS4.HeadingDescription'}}</div>
|
||||
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
</li>
|
||||
|
@ -132,7 +130,7 @@
|
|||
{{!-- rank info --}}
|
||||
<div class="flex3">{{localize 'DS4.TalentRank'}}</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.HeadingDescription'}}</div>
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='talent' }}
|
||||
</li>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
|
||||
</form>
|
|
@ -12,7 +12,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label>{{localize "DS4.ArmorMaterialType"}}</label>
|
||||
<label for="data.armorMaterialType">{{localize "DS4.ArmorMaterialType"}}</label>
|
||||
<select name="data.armorMaterialType" data-type="String">
|
||||
{{#select data.armorMaterialType}}
|
||||
{{#each config.armorMaterialTypes as |value key|}}
|
||||
|
@ -30,5 +30,5 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
|
@ -3,5 +3,5 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
|
@ -3,6 +3,6 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
|
||||
</form>
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.HeadingDescription"}}</a>
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.HeadingEffects"}}</a>
|
||||
{{#if isPhysical}}
|
||||
<a class="item" data-tab="details">{{localize "DS4.HeadingDetails"}}</a>
|
||||
|
@ -13,7 +13,9 @@
|
|||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/description.hbs}}
|
||||
{{> @partial-block}}
|
||||
{{/systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
{{!--
|
||||
Render a description tab.
|
||||
Additional elements of the side-properties div can be handed over via the @partial-block.
|
||||
--}}
|
||||
|
||||
<div class="tab flexrow" data-group="primary" data-tab="description">
|
||||
<div class="side-properties">
|
||||
{{#if isOwned}}
|
||||
|
@ -24,8 +29,9 @@
|
|||
{{else}}
|
||||
<span>{{localize "DS4.NotOwned"}}</span>
|
||||
{{/if}}
|
||||
{{> @partial-block}}
|
||||
</div>
|
||||
<div class="description" title="{{localize 'DS4.HeadingDescription'}}">
|
||||
<div class="description" title="{{localize 'DS4.Description'}}">
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
|
@ -3,18 +3,19 @@
|
|||
{{!-- As you add new fields, add them in here! --}}
|
||||
<div class="side-properties">
|
||||
<div class="side-property">
|
||||
<label for="data.price">{{localize "DS4.PriceGold"}}</label>
|
||||
<input type="number" min="0" data-dtype="Number" name="data.price" value="{{data.price}}" />
|
||||
</div>
|
||||
<div class="side-property">
|
||||
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>
|
||||
<select name="data.availability" data-type="String">
|
||||
{{#select data.availability}}
|
||||
{{#each config.itemAvailabilities as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<label for="data.price">{{localize "DS4.PriceGold"}}</label>
|
||||
<input type="number" min="0" max="99999" step="0.01" data-dtype="Number"
|
||||
name="data.price" value="{{data.price}}" />
|
||||
</div>
|
||||
<div class="side-property">
|
||||
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>
|
||||
<select name="data.availability" data-type="String">
|
||||
{{#select data.availability}}
|
||||
{{#each config.itemAvailabilities as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -3,6 +3,6 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
|
||||
</form>
|
||||
|
|
|
@ -10,5 +10,5 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
72
src/templates/item/spell-sheet.hbs
Normal file
72
src/templates/item/spell-sheet.hbs
Normal file
|
@ -0,0 +1,72 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
{{#*inline "unitDatum" }}
|
||||
<div class="side-property">
|
||||
<label>{{localize localizeString}}</label>
|
||||
<div class="unit-data-pair">
|
||||
<input class="item-num-val" type="text" data-dtype="String"
|
||||
name="data.{{property}}.value" value="{{lookup (lookup data property) 'value'}}" />
|
||||
<select name="data.{{property}}.unit" data-type="String">
|
||||
{{#select (lookup (lookup data property) 'unit')}}
|
||||
{{#if (eq unitType 'temporal')}}
|
||||
{{#each (lookup config 'temporalUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>{{/each}}
|
||||
{{else}}
|
||||
{{#each (lookup config 'distanceUnitsAbbr') as |value key|}}<option value="{{key}}">{{value}}</option>{{/each}}
|
||||
{{/if}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{#> systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
<div class="grid grid-4col basic-properties">
|
||||
<div class="basic-property">
|
||||
<label for="data.spellType">{{localize "DS4.SpellType"}}</label>
|
||||
<select name="data.spellType" data-type="String">
|
||||
{{#select data.spellType}}
|
||||
{{#each config.spellTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="basic-property">
|
||||
<label for="data.bonus">{{localize "DS4.SpellBonus"}}</label>
|
||||
<input type="text" name="data.bonus" value="{{data.bonus}}" data-dtype="String" />
|
||||
</div>
|
||||
</div>
|
||||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}
|
||||
<div class="side-property">
|
||||
<label for="data.spellCategory">{{localize "DS4.SpellCategory"}}</label>
|
||||
<select name="data.spellCategory" data-type="String">
|
||||
{{#select data.spellCategory}}
|
||||
{{#each config.spellCategories as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
{{> unitDatum data=data property='maxDistance' localizeString='DS4.SpellMaxDistance' unitType='distance' }}
|
||||
{{> unitDatum data=data property='effectRadius' localizeString='DS4.SpellEffectRadius' unitType='distance' }}
|
||||
{{> unitDatum data=data property='duration' localizeString='DS4.SpellDuration' unitType='temporal' }}
|
||||
{{> unitDatum data=data property='cooldownDuration' localizeString='DS4.SpellCooldownDuration' unitType='temporal' }}
|
||||
<div class="side-property">
|
||||
<label for="data.scrollPrice">{{localize "DS4.SpellScrollPriceGold"}}</label>
|
||||
<input type="number" min="0" max="9999" step="0.01" data-dtype="Number"
|
||||
name="data.scrollPrice" value="{{data.scrollPrice}}" />
|
||||
</div>
|
||||
{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
|
||||
</form>
|
|
@ -27,6 +27,6 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
|
||||
</form>
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
|
@ -25,5 +25,5 @@
|
|||
{{/systems/ds4/templates/item/partials/sheet-header.hbs}}
|
||||
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
{{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue