refactor: resturcture files so that lincensing info can be bundled properly
This commit is contained in:
parent
699ba74840
commit
1aa284311f
484 changed files with 119 additions and 179 deletions
48
templates/dialogs/roll-options.hbs
Normal file
48
templates/dialogs/roll-options.hbs
Normal file
|
@ -0,0 +1,48 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render a roll options dialog. It uses the default form classes of Foundry VTT.
|
||||
!-- @param checkTargetNumber: The preselected check target number.
|
||||
!-- @param maximumCoupResult: The preselected maximum coup result.
|
||||
!-- @param minimumFumbleResult: The preselected minimum fumble result.
|
||||
!-- @param rollMode: The preselected roll mode (= chat roll-mode).
|
||||
!-- @param rollModes: A map of all roll modes and their i18n keys.
|
||||
--}}
|
||||
<form class="ds4-roll-options">
|
||||
<div class="form-group">
|
||||
<label for="check-target-number">{{localize "DS4.DialogRollOptionsCheckTargetNumberLabel"}}</label>
|
||||
<input id="check-target-number" data-dtype="Number" type="number" name="check-target-number"
|
||||
value="{{checkTargetNumber}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="gm-modifier">{{localize "DS4.DialogRollOptionsGMModifierLabel"}}</label>
|
||||
<input id="gm-modifier" data-dtype="Number" type="number" name="gm-modifier" value="0" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="maximum-coup-result">{{localize "DS4.DialogRollOptionsMaximumCoupResultLabel"}}</label>
|
||||
<input id="maximum-coup-result" data-dtype="Number" type="number" name="maximum-coup-result"
|
||||
value="{{maximumCoupResult}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="minimum-fumble-result">{{localize "DS4.DialogRollOptionsMinimumFumbleResultLabel"}}</label>
|
||||
<input id="minimum-fumble-result" data-dtype="Number" type="number" name="minimum-fumble-result"
|
||||
value="{{minimumFumbleResult}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="roll-mode">{{localize "DS4.DialogRollOptionsRollModeLabel"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="roll-mode" name="roll-mode" data-dtype="String">
|
||||
{{#select rollMode}}
|
||||
{{#each rollModes as |rollModeValue rollModeKey|}}
|
||||
<option value="{{rollModeKey}}">{{localize rollModeValue}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
28
templates/dialogs/simple-select-form.hbs
Normal file
28
templates/dialogs/simple-select-form.hbs
Normal file
|
@ -0,0 +1,28 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render a simple form with select elements. It uses the default form classes of Foundry VTT.
|
||||
!-- @param selects: An array of objects that each contain the following:
|
||||
!---- identifier: The identifier to use as id for the select element. Can be used to query the value later on.
|
||||
!---- label: Text to display as the label for the select element.
|
||||
!---- options: Key-value pairs that describe the options. The keys are used for the value attribute of the
|
||||
options, the values are used as content.
|
||||
--}}
|
||||
<form class="ds4-simple-form">
|
||||
{{#each selects}}
|
||||
<div class="form-group">
|
||||
<label for="{{identifier}}">{{label}}</label>
|
||||
<div class="form-fields">
|
||||
<select name="{{identifier}}" id="{{identifier}}">
|
||||
{{#each options as | value key |}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</form>
|
17
templates/dice/roll.hbs
Normal file
17
templates/dice/roll.hbs
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="dice-roll">
|
||||
{{#if flavor}}
|
||||
<div class="dice-flavor">{{flavor}}</div>
|
||||
{{/if}}
|
||||
<div class="dice-result">
|
||||
<div class="dice-formula">{{formula}}</div>
|
||||
{{{tooltip}}}
|
||||
<h4 class="dice-total{{#if isFumble}} ds4-dice-total--fumble{{/if}}{{#if isCoup}} ds4-dice-total--coup{{/if}}">{{total}}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
50
templates/sheets/actor/character-sheet.hbs
Normal file
50
templates/sheets/actor/character-sheet.hbs
Normal file
|
@ -0,0 +1,50 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/actor-header.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/character-properties.hbs}}
|
||||
{{/systems/ds4/templates/sheets/actor/components/actor-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="values">{{localize 'DS4.HeadingValues'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="abilities">{{localize 'DS4.HeadingAbilities'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="biography">{{localize 'DS4.HeadingBiography'}}</a>
|
||||
</nav>
|
||||
|
||||
<!-- beautify ignore:start -->
|
||||
<!-- prettier-ignore-start -->
|
||||
{{!-- Sheet Body (remove indentation to avoid annoying Handlebars auto-indent) --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Values Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/values.hbs}}
|
||||
|
||||
{{!-- Inventory Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/character-inventory.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/spells.hbs}}
|
||||
|
||||
{{!-- Abilities Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/character-abilities.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/effects.hbs}}
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/biography.hbs}}
|
||||
|
||||
</section>
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- beautify ignore:end -->
|
||||
</form>
|
29
templates/sheets/actor/components/actor-header.hbs
Normal file
29
templates/sheets/actor/components/actor-header.hbs
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an actor sheet header.
|
||||
!-- @param @partial-block: Properties to render in the second header row.
|
||||
--}}
|
||||
<header class="ds4-actor-header">
|
||||
<img class="ds4-actor-header__img" src="{{data.img}}" data-edit="img" alt="{{localize 'DS4.ActorImageAltText'}}"
|
||||
title="{{data.name}}" height="100" width="100" />
|
||||
<div class="ds4-actor-header__data">
|
||||
<div class="ds4-actor-header__data-row">
|
||||
<h1 class="ds4-actor-header__name">
|
||||
<label for="name-{{data._id}}" class="ds4-hidden">{{localize 'DS4.ActorName'}}</label>
|
||||
<input class="ds4-actor-header__name-input" name="name" type="text" id="name-{{data._id}}"
|
||||
value="{{data.name}}" placeholder="{{localize 'DS4.ActorName'}}" />
|
||||
</h1>
|
||||
{{> systems/ds4/templates/sheets/actor/components/actor-progression.hbs}}
|
||||
</div>
|
||||
<div class="ds4-actor-header__data-row">
|
||||
{{> @partial-block}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
48
templates/sheets/actor/components/actor-progression.hbs
Normal file
48
templates/sheets/actor/components/actor-progression.hbs
Normal file
|
@ -0,0 +1,48 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-actor-progression">
|
||||
<div class="ds4-actor-progression__entry">
|
||||
<h2 class="ds4-actor-progression__label"><label for="data.combatValues.hitPoints.value-{{data._id}}"
|
||||
title="{{localize 'DS4.CombatValuesHitPointsCurrent'}}">{{localize
|
||||
"DS4.CombatValuesHitPointsCurrentAbbr"}}</label>
|
||||
</h2>
|
||||
<input class="ds4-actor-progression__input" type="number" name="data.combatValues.hitPoints.value"
|
||||
id="data.combatValues.hitPoints.value-{{data._id}}" value="{{data.data.combatValues.hitPoints.value}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
{{#if (eq data.type "character")}}
|
||||
{{#if settings.showSlayerPoints}}
|
||||
<div class="ds4-actor-progression__entry">
|
||||
<h2 class="ds4-actor-progression__label"><label for="data.slayersPoints.value-{{data._id}}"
|
||||
title="{{localize 'DS4.CharacterSlayerPoints'}}">{{localize "DS4.CharacterSlayerPointsAbbr"}}</label>
|
||||
</h2>
|
||||
<input class="ds4-actor-progression__input ds4-actor-progression__input--slayer-points" type="number"
|
||||
max="{{data.data.slayerPoints.max}}" min="0" step="1" name="data.slayerPoints.value"
|
||||
id="data.slayersPoints.value-{{data._id}}" value="{{data.data.slayerPoints.value}}" data-dtype="Number" />
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="ds4-actor-progression__entry">
|
||||
<h2 class="ds4-actor-progression__label"><label for="data.progression.level-{{data._id}}"
|
||||
title="{{localize 'DS4.CharacterProgressionLevel'}}">{{localize
|
||||
"DS4.CharacterProgressionLevelAbbr"}}</label>
|
||||
</h2>
|
||||
<input class="ds4-actor-progression__input" type="number" min="0" name="data.progression.level"
|
||||
id="data.progression.level-{{data._id}}" value="{{data.data.progression.level}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="ds4-actor-progression__entry">
|
||||
<h2 class="ds4-actor-progression__label"><label for="data.progression.experiencePoints-{{data._id}}"
|
||||
title="{{localize 'DS4.CharacterProgressionExperiencePoints'}}">{{localize
|
||||
"DS4.CharacterProgressionExperiencePointsAbbr"}}</label>
|
||||
</h2>
|
||||
<input class="ds4-actor-progression__input" type="number" min="0" name="data.progression.experiencePoints"
|
||||
id="data.progression.experiencePoints-{{data._id}}" value="{{data.data.progression.experiencePoints}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
10
templates/sheets/actor/components/biography.hbs
Normal file
10
templates/sheets/actor/components/biography.hbs
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-biography">
|
||||
{{editor content=data.data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
63
templates/sheets/actor/components/character-properties.hbs
Normal file
63
templates/sheets/actor/components/character-properties.hbs
Normal file
|
@ -0,0 +1,63 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-actor-properties">
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.race-{{data._id}}">{{config.i18n.characterBaseInfo.race}}</label>
|
||||
<input type="text" name="data.baseInfo.race" id="data.baseInfo.race-{{data._id}}"
|
||||
value="{{data.data.baseInfo.race}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.culture-{{data._id}}">{{config.i18n.characterBaseInfo.culture}}</label>
|
||||
<input id="data.baseInfo.culture-{{data._id}}" type="text" name="data.baseInfo.culture"
|
||||
value="{{data.data.baseInfo.culture}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.progression.progressPoints.used-{{data._id}}">{{config.i18n.characterProgression.progressPoints}}</label>
|
||||
<div class="ds4-actor-properties__property-multi-input">
|
||||
<input id="data.progression.progressPoints.used-{{data._id}}" type="number"
|
||||
name="data.progression.progressPoints.used" value="{{data.data.progression.progressPoints.used}}"
|
||||
data-dtype="Number" />
|
||||
<span class="input-divider"> / </span>
|
||||
<label class="ds4-hidden" for="data.progression.progressPoints.total-{{data._id}}">Total
|
||||
Progression Points</label>
|
||||
<input type="number" id="data.progression.progressPoints.total-{{data._id}}"
|
||||
name="data.progression.progressPoints.total" value="{{data.data.progression.progressPoints.total}}"
|
||||
data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.progression.talentPoints.used-{{data._id}}">{{config.i18n.characterProgression.talentPoints}}</label>
|
||||
<div class="ds4-actor-properties__property-multi-input">
|
||||
<input type="number" name="data.progression.talentPoints.used"
|
||||
id="data.progression.talentPoints.used-{{data._id}}" value="{{data.data.progression.talentPoints.used}}"
|
||||
data-dtype="Number" />
|
||||
<span class="input-divider"> / </span>
|
||||
<label for="data.progression.talentPoints.total-{{data._id}}" class="ds4-hidden">Total Talent Points</label>
|
||||
<input type="number" name="data.progression.talentPoints.total"
|
||||
id="data.progression.talentPoints.total-{{data._id}}"
|
||||
value="{{data.data.progression.talentPoints.total}}" data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.class-{{data._id}}">{{config.i18n.characterBaseInfo.class}}</label>
|
||||
<input type="text" id="data.baseInfo.class-{{data._id}}" name="data.baseInfo.class"
|
||||
value="{{data.data.baseInfo.class}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.heroClass-{{data._id}}">{{config.i18n.characterBaseInfo.heroClass}}</label>
|
||||
<input type="text" id="data.baseInfo.heroClass-{{data._id}}" name="data.baseInfo.heroClass"
|
||||
value="{{data.data.baseInfo.heroClass}}" data-dtype="String" />
|
||||
</div>
|
||||
</div>
|
18
templates/sheets/actor/components/check.hbs
Normal file
18
templates/sheets/actor/components/check.hbs
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render a check.
|
||||
!--
|
||||
!-- @param check-key: The key of the combat value
|
||||
!-- @param check-target-number: The check target number
|
||||
!-- @param check-label: The label for the check
|
||||
--}}
|
||||
|
||||
<div class="ds4-check rollable-check" data-check="{{check-key}}" title="{{localize 'DS4.CheckTooltip' check=check-label}}">
|
||||
<span>{{check-label}}</span>
|
||||
<span>{{check-target-number}}</span>
|
||||
</div>
|
12
templates/sheets/actor/components/checks.hbs
Normal file
12
templates/sheets/actor/components/checks.hbs
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-checks">
|
||||
{{#each config.i18n.checks as |check-label check-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/check.hbs check-key=check-key check-target-number=(lookup
|
||||
../data.data.checks check-key) check-label=check-label}}
|
||||
{{/each}}
|
||||
</div>
|
32
templates/sheets/actor/components/combat-value.hbs
Normal file
32
templates/sheets/actor/components/combat-value.hbs
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render a combat value.
|
||||
!--
|
||||
!-- @param combat-value-key: The key of the combat value
|
||||
!-- @param combat-value-data: The data for the combat value
|
||||
!-- @param combat-value-title: The title for the combat value
|
||||
!-- @param combat-value-label: The label for the combat value (possibly an abbreviation)
|
||||
!-- @param actor-id: The id of the actor the core value belongs to
|
||||
--}}
|
||||
|
||||
<div class="ds4-combat-value">
|
||||
<div class="ds4-combat-value__value ds4-combat-value__value--{{combat-value-key}}"
|
||||
title="{{combat-value-title}}: {{combat-value-data.tooltip}}">
|
||||
{{combat-value-data.total}}
|
||||
</div>
|
||||
<span title="{{combat-value-title}}" class="ds4-combat-value__label">{{combat-value-label}}</span>
|
||||
<div class="ds4-combat-value__formula">
|
||||
<span class="ds4-combat-value__formula-base"
|
||||
title="{{combat-value-title}} {{localize 'DS4.TooltipBaseValue'}}">{{combat-value-data.base}}</span>
|
||||
<span>+</span>
|
||||
<input class="ds4-combat-value__formula-modifier" type="number"
|
||||
id="data.combatValues.{{combat-value-key}}.mod-{{actor-id}}"
|
||||
name="data.combatValues.{{combat-value-key}}.mod" value='{{combat-value-data.mod}}' data-dtype="Number"
|
||||
title="{{combat-value-title}} {{localize 'DS4.TooltipModifier'}}" />
|
||||
</div>
|
||||
</div>
|
15
templates/sheets/actor/components/combat-values.hbs
Normal file
15
templates/sheets/actor/components/combat-values.hbs
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-combat-values">
|
||||
{{#each config.i18n.combatValues as |combat-value-title combat-value-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/combat-value.hbs combat-value-key=combat-value-key
|
||||
combat-value-data=(lookup ../data.data.combatValues combat-value-key) combat-value-label=(lookup
|
||||
../config.i18n.combatValuesSheet combat-value-key) combat-value-title=combat-value-title
|
||||
actor-id=../data._id}}
|
||||
{{/each}}
|
||||
</div>
|
34
templates/sheets/actor/components/core-value.hbs
Normal file
34
templates/sheets/actor/components/core-value.hbs
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- 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
|
||||
!-- @param actor-id: The id of the actor the core value belongs to
|
||||
--}}
|
||||
|
||||
<div class="ds4-core-value ds4-core-value--{{core-value-variant}}">
|
||||
<label for="data.{{core-value-variant}}s.{{core-value-key}}.base-{{actor-id}}"
|
||||
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-{{actor-id}}" 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-{{actor-id}}" 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>
|
19
templates/sheets/actor/components/core-values.hbs
Normal file
19
templates/sheets/actor/components/core-values.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-core-values">
|
||||
{{#each config.i18n.attributes as |attribute-label attribute-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=attribute-label
|
||||
core-value-key=attribute-key core-value-data=(lookup ../data.data.attributes
|
||||
attribute-key) core-value-variant="attribute" actor-id=../data._id}}
|
||||
{{/each}}
|
||||
{{#each config.i18n.traits as |trait-label trait-key|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=trait-label
|
||||
core-value-key=trait-key
|
||||
core-value-data=(lookup ../data.data.traits trait-key) core-value-variant="trait" actor-id=../data._id}}
|
||||
{{/each}}
|
||||
</div>
|
52
templates/sheets/actor/components/creature-properties.hbs
Normal file
52
templates/sheets/actor/components/creature-properties.hbs
Normal file
|
@ -0,0 +1,52 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-actor-properties">
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.creatureType-{{data._id}}">{{config.i18n.creatureBaseInfo.creatureType}}</label>
|
||||
<select class="ds4-actor-properties__property-select" id="data.baseInfo.creatureType-{{data._id}}"
|
||||
name="data.baseInfo.creatureType" data-dtype="String">
|
||||
{{#select data.data.baseInfo.creatureType}}
|
||||
{{#each config.i18n.creatureTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.loot-{{data._id}}">{{config.i18n.creatureBaseInfo.loot}}</label>
|
||||
<input type="text" id="data.baseInfo.loot-{{data._id}}" name="data.baseInfo.loot"
|
||||
value="{{data.data.baseInfo.loot}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.foeFactor-{{data._id}}">{{config.i18n.creatureBaseInfo.foeFactor}}</label>
|
||||
<input type="text" id="data.baseInfo.foeFactor-{{data._id}}" name="data.baseInfo.foeFactor"
|
||||
value="{{data.data.baseInfo.foeFactor}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.sizeCategory-{{data._id}}">{{config.i18n.creatureBaseInfo.sizeCategory}}</label>
|
||||
<select class="ds4-actor-properties__property-select" id="data.baseInfo.sizeCategory-{{data._id}}"
|
||||
name="data.baseInfo.sizeCategory" data-dtype="String">
|
||||
{{#select data.data.baseInfo.sizeCategory}}
|
||||
{{#each config.i18n.creatureSizeCategories as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="ds4-actor-properties__property">
|
||||
<label class="ds4-actor-properties__property-label"
|
||||
for="data.baseInfo.experiencePoints-{{data._id}}">{{config.i18n.creatureBaseInfo.experiencePoints}}</label>
|
||||
<input type="text" id="data.baseInfo.experiencePoints-{{data._id}}" name="data.baseInfo.experiencePoints"
|
||||
value="{{data.data.baseInfo.experiencePoints}}" data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
16
templates/sheets/actor/components/currency.hbs
Normal file
16
templates/sheets/actor/components/currency.hbs
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
SPDX-FileCopyrightText: 2021 Siegfried Krug
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<h4 class="ds4-currency-title">{{localize 'DS4.CharacterCurrency'}}</h4>
|
||||
<div class="ds4-currency">
|
||||
{{#each data.data.currency as |value key|}}
|
||||
<label for="data.currency.{{key}}" class="flex05">{{lookup ../config.i18n.characterCurrency key}}</label>
|
||||
<input class="ds4-currency__value ds4-currency__value--{{key}}" type="number" min="0" step="1"
|
||||
name="data.currency.{{key}}" id="data.currency.{{key}}" value="{{value}}" data-dtype="Number" />
|
||||
{{/each}}
|
||||
</div>
|
37
templates/sheets/actor/components/effect-list-entry.hbs
Normal file
37
templates/sheets/actor/components/effect-list-entry.hbs
Normal file
|
@ -0,0 +1,37 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an effect list entry row.
|
||||
!-- @param effectData: The data of the item.
|
||||
--}}
|
||||
<li class="ds4-embedded-document-list__row effect" data-effect-id="{{effectData._id}}">
|
||||
{{!-- enabled --}}
|
||||
<input class="ds4-embedded-document-list__editable ds4-embedded-document-list__editable--checkbox change-effect"
|
||||
type="checkbox" {{checked (ne effectData.disabled true)}} data-dtype="Boolean" data-property="disabled"
|
||||
data-inverted="true" title="{{localize 'DS4.EffectEnabled'}}">
|
||||
|
||||
{{!-- effectively enabled --}}
|
||||
{{#if effectData.isEffectivelyEnabled}}<i class="fas fa-check"></i>{{else}}<i class="fas fa-ban"></i>{{/if}}
|
||||
|
||||
{{!-- icon --}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/rollable-image.hbs rollable=false src=effectData.icon
|
||||
alt=(localize "DS4.DocumentImageAltText" name=effectData.label) title=effectData.label}}
|
||||
|
||||
{{!-- label --}}
|
||||
<div title="{{effectData.label}}">{{effectData.label}}</div>
|
||||
|
||||
{{!-- source name --}}
|
||||
<div>{{effectData.sourceName}}</div>
|
||||
|
||||
{{!-- factor --}}
|
||||
<div title="{{effectData.factor}}">{{effectData.factor}}</div>
|
||||
|
||||
{{!-- control button group --}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/control-button-group.hbs documentType="effect"
|
||||
editTitle="DS4.UserInteractionEditEffectTitle" deleteTitle="DS4.UserInteractionDeleteEffectTitle"}}
|
||||
</li>
|
32
templates/sheets/actor/components/effect-list-header.hbs
Normal file
32
templates/sheets/actor/components/effect-list-header.hbs
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an effect list header row.
|
||||
--}}
|
||||
<li class="ds4-embedded-document-list__row ds4-embedded-document-list__row--header">
|
||||
{{!-- enabled --}}
|
||||
<div title="{{localize 'DS4.EffectEnabled'}}">{{localize 'DS4.EffectEnabledAbbr'}}</div>
|
||||
|
||||
{{!-- effectively enabled --}}
|
||||
<div title="{{localize 'DS4.EffectEffectivelyEnabled'}}">{{localize 'DS4.EffectEffectivelyEnabledAbbr'}}</div>
|
||||
|
||||
{{!-- icon --}}
|
||||
<div></div>
|
||||
|
||||
{{!-- label --}}
|
||||
<div>{{localize 'DS4.EffectLabel'}}</div>
|
||||
|
||||
{{!-- source name --}}
|
||||
<div>{{localize 'DS4.EffectSourceName'}}</div>
|
||||
|
||||
{{!-- factor --}}
|
||||
<div title="{{localize 'DS4.EffectFactor'}}">{{localize 'DS4.EffectFactorAbbr'}}</div>
|
||||
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
55
templates/sheets/actor/components/item-list-entry.hbs
Normal file
55
templates/sheets/actor/components/item-list-entry.hbs
Normal file
|
@ -0,0 +1,55 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an item list entry row.
|
||||
!-- If the partial is called with a partial block, the partial block
|
||||
!-- content is inserted before the description.
|
||||
!-- @param itemData: The data of the item.
|
||||
!-- @param isEquipable: A flag to enable the equipped column.
|
||||
!-- @param hasQuantity: A flag to enable the quantity column.
|
||||
!-- @param hideDescription: A flag to disable the description column.
|
||||
!-- @param @partial-block: Custom column headers can be passed using the partial block.
|
||||
--}}
|
||||
<li class="ds4-embedded-document-list__row item" data-item-id="{{itemData._id}}">
|
||||
{{!-- equipped --}}
|
||||
{{#if isEquipable}}
|
||||
<input class="ds4-embedded-document-list__editable ds4-embedded-document-list__editable--checkbox change-item" type="checkbox" {{checked
|
||||
itemData.data.equipped}} data-dtype="Boolean" data-property="data.equipped"
|
||||
title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{/if}}
|
||||
|
||||
{{!-- image --}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/rollable-image.hbs rollable=itemData.data.rollable
|
||||
src=itemData.img alt=(localize "DS4.DocumentImageAltText" name=itemData.name) title=itemData.name
|
||||
rollableTitle=(localize "DS4.RollableImageRollableTitle" name=itemData.name) rollableClass="rollable-item"}}
|
||||
|
||||
{{!-- amount --}}
|
||||
{{#if hasQuantity}}
|
||||
<input class="ds4-embedded-document-list__editable change-item" type="number" min="0" step="1" value="{{itemData.data.quantity}}"
|
||||
data-dtype="Number" data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
{{/if}}
|
||||
|
||||
{{!-- name --}}
|
||||
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{itemData.name}}" data-dtype="String"
|
||||
data-property="name" title="{{htmlToPlainText itemData.data.description}}" />
|
||||
|
||||
{{!-- item type specifics --}}
|
||||
{{#if @partial-block }}
|
||||
{{> @partial-block}}
|
||||
{{/if}}
|
||||
|
||||
{{!-- description --}}
|
||||
{{#unless hideDescription}}
|
||||
<div class="ds4-embedded-document-list__description" title="{{htmlToPlainText itemData.data.description}}">
|
||||
{{{itemData.data.description}}}</div>
|
||||
{{/unless}}
|
||||
|
||||
{{!-- control button group --}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/control-button-group.hbs documentType="item"
|
||||
editTitle="DS4.UserInteractionEditItemTitle" deleteTitle="DS4.UserInteractionDeleteItemTitle"}}
|
||||
</li>
|
54
templates/sheets/actor/components/item-list-header.hbs
Normal file
54
templates/sheets/actor/components/item-list-header.hbs
Normal file
|
@ -0,0 +1,54 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an item list header row.
|
||||
!-- If the partial is called with a partial block, the partial block
|
||||
!-- content is inserted before the description heading.
|
||||
!-- @param isEquipable: A flag to enable the equipped column.
|
||||
!-- @param hasQuantity: A flag to enable the quantity column.
|
||||
!-- @param hideDescription: A flag to disable the description column.
|
||||
!-- @param type: The type of the items in this table.
|
||||
!-- @param @partial-block: Custom column headers can be passed using the partial block.
|
||||
--}}
|
||||
<li class="ds4-embedded-document-list__row ds4-embedded-document-list__row--header" data-type={{type}}>
|
||||
{{!-- equipped --}}
|
||||
{{#if isEquipable}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.equipped"
|
||||
title="{{localize 'DS4.SortByItemEquipped'}}">
|
||||
{{localize 'DS4.ItemEquippedAbbr'}}</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- image --}}
|
||||
<div></div>
|
||||
|
||||
{{!-- amount --}}
|
||||
{{#if hasQuantity}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.quantity"
|
||||
title="{{localize 'DS4.SortByQuantity'}}">#</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- name --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="name"
|
||||
title="{{localize 'DS4.SortByItemName'}}">{{localize 'DS4.ItemName'}}
|
||||
</div>
|
||||
|
||||
{{!-- item type specifics --}}
|
||||
{{#if @partial-block }}
|
||||
{{> @partial-block }}
|
||||
{{/if}}
|
||||
|
||||
{{!-- description --}}
|
||||
{{#unless hideDescription}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.description"
|
||||
title="{{localize 'DS4.SortByDescription'}}">{{localize
|
||||
'DS4.Description'}}</div>
|
||||
{{/unless}}
|
||||
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
165
templates/sheets/actor/components/items-overview.hbs
Normal file
165
templates/sheets/actor/components/items-overview.hbs
Normal file
|
@ -0,0 +1,165 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
SPDX-FileCopyrightText: 2021 Siegfried Krug
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.weapon)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--weapon item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
|
||||
type='weapon'}}
|
||||
{{!-- attack type --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.attackType"
|
||||
title="{{localize 'DS4.SortByAttackType'}}">
|
||||
{{localize
|
||||
'DS4.AttackTypeAbbr'}}</div>
|
||||
|
||||
{{!-- weapon bonus --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.weaponBonus"
|
||||
title="{{localize 'DS4.SortByWeaponBonus'}}">
|
||||
{{localize 'DS4.WeaponBonusAbbr'}}
|
||||
</div>
|
||||
|
||||
{{!-- opponent defense --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.opponentDefense"
|
||||
title="{{localize 'DS4.SortByOpponentDefense'}}">
|
||||
{{localize 'DS4.OpponentDefenseAbbr'}}
|
||||
</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
|
||||
{{#each itemsByType.weapon as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
|
||||
hasQuantity=true}}
|
||||
{{!-- attack type --}}
|
||||
<img class="ds4-embedded-document-list__image"
|
||||
src="{{lookup ../../config.icons.attackTypes itemData.data.attackType}}"
|
||||
title="{{lookup ../../config.i18n.attackTypes itemData.data.attackType}}" />
|
||||
|
||||
{{!-- weapon bonus --}}
|
||||
<div>{{ itemData.data.weaponBonus}}</div>
|
||||
|
||||
{{!-- opponent defense --}}
|
||||
<div>{{ itemData.data.opponentDefense}}</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='weapon'}}
|
||||
|
||||
{{!-- ARMOR --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeArmorPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.armor)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--armor item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
|
||||
type="armor"}}
|
||||
{{!-- armor material type --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorMaterialType"
|
||||
title="{{localize 'DS4.SortByArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
||||
|
||||
{{!-- armor type --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorType"
|
||||
title="{{localize 'DS4.SortByArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
|
||||
|
||||
{{!-- armor value --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorValue"
|
||||
title="{{localize 'DS4.SortByArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
|
||||
{{#each itemsByType.armor as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
|
||||
hasQuantity=true}}
|
||||
{{!-- armor material type --}}
|
||||
<div title="{{lookup ../../config.i18n.armorMaterialTypes itemData.data.armorMaterialType}}">
|
||||
{{lookup ../../config.i18n.armorMaterialTypesAbbr itemData.data.armorMaterialType}}
|
||||
</div>
|
||||
|
||||
{{!-- armor type --}}
|
||||
<div title="{{lookup ../../config.i18n.armorTypes itemData.data.armorType}}">
|
||||
{{lookup ../../config.i18n.armorTypesAbbr itemData.data.armorType}}
|
||||
</div>
|
||||
|
||||
{{!-- armor value --}}
|
||||
<div>{{ itemData.data.armorValue}}</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='armor'}}
|
||||
|
||||
{{!-- SHIELD --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeShieldPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.shield)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--shield item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
|
||||
type='shield'}}
|
||||
{{!-- armor value --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.armorValue"
|
||||
title="{{localize 'DS4.SortByArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
{{#each itemsByType.shield as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
|
||||
hasQuantity=true}}
|
||||
{{!-- armor value --}}
|
||||
<div>{{itemData.data.armorValue}}</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='shield'}}
|
||||
|
||||
{{!-- EQUIPMENT --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeEquipmentPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.equipment)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--equipment item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hasQuantity=true
|
||||
type='equipment'}}
|
||||
{{!-- storage location --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.storageLocation"
|
||||
title="{{localize 'DS4.SortByStorageLocation'}}">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
{{#each itemsByType.equipment as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
|
||||
hasQuantity=true}}
|
||||
{{!-- storage location --}}
|
||||
<input class="ds4-embedded-document-list__editable change-item" type="text"
|
||||
value="{{itemData.data.storageLocation}}" data-dtype="String" data-property="data.storageLocation"
|
||||
title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='equipment'}}
|
||||
|
||||
{{!-- LOOT --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeLootPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.loot)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--loot item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs hasQuantity=true type='loot'}}
|
||||
{{!-- storage location --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.storageLocation"
|
||||
title="{{localize 'DS4.SortByStorageLocation'}}">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
{{#each itemsByType.loot as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData hasQuantity=true}}
|
||||
{{!-- storage location --}}
|
||||
<input class="ds4-embedded-document-list__editable change-item" type="text"
|
||||
value="{{itemData.data.storageLocation}}" data-dtype="String" data-property="data.storageLocation"
|
||||
title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='loot'}}
|
29
templates/sheets/actor/components/profile.hbs
Normal file
29
templates/sheets/actor/components/profile.hbs
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-profile">
|
||||
{{#each data.data.profile as |profile-data-value profile-data-key|}}
|
||||
{{#if (and (ne profile-data-key 'biography') (ne profile-data-key 'specialCharacteristics'))}}
|
||||
<div class="ds4-profile__entry">
|
||||
<label class="ds4-profile__entry-label" for="data.profile.{{profile-data-key}}">
|
||||
{{lookup ../config.i18n.characterProfile profile-data-key}}
|
||||
</label>
|
||||
<input class="ds4-profile__entry-input" type="text" name="data.profile.{{profile-data-key}}"
|
||||
value="{{profile-data-value}}"
|
||||
data-dtype="{{lookup ../config.i18n.characterProfileDTypes profile-data-key}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="ds4-profile__entry">
|
||||
<label class="ds4-profile__entry-label" for="data.profile.specialCharacteristics">
|
||||
{{lookup config.i18n.characterProfile 'specialCharacteristics'}}
|
||||
</label>
|
||||
<textarea class="ds4-profile__entry-input ds4-profile__entry-input--multiline"
|
||||
name="data.profile.specialCharacteristics" data-dtype="String"
|
||||
rows="4">{{data.data.profile.specialCharacteristics}}</textarea>
|
||||
</div>
|
||||
</div>
|
45
templates/sheets/actor/components/talent-rank-equation.hbs
Normal file
45
templates/sheets/actor/components/talent-rank-equation.hbs
Normal file
|
@ -0,0 +1,45 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render an input element for a rank value property of an item.
|
||||
!-- @param talentRank: The talentRank
|
||||
!-- @param property: The key of the property in item.data (if 'base', the max value is set automatically)
|
||||
!-- @param disabled: If given, is placed plainly into the input as HTML property; meant to be set to "disabled" to
|
||||
disable the input element
|
||||
!-- @param localizeString: The string to use as key for the localized tooltip
|
||||
--}}
|
||||
{{#*inline "talentRankValue"}}
|
||||
<input class="ds4-talent-rank-equation__value change-item" data-dtype="Number" type="number" min="0" step="1" {{#if (eq
|
||||
property 'base' ) }}max="{{talentRank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
|
||||
value="{{lookup talentRank property}}" title="{{localize localizeString}}" />
|
||||
{{/inline}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render an input element for a rank value property of an item.
|
||||
!-- @param talentRank: The talent rank
|
||||
--}}
|
||||
<div class="ds4-talent-rank-equation">
|
||||
{{!-- acquired rank --}}
|
||||
{{> talentRankValue talentRank=talentRank property='base' localizeString='DS4.TalentRankBase'}}
|
||||
<div> ( {{localize "DS4.TalentRankOf"}} </div>
|
||||
{{!-- maximum acquirable rank --}}
|
||||
{{> talentRankValue talentRank=talentRank property='max' localizeString='DS4.TalentRankMax'}}
|
||||
<div>) + </div>
|
||||
{{!-- additional ranks --}}
|
||||
{{> talentRankValue talentRank=talentRank property='mod' localizeString='DS4.TalentRankMod'}}
|
||||
<div> = </div>
|
||||
{{!-- derived total rank --}}
|
||||
{{> talentRankValue talentRank=talentRank property='total' localizeString='DS4.TalentRankTotal'
|
||||
disabled='disabled'}}
|
||||
</div>
|
46
templates/sheets/actor/creature-sheet.hbs
Normal file
46
templates/sheets/actor/creature-sheet.hbs
Normal file
|
@ -0,0 +1,46 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/actor-header.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/creature-properties.hbs}}
|
||||
{{/systems/ds4/templates/sheets/actor/components/actor-header.hbs}}
|
||||
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="values">{{localize 'DS4.HeadingValues'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="abilities">{{localize 'DS4.HeadingAbilities'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Values Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/values.hbs}}
|
||||
|
||||
{{!-- Inventory Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/creature-inventory.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/spells.hbs}}
|
||||
|
||||
{{!-- Abilities Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/creature-abilities.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/effects.hbs}}
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/description.hbs}}
|
||||
</section>
|
||||
</form>
|
17
templates/sheets/actor/tabs/biography.hbs
Normal file
17
templates/sheets/actor/tabs/biography.hbs
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab biography" data-group="primary" data-tab="biography">
|
||||
<div class="ds4-biography-tab-content">
|
||||
<!-- beautify ignore:start -->
|
||||
<!-- prettier-ignore-start -->
|
||||
{{!-- remove indentation to avoid annoying Handlebars auto-indent --}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/profile.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/biography.hbs}}
|
||||
<!-- beautify ignore:end -->
|
||||
<!-- prettier-ignore-end -->
|
||||
</div>
|
||||
</div>
|
67
templates/sheets/actor/tabs/character-abilities.hbs
Normal file
67
templates/sheets/actor/tabs/character-abilities.hbs
Normal file
|
@ -0,0 +1,67 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab abilities" data-group="primary" data-tab="abilities">
|
||||
{{!-- TALENT --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeTalentPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.talent)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--talent item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs type='talent'}}
|
||||
{{!-- rank --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.rank.total"
|
||||
title="{{localize 'DS4.SortByTalentRank'}}">{{localize 'DS4.TalentRank'}}</div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
{{#each itemsByType.talent as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData}}
|
||||
{{!-- rank --}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/talent-rank-equation.hbs talentRank=itemData.data.rank}}
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='talent'}}
|
||||
|
||||
{{!-- RACIAL ABILITY --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeRacialAbilityPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.racialAbility)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--racial-ability item-list">
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-header.hbs type='racialAbility'}}
|
||||
{{#each itemsByType.racialAbility as |itemData id|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='racialAbility'}}
|
||||
|
||||
{{!-- LANGUAGE --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeLanguagePlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.language)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--language item-list">
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-header.hbs type='language'}}
|
||||
{{#each itemsByType.language as |itemData id|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='language'}}
|
||||
|
||||
{{!-- ALPHABET --}}
|
||||
<h4 class="ds4-embedded-document-list-title">{{localize 'DS4.ItemTypeAlphabetPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.alphabet)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--alphabet item-list">
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-header.hbs type='alphabet'}}
|
||||
{{#each itemsByType.alphabet as |itemData id|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='alphabet'}}
|
||||
</div>
|
11
templates/sheets/actor/tabs/character-inventory.hbs
Normal file
11
templates/sheets/actor/tabs/character-inventory.hbs
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab inventory" data-group="primary" data-tab="inventory">
|
||||
{{> systems/ds4/templates/sheets/actor/components/currency.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/items-overview.hbs}}
|
||||
</div>
|
19
templates/sheets/actor/tabs/creature-abilities.hbs
Normal file
19
templates/sheets/actor/tabs/creature-abilities.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab abilities" data-group="primary" data-tab="abilities">
|
||||
{{#unless (isEmpty itemsByType.specialCreatureAbility)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--special-creature-ability item-list">
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-header.hbs type='specialCreatureAbility'}}
|
||||
{{#each itemsByType.specialCreatureAbility as |itemData id|}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='specialCreatureAbility'}}
|
||||
</div>
|
10
templates/sheets/actor/tabs/creature-inventory.hbs
Normal file
10
templates/sheets/actor/tabs/creature-inventory.hbs
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab inventory" data-group="primary" data-tab="inventory">
|
||||
{{> systems/ds4/templates/sheets/actor/components/items-overview.hbs}}
|
||||
</div>
|
10
templates/sheets/actor/tabs/description.hbs
Normal file
10
templates/sheets/actor/tabs/description.hbs
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
19
templates/sheets/actor/tabs/effects.hbs
Normal file
19
templates/sheets/actor/tabs/effects.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab effects" data-group="primary" data-tab="effects">
|
||||
{{#unless (isEmpty data.effects)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--effect effect-list">
|
||||
{{> systems/ds4/templates/sheets/actor/components/effect-list-header.hbs}}
|
||||
{{#each enrichedEffects as |effectData id| }}
|
||||
{{> systems/ds4/templates/sheets/actor/components/effect-list-entry.hbs effectData=effectData}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddEffectTitle'
|
||||
documentType='effect'}}
|
||||
</div>
|
103
templates/sheets/actor/tabs/spells.hbs
Normal file
103
templates/sheets/actor/tabs/spells.hbs
Normal file
|
@ -0,0 +1,103 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Base template to display a value with unit.
|
||||
!-- @param unitDatum: the object to display; must have a value and a unit attribute
|
||||
!-- @param titleKey: The key of the localized title to use.
|
||||
!-- @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 title="{{localize titleKey}} [{{lookup unitNames unitDatum.unit}}]">
|
||||
{{#if unitDatum.value }}
|
||||
{{unitDatum.value}} {{lookup unitAbbrs unitDatum.unit}}
|
||||
{{else}}-{{/if}}
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
!-- Three 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.
|
||||
!-- @param titleKey: The key of the localized title to use.
|
||||
--}}
|
||||
{{#*inline "temporalUnit"}}
|
||||
{{> unit unitNames=config.i18n.temporalUnits unitAbbrs=config.i18n.temporalUnitsAbbr unitDatum=unitDatum
|
||||
titleKey=titleKey}}
|
||||
{{/inline}}
|
||||
|
||||
{{#*inline "customTemporalUnit"}}
|
||||
{{> unit unitNames=config.i18n.customTemporalUnits unitAbbrs=config.i18n.customTemporalUnitsAbbr unitDatum=unitDatum
|
||||
titleKey=titleKey}}
|
||||
{{/inline}}
|
||||
|
||||
{{#*inline "distanceUnit"}}
|
||||
{{> unit unitNames=config.i18n.distanceUnits unitAbbrs=config.i18n.distanceUnitsAbbr unitDatum=unitDatum
|
||||
titleKey=titleKey}}
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="ds4-sheet-tab tab spells" data-group="primary" data-tab="spells">
|
||||
{{#unless (isEmpty itemsByType.spell)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--spell item-list">
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-header.hbs isEquipable=true hideDescription=true
|
||||
type='spell'}}
|
||||
{{!-- spell type --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.spellType"
|
||||
title="{{localize 'DS4.SortBySpellType'}}">{{localize 'DS4.SpellTypeAbbr'}}</div>
|
||||
|
||||
{{!-- spell bonus --}}
|
||||
<div class="ds4-embedded-document-list__clickable sort-items" data-data-path="data.bonus"
|
||||
title="{{localize 'DS4.SortBySpellBonus'}}">{{localize 'DS4.SpellBonusAbbr'}}</div>
|
||||
|
||||
{{!-- max. distance --}}
|
||||
<div title="{{localize 'DS4.SpellMaxDistance'}}"><i class="fas fa-ruler"></i></div>
|
||||
|
||||
{{!-- duration --}}
|
||||
<div title="{{localize 'DS4.SpellDuration'}}"><i class="far fa-clock"></i></div>
|
||||
|
||||
{{!-- cooldown duration --}}
|
||||
<div title="{{localize 'DS4.SpellCooldownDuration'}}"><i class="fas fa-hourglass-half"></i></div>
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-header.hbs}}
|
||||
|
||||
{{#each itemsByType.spell as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
|
||||
hideDescription=true}}
|
||||
{{!-- spell type --}}
|
||||
<img class="ds4-embedded-document-list__image"
|
||||
src="{{lookup ../../config.icons.spellTypes itemData.data.spellType}}"
|
||||
title="{{lookup ../../config.i18n.spellTypes itemData.data.spellType}}" />
|
||||
|
||||
{{!-- spell bonus --}}
|
||||
<input class="ds4-embedded-document-list__editable change-item" type="text" data-dtype="String"
|
||||
data-property="data.bonus" value="{{itemData.data.bonus}}" title="{{localize 'DS4.SpellBonus'}}" />
|
||||
|
||||
{{!-- max. distance --}}
|
||||
{{> distanceUnit titleKey='DS4.SpellMaxDistance' unitDatum=itemData.data.maxDistance
|
||||
config=../../config}}
|
||||
|
||||
{{!-- duration --}}
|
||||
{{> customTemporalUnit titleKey='DS4.SpellDuration' unitDatum=itemData.data.duration config=../../config}}
|
||||
|
||||
{{!-- cooldown duration --}}
|
||||
{{> temporalUnit titleKey='DS4.SpellCooldownDuration' unitDatum=itemData.data.cooldownDuration
|
||||
config=../../config}}
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddItemTitle'
|
||||
documentType='item' type='spell'}}
|
||||
</div>
|
11
templates/sheets/actor/tabs/values.hbs
Normal file
11
templates/sheets/actor/tabs/values.hbs
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab values" data-group="primary" data-tab="values">
|
||||
{{> systems/ds4/templates/sheets/actor/components/core-values.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/combat-values.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/checks.hbs}}
|
||||
</div>
|
25
templates/sheets/item/alphabet-sheet.hbs
Normal file
25
templates/sheets/item/alphabet-sheet.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
36
templates/sheets/item/armor-sheet.hbs
Normal file
36
templates/sheets/item/armor-sheet.hbs
Normal file
|
@ -0,0 +1,36 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/armor.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/protective.hbs}}
|
||||
{{#if isOwned}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/equipable.hbs}}
|
||||
{{/if}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/physical.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
22
templates/sheets/item/components/effect-list-entry.hbs
Normal file
22
templates/sheets/item/components/effect-list-entry.hbs
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an effect list entry row.
|
||||
!-- @param effectData: The data of the item.
|
||||
--}}
|
||||
<li class="ds4-embedded-document-list__row effect" data-effect-id="{{effectData._id}}">
|
||||
{{!-- icon --}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/rollable-image.hbs rollable=false src=effectData.icon
|
||||
alt=(localize "DS4.DocumentImageAltText" name=effectData.label) title=effectData.label}}
|
||||
|
||||
{{!-- label --}}
|
||||
<div title="{{effectData.label}}">{{effectData.label}}</div>
|
||||
|
||||
{{!-- control button group --}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/control-button-group.hbs documentType="effect"
|
||||
editTitle="DS4.UserInteractionEditEffectTitle" deleteTitle="DS4.UserInteractionDeleteEffectTitle"}}
|
||||
</li>
|
19
templates/sheets/item/components/effect-list-header.hbs
Normal file
19
templates/sheets/item/components/effect-list-header.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an effect list header row.
|
||||
--}}
|
||||
<li class="ds4-embedded-document-list__row ds4-embedded-document-list__row--header">
|
||||
{{!-- icon --}}
|
||||
<div></div>
|
||||
|
||||
{{!-- label --}}
|
||||
<div>{{localize 'DS4.EffectLabel'}}</div>
|
||||
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
18
templates/sheets/item/components/item-header.hbs
Normal file
18
templates/sheets/item/components/item-header.hbs
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<header class="ds4-item-header">
|
||||
<img class="ds4-item-header__img" src="{{data.img}}" data-edit="img" alt="{{localize 'DS4.ItemImageAltText'}}"
|
||||
title="{{data.name}}" />
|
||||
<div class="ds4-item-header__data">
|
||||
<h2 class="ds4-item-header__type">{{lookup config.i18n.itemTypes item.type}}</h2>
|
||||
<h1 class="ds4-item-header__name">
|
||||
<label for="name-{{data._id}}" class="ds4-item-header__name-label">{{localize 'DS4.ItemName'}}</label>
|
||||
<input class="ds4-item-header__name-input" name="name" type="text" id="name-{{data._id}}"
|
||||
value="{{data.name}}" placeholder="{{localize 'DS4.ItemName'}}" />
|
||||
</h1>
|
||||
</div>
|
||||
</header>
|
33
templates/sheets/item/components/properties/armor.hbs
Normal file
33
templates/sheets/item/components/properties/armor.hbs
Normal file
|
@ -0,0 +1,33 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--armor">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesArmor'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.armorType-{{data._id}}">{{localize "DS4.ArmorType"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="data.armorType-{{data._id}}" name="data.armorType" data-dtype="String">
|
||||
{{#select data.data.armorType}}
|
||||
{{#each config.i18n.armorTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.armorMaterialType-{{data._id}}">{{localize "DS4.ArmorMaterialType"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="data.armorMaterialType-{{data._id}}" name="data.armorMaterialType" data-dtype="String">
|
||||
{{#select data.data.armorMaterialType}}
|
||||
{{#each config.i18n.armorMaterialTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
14
templates/sheets/item/components/properties/equipable.hbs
Normal file
14
templates/sheets/item/components/properties/equipable.hbs
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--equipable">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesEquipable'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.equipped-{{data._id}}">{{localize "DS4.ItemEquipped"}}</label>
|
||||
<input id="data.equipped-{{data._id}}" data-dtype="Boolean" type="checkbox" name="data.equipped" {{checked
|
||||
data.data.equipped}} />
|
||||
</div>
|
||||
</div>
|
38
templates/sheets/item/components/properties/physical.hbs
Normal file
38
templates/sheets/item/components/properties/physical.hbs
Normal file
|
@ -0,0 +1,38 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--physical">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesPhysical'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.price-{{data._id}}">{{localize "DS4.PriceGold"}}</label>
|
||||
<input id="data.price-{{data._id}}" data-dtype="Number" type="number" min="0" max="99999" step="0.01"
|
||||
placeholder="0" name="data.price" value="{{data.data.price}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.availability-{{data._id}}">{{localize "DS4.ItemAvailability"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="data.availability-{{data._id}}" name="data.availability" data-dtype="String">
|
||||
{{#select data.data.availability}}
|
||||
{{#each config.i18n.itemAvailabilities as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{#if isOwned}}
|
||||
<div class="form-group">
|
||||
<label for="data.quantity-{{data._id}}">{{localize "DS4.Quantity"}}</label>
|
||||
<input id="data.quantity-{{data._id}}" data-dtype="Number" type="number" name="data.quantity" placeholder="0"
|
||||
value="{{data.data.quantity}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.storageLocation-{{data._id}}">{{localize "DS4.StorageLocation"}}</label>
|
||||
<input id="data.storageLocation-{{data._id}}" data-dtype="String" type="text" name="data.storageLocation"
|
||||
value="{{data.data.storageLocation}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
14
templates/sheets/item/components/properties/protective.hbs
Normal file
14
templates/sheets/item/components/properties/protective.hbs
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--protective">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesProtective'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.armorValue-{{data._id}}">{{localize "DS4.ArmorValue"}}</label>
|
||||
<input id="data.armorValue-{{data._id}}" data-dtype="Number" type="number" min="0" step="1" placeholder="0"
|
||||
name="data.armorValue" value="{{data.data.armorValue}}" />
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,15 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--special-creature-ability">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesSpecialCreatureAbility'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.experiencePoints-{{data._id}}">{{localize
|
||||
"DS4.SpecialCreatureAbilityExperiencePoints"}}</label>
|
||||
<input id="data.experiencePoints-{{data._id}}" data-dtype="Number" type="number" min="0" step="1"
|
||||
placeholder="0" name="data.experiencePoints" value="{{data.data.experiencePoints}}" />
|
||||
</div>
|
||||
</div>
|
112
templates/sheets/item/components/properties/spell.hbs
Normal file
112
templates/sheets/item/components/properties/spell.hbs
Normal file
|
@ -0,0 +1,112 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--spell">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesSpell'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.bonus-{{data._id}}">{{localize "DS4.SpellBonus"}}</label>
|
||||
<input id="data.bonus-{{data._id}}" data-dtype="String" type="text" name="data.bonus" placeholder="0"
|
||||
value="{{data.data.bonus}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.spellType-{{data._id}}">{{localize "DS4.SpellType"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="data.spellType-{{data._id}}" name="data.spellType" data-dtype="String">
|
||||
{{#select data.data.spellType}}
|
||||
{{#each config.i18n.spellTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.spellCategory-{{data._id}}">{{localize "DS4.SpellCategory"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="data.spellCategory-{{data._id}}" name="data.spellCategory" data-dtype="String">
|
||||
{{#select data.data.spellCategory}}
|
||||
{{#each config.i18n.spellCategories as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group slim">
|
||||
<label>{{localize "DS4.SpellMaxDistance"}}</label>
|
||||
<div class="form-fields">
|
||||
<input data-dtype="String" type="text" name="data.maxDistance.value"
|
||||
value="{{data.data.maxDistance.value}}" />
|
||||
<select name="data.maxDistance.unit" data-dtype="String">
|
||||
{{#select data.data.maxDistance.unit}}
|
||||
{{#each config.i18n.distanceUnits as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group slim">
|
||||
<label>{{localize "DS4.SpellEffectRadius"}}</label>
|
||||
<div class="form-fields">
|
||||
<input data-dtype="String" type="text" name="data.effectRadius.value"
|
||||
value="{{data.data.effectRadius.value}}" />
|
||||
<select name="data.effectRadius.unit" data-dtype="String">
|
||||
{{#select data.data.effectRadius.unit}}
|
||||
{{#each config.i18n.distanceUnits as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group slim">
|
||||
<label>{{localize "DS4.SpellDuration"}}</label>
|
||||
<div class="form-fields">
|
||||
<input data-dtype="String" type="text" name="data.duration.value" value="{{data.data.duration.value}}" />
|
||||
<select name="data.duration.unit" data-dtype="String">
|
||||
{{#select data.data.duration.unit}}
|
||||
{{#each config.i18n.customTemporalUnits as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group slim">
|
||||
<label>{{localize "DS4.SpellCooldownDuration"}}</label>
|
||||
<div class="form-fields">
|
||||
<input data-dtype="String" type="text" name="data.cooldownDuration.value"
|
||||
value="{{data.data.cooldownDuration.value}}" />
|
||||
<select name="data.cooldownDuration.unit" data-dtype="String">
|
||||
{{#select data.data.cooldownDuration.unit}}
|
||||
{{#each config.i18n.temporalUnits as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group slim">
|
||||
<label>{{localize "DS4.SpellMinimumLevel"}}</label>
|
||||
<div class="form-fields">
|
||||
<label for="data.minimumLevels.healer-{{data._id}}">{{localize "DS4.SpellCasterClassHealer"}}</label>
|
||||
<input id="data.minimumLevels.healer-{{data._id}}" data-dtype="Number" type="number" min="0" step="1"
|
||||
name="data.minimumLevels.healer" placeholder="–" value="{{data.data.minimumLevels.healer}}" />
|
||||
<label for="data.minimumLevels.sorcerer-{{data._id}}">{{localize "DS4.SpellCasterClassSorcerer"}}</label>
|
||||
<input id="data.minimumLevels.sorcerer-{{data._id}}" data-dtype="Number" type="number" min="0" step="1"
|
||||
name="data.minimumLevels.sorcerer" placeholder="–" value="{{data.data.minimumLevels.sorcerer}}" />
|
||||
<label for="data.minimumLevels.wizard-{{data._id}}">{{localize "DS4.SpellCasterClassWizard"}}</label>
|
||||
<input id="data.minimumLevels.wizard-{{data._id}}" data-dtype="Number" type="number" min="0" step="1"
|
||||
name="data.minimumLevels.wizard" placeholder="–" value="{{data.data.minimumLevels.wizard}}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.price-{{data._id}}">{{localize "DS4.SpellPrice"}}</label>
|
||||
<input id="data.price-{{data._id}}" data-dtype="Number" type="number" min="0" step="0.01" name="data.price"
|
||||
placeholder="0" value="{{data.data.price}}" />
|
||||
</div>
|
||||
</div>
|
26
templates/sheets/item/components/properties/talent.hbs
Normal file
26
templates/sheets/item/components/properties/talent.hbs
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--talent">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesTalent'}}</h4>
|
||||
<div class="form-group slim">
|
||||
<label>{{localize "DS4.TalentRank"}}</label>
|
||||
<div class="form-fields">
|
||||
<label for="data.rank.base-{{data._id}}">{{localize "DS4.TalentRankBase"}}</label>
|
||||
<input id="data.rank.base-{{data._id}}" data-dtype="Number" type="number" min="0"
|
||||
max="{{data.data.rank.max}}" step="1" name="data.rank.base" value="{{data.data.rank.base}}" />
|
||||
<label for="data.rank.max-{{data._id}}">{{localize "DS4.TalentRankMax"}}</label>
|
||||
<input id="data.rank.max-{{data._id}}" data-dtype="Number" type="number" min="0" step="1"
|
||||
name="data.rank.max" value="{{data.data.rank.max}}" />
|
||||
<br />
|
||||
<label for="data.rank.mod-{{data._id}}">{{localize "DS4.TalentRankMod"}}</label>
|
||||
<input id="data.rank.mod-{{data._id}}" data-dtype="Number" type="number" min="0" step="1"
|
||||
name="data.rank.mod" value="{{data.data.rank.mod}}" />
|
||||
<label for="data.rank.total-{{data._id}}">{{localize "DS4.TalentRankTotal"}}</label>
|
||||
<span id="data.rank.total-{{data._id}}">{{data.data.rank.total}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
31
templates/sheets/item/components/properties/weapon.hbs
Normal file
31
templates/sheets/item/components/properties/weapon.hbs
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-item-properties ds4-item-properties--weapon">
|
||||
<h4 class="ds4-item-properties__title">{{localize 'DS4.ItemPropertiesWeapon'}}</h4>
|
||||
<div class="form-group">
|
||||
<label for="data.attackType-{{data._id}}">{{localize "DS4.AttackType"}}</label>
|
||||
<div class="form-fields">
|
||||
<select id="data.attackType-{{data._id}}" name="data.attackType" data-dtype="String">
|
||||
{{#select data.data.attackType}}
|
||||
{{#each config.i18n.attackTypes as |value key|}}
|
||||
<option value="{{key}}">{{value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.weaponBonus-{{data._id}}">{{localize "DS4.WeaponBonus"}}</label>
|
||||
<input id="data.weaponBonus-{{data._id}}" data-dtype="Number" type="number" name="data.weaponBonus"
|
||||
placeholder="0" value="{{data.data.weaponBonus}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="data.opponentDefense-{{data._id}}">{{localize "DS4.OpponentDefense"}}</label>
|
||||
<input id="data.opponentDefense-{{data._id}}" data-dtype="Number" type="number" name="data.opponentDefense"
|
||||
placeholder="0" value="{{data.data.opponentDefense}}" />
|
||||
</div>
|
||||
</div>
|
34
templates/sheets/item/equipment-sheet.hbs
Normal file
34
templates/sheets/item/equipment-sheet.hbs
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{#if isOwned}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/equipable.hbs}}
|
||||
{{/if}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/physical.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
25
templates/sheets/item/language-sheet.hbs
Normal file
25
templates/sheets/item/language-sheet.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
31
templates/sheets/item/loot-sheet.hbs
Normal file
31
templates/sheets/item/loot-sheet.hbs
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/physical.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
25
templates/sheets/item/racialAbility-sheet.hbs
Normal file
25
templates/sheets/item/racialAbility-sheet.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
35
templates/sheets/item/shield-sheet.hbs
Normal file
35
templates/sheets/item/shield-sheet.hbs
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/protective.hbs}}
|
||||
{{#if isOwned}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/equipable.hbs}}
|
||||
{{/if}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/physical.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
31
templates/sheets/item/specialCreatureAbility-sheet.hbs
Normal file
31
templates/sheets/item/specialCreatureAbility-sheet.hbs
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/special-creature-ability.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
34
templates/sheets/item/spell-sheet.hbs
Normal file
34
templates/sheets/item/spell-sheet.hbs
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/spell.hbs}}
|
||||
{{#if isOwned}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/equipable.hbs}}
|
||||
{{/if}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
10
templates/sheets/item/tabs/description.hbs
Normal file
10
templates/sheets/item/tabs/description.hbs
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.data.description target="data.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
18
templates/sheets/item/tabs/effects.hbs
Normal file
18
templates/sheets/item/tabs/effects.hbs
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab effects" data-group="primary" data-tab="effects">
|
||||
{{#unless (isEmpty data.effects)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--item-effect effect-list">
|
||||
{{> systems/ds4/templates/sheets/item/components/effect-list-header.hbs}}
|
||||
{{#each data.effects as |effectData id| }}
|
||||
{{> systems/ds4/templates/sheets/item/components/effect-list-entry.hbs effectData=effectData}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/unless}}
|
||||
{{> systems/ds4/templates/sheets/shared/components/add-button.hbs title='DS4.UserInteractionAddEffectTitle'
|
||||
documentType='effect'}}
|
||||
</div>
|
9
templates/sheets/item/tabs/properties.hbs
Normal file
9
templates/sheets/item/tabs/properties.hbs
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab properties" data-group="primary" data-tab="properties">
|
||||
{{> @partial-block}}
|
||||
</div>
|
31
templates/sheets/item/talent-sheet.hbs
Normal file
31
templates/sheets/item/talent-sheet.hbs
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/talent.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
35
templates/sheets/item/weapon-sheet.hbs
Normal file
35
templates/sheets/item/weapon-sheet.hbs
Normal file
|
@ -0,0 +1,35 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{> systems/ds4/templates/sheets/item/components/item-header.hbs}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="ds4-sheet-tab-nav tabs" data-group="primary">
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="description">{{localize 'DS4.HeadingDescription'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="properties">{{localize 'DS4.HeadingProperties'}}</a>
|
||||
<a class="ds4-sheet-tab-nav__item" data-tab="effects">{{localize 'DS4.HeadingEffects'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/description.hbs}}
|
||||
|
||||
{{!-- Properties Tab --}}
|
||||
{{#> systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/weapon.hbs}}
|
||||
{{#if isOwned}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/equipable.hbs}}
|
||||
{{/if}}
|
||||
{{> systems/ds4/templates/sheets/item/components/properties/physical.hbs}}
|
||||
{{/systems/ds4/templates/sheets/item/tabs/properties.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/sheets/item/tabs/effects.hbs}}
|
||||
</section>
|
||||
</form>
|
20
templates/sheets/shared/components/add-button.hbs
Normal file
20
templates/sheets/shared/components/add-button.hbs
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!
|
||||
!-- Render an "add" button.
|
||||
!-- @param documentType: The type of document this button controls, item or effect
|
||||
!-- @param title: The title to use for the link element (will be localized)
|
||||
!-- @param type: An optional property to use as data-type attribute
|
||||
}}
|
||||
<div>
|
||||
<a class="control-{{documentType}}" title="{{localize title}}" data-action="create" {{#if type}}data-type="{{type}}"
|
||||
{{/if}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize "DS4.UserInteractionAdd"}}
|
||||
</a>
|
||||
</div>
|
20
templates/sheets/shared/components/control-button-group.hbs
Normal file
20
templates/sheets/shared/components/control-button-group.hbs
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render a group of an "edit" and a "delete" button.
|
||||
!-- The current item is defined by the a corresponding id attribute of the parent li element.
|
||||
!-- @param documentType: The type of document that is controlled by this button group, item or effect
|
||||
!-- @param editTitle: The title to use for the edit link element (will be localized)
|
||||
!-- @param deleteTitle: The title to use for the delete link element (will be localized)
|
||||
--}}
|
||||
<div class="ds4-control-button-group">
|
||||
<a class="ds4-control-button-group__button control-{{documentType}}" data-action="edit"
|
||||
title="{{localize editTitle}}"><i class="fas fa-edit"></i></a>
|
||||
<a class="ds4-control-button-group__button control-{{documentType}}" data-action="delete"
|
||||
title="{{localize deleteTitle}}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
25
templates/sheets/shared/components/rollable-image.hbs
Normal file
25
templates/sheets/shared/components/rollable-image.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
{{!--
|
||||
!-- Render an image that has a dice overlay image.
|
||||
!-- @param rollable: A flag indicating whether or not the image is actually rollable.
|
||||
!-- @param rollableClass: The CSS class(es) to add if the image is rollable.
|
||||
!-- @param title: The title for the rollable image if it is not actually rollable.
|
||||
!-- @param rollableTitle: The title for the rollable image if it is rollable.
|
||||
!-- @param src: The path to the image.
|
||||
!-- @param alt: An alternate text for the image.
|
||||
--}}
|
||||
<div class="ds4-rollable-image{{#if rollable}} ds4-rollable-image--rollable {{rollableClass}}{{/if}}"
|
||||
title="{{#if rollable}}{{rollableTitle}}{{else}}{{title}}{{/if}}">
|
||||
{{#if src}}
|
||||
<img class="ds4-rollable-image__image" alt="{{alt}}" src="{{src}}" />
|
||||
{{/if}}
|
||||
{{#if rollable}}
|
||||
<img class="ds4-rollable-image__overlay" alt="{{localize 'DS4.DiceOverlayImageAltText'}}"
|
||||
src="icons/svg/d20-black.svg" />
|
||||
{{/if}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue