Spot the link / entityClass error!

This commit is contained in:
Professor Bunbury 2020-10-23 12:36:42 -04:00
parent 441342b7e9
commit de52576408
53 changed files with 6102 additions and 223 deletions

View file

@ -172,4 +172,4 @@
{{editor content=data.details.biography.value target="data.details.biography.value" button=true owner=owner editable=editable}}
</div>
</section>
</form>
</form>

View file

@ -52,6 +52,29 @@
{{/if}}
</div>
<<<<<<< Updated upstream
=======
{{else if section.isSpecies}}
<div class="item-detail player-species">
</div>
{{else if section.isArchetype}}
<div class="item-detail player-archetype">
{{item.data.name}}
</div>
{{else if section.isBackground}}
<div class="item-detail player-background">
</div>
{{else if section.isClassfeatures}}
<div class="item-detail player-classfeatures">
{{item.data.name}}
</div>
>>>>>>> Stashed changes
{{else if section.isClass}}
<div class="item-detail player-class">
{{item.data.subclass}}

View file

@ -0,0 +1,34 @@
<form id="cast-config-form">
<p>{{ localize "SW5E.SpellCastHint" }} <strong>{{item.name}}</strong> {{ localize "SW5E.cast" }}.</p>
{{#unless canCast}}
<p class="notification error">{{ localize "SW5E.SpellCastNoSlots" }}</p>
{{/unless}}
<div class="form-group">
<label>{{ localize "SW5E.SpellCastUpcast" }}</label>
<div class="form-fields">
<select name="level">
{{#select item.data.level}}
{{#each castLevels as |l|}}
<option value="{{l.level}}" {{#unless l.canCast}}disabled{{/unless}}>{{l.label}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
{{#if canUpcast}}
<label class="checkbox">{{ localize "SW5E.SpellCastConsume" }} <input type="checkbox" name="consume" {{checked canCast}}/></label>
{{/if}}
{{#if hasPlaceableTemplate}}
<div class="form-group">
<label class="checkbox">{{ localize "SW5E.PlaceTemplate" }}
<input type="checkbox" name="placeTemplate" checked/>
</label>
</div>
{{/if}}
</div>
</form>

View file

@ -0,0 +1,34 @@
<form id="spell-config-form">
<p>{{ localize "DND5E.SpellCastHint" }} <strong>{{item.name}}</strong> {{ localize "DND5E.spell" }}.</p>
{{#unless canCast}}
<p class="notification error">{{ localize "DND5E.SpellCastNoSlots" }}</p>
{{/unless}}
<div class="form-group">
<label>{{ localize "DND5E.SpellCastUpcast" }}</label>
<div class="form-fields">
<select name="level">
{{#select item.data.level}}
{{#each spellLevels as |l|}}
<option value="{{l.level}}" {{#unless l.canCast}}disabled{{/unless}}>{{l.label}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
{{#if canUpcast}}
<label class="checkbox">{{ localize "DND5E.SpellCastConsume" }} <input type="checkbox" name="consume" {{checked canCast}}/></label>
{{/if}}
{{#if hasPlaceableTemplate}}
<div class="form-group">
<label class="checkbox">{{ localize "DND5E.PlaceTemplate" }}
<input type="checkbox" name="placeTemplate" checked/>
</label>
</div>
{{/if}}
</div>
</form>

View file

@ -0,0 +1,45 @@
<form class="{{cssClass}} flexcol" autocomplete="off">
{{!-- Item Sheet Header --}}
<header class="sheet-header flexrow">
<img class="profile" src="{{item.img}}" title="{{item.name}}" data-edit="img"/>
<div class="header-details flexrow">
<h1 class="charname">
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'SW5E.ItemName' }}"/>
</h1>
<div class="item-subtitle">
<h4 class="item-type">{{itemType}}</h4>
<span class="item-status">{{itemStatus}}</span>
</div>
<ul class="summary">
<li>
<input type="text" name="data.className" value="{{data.className}}" placeholder="{{ localize 'SW5E.ClassName' }}"/>
</li>
<li>
<input type="text" name="data.classCasterType" value="{{data.classCasterType}}" />
</li>
<li>
<input type="text" name="data.source" value="{{data.source}}" placeholder="{{ localize 'SW5E.Source' }}"/>
</li>
</ul>
</div>
</header>
{{!-- Item Sheet Navigation --}}
<nav class="sheet-navigation tabs" data-group="primary">
<a class="item active" data-tab="description">{{ localize "SW5E.Description" }}</a>
<!-- <a class="item" data-tab="details">{{ localize "SW5E.Details" }}</a> -->
</nav>
{{!-- Item Sheet Body --}}
<section class="sheet-body">
{{!-- Description Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}}
</div>
</section>
</form>

View file

@ -0,0 +1,99 @@
<form class="{{cssClass}} flexcol" autocomplete="off">
{{!-- Item Sheet Header --}}
<header class="sheet-header flexrow">
<img class="profile" src="{{item.img}}" title="{{item.name}}" data-edit="img"/>
<div class="header-details flexrow">
<h1 class="charname">
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'SW5E.ItemName' }}"/>
</h1>
<div class="item-subtitle">
<h4 class="item-type">{{itemType}}</h4>
</div>
<ul class="summary">
<li>
<input type="text" name="data.source" value="{{data.source}}" placeholder="{{ localize 'SW5E.Source' }}"/>
</li>
</ul>
</div>
</header>
{{!-- Item Sheet Navigation --}}
<nav class="sheet-navigation tabs" data-group="primary">
<a class="item active" data-tab="description">{{ localize "SW5E.Description" }}</a>
<!-- <a class="item" data-tab="details">{{ localize "SW5E.Details" }}</a> -->
</nav>
{{!-- Item Sheet Body --}}
<section class="sheet-body">
{{!-- Description Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
<div class="background">{{editor content=data.flavorText.value target="data.flavorText.value" button=true editable=editable}}</div>
<div class="background"><p><strong>Skill Proficiencies:</strong> {{{data.skillProficiencies.value}}}</p></div>
<div class="background"><p><strong>Tool Proficiencies:</strong> {{{data.toolProficiencies.value}}}</p></div>
<div class="background"><p><strong>Languages:</strong> {{{data.languages.value}}}</p></div>
<div class="background"><p><strong>Equipment:</strong> {{{data.equipment.value}}}</p></div>
<div class="background"><h3>{{{data.flavorName.value}}}</h3></div>
<div class="background"><p>{{{data.flavorDescription.value}}}</p></div>
<div class="smalltable"><p>{{{data.flavorOptions.value}}}</p></div>
<div class="background"><h2>Feature: {{{data.featureName.value}}}</h2></div>
<div class="background"><p>{{{data.featureText.value}}}</p></div>
<h2>Background Feat</h2>
<p>As a further embodiment of the experience and training of your background, you can choose from the following feats:</p>
<div class="smalltable"><p>{{{data.featOptions.value}}}</p></div>
<h3>Suggested Characteristics</h3>
<div class="background"><p>{{{data.suggestedCharacteristics.value}}}</p></div>
<div class="medtable"><p>{{{data.personalityTraitOptions.value}}}</p></div><p>&nbsp;</p>
<div class="medtable"><p>{{{data.idealOptions.value}}}</p></div><p>&nbsp;</p>
<div class="medtable"><p>{{{data.flawOptions.value}}}</p></div><p>&nbsp;</p>
<div class="medtable"><p>{{{data.bondOptions.value}}}</p></div>
<script>
let nullField = document.querySelectorAll('.background > div');
nullField.forEach(function(element) {
if (element.value === null) {
element.previousElementSibling.style.display = 'none';
element.style.display = 'none';
}
});
</script>
</div>
<!-- {{> "systems/sw5e/templates/items/parts/item-description.html"}}
{{!-- Details Tab --}}
<div class="tab details" data-group="primary" data-tab="details">
<h3 class="form-header">{{ localize "SW5E.FeatureUsage" }}</h3>
{{!-- Item Activation Template --}}
{{> "systems/sw5e/templates/items/parts/item-activation.html"}}
{{!-- Recharge Requirement --}}
{{#if data.activation.type}}
<div class="form-group recharge">
<label>{{ localize "SW5E.FeatureActionRecharge" }}</label>
<div class="form-fields">
<span>{{ localize "SW5E.FeatureRechargeOn" }}</span>
<input type="text" name="data.recharge.value" value="{{data.recharge.value}}"
data-dtype="Number" placeholder="{{ localize 'SW5E.FeatureRechargeResult' }}"/>
<label class="checkbox">
{{ localize "SW5E.Charged" }}
<input type="checkbox" name="data.recharge.charged" {{checked data.recharge.charged}}/>
</label>
</div>
</div>
{{/if}}
<h3 class="form-header">{{ localize "SW5E.FeatureAttack" }}</h3>
{{!-- Item Action Template --}}
{{> "systems/sw5e/templates/items/parts/item-action.html"}}
</div> -->
</section>
</form>

151
templates/items/cast.html Normal file
View file

@ -0,0 +1,151 @@
<form class="{{cssClass}} flexcol" autocomplete="off">
{{!-- Item Sheet Header --}}
<header class="sheet-header flexrow">
<img class="profile" src="{{item.img}}" title="{{item.name}}" data-edit="img"/>
<div class="header-details flexrow">
<h1 class="charname">
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'SW5E.CastName' }}"/>
</h1>
<div class="item-subtitle">
<h4 class="item-type">{{itemType}}</h4>
<span class="item-status">{{itemStatus}}</span>
</div>
<ul class="summary">
<li>
{{labels.level}}
</li>
<li>
{{labels.school}}
</li>
<li>
<input type="text" name="data.source" value="{{data.source}}" placeholder="{{ localize 'SW5E.Source' }}"/>
</li>
</ul>
</div>
</header>
{{!-- Item Sheet Navigation --}}
<nav class="sheet-navigation tabs" data-group="primary">
<a class="item active" data-tab="description">{{ localize "SW5E.Description" }}</a>
<a class="item" data-tab="details">{{ localize "SW5E.Details" }}</a>
</nav>
{{!-- Item Sheet Body --}}
<section class="sheet-body">
{{!-- Description Tab --}}
{{> "systems/sw5e/templates/items/parts/item-description.html"}}
{{!-- Details Tab --}}
<div class="tab details" data-group="primary" data-tab="details">
<h3 class="form-header">{{ localize "SW5E.CastDetails" }}</h3>
{{!-- Cast Level --}}
<div class="form-group">
<label>{{ localize "SW5E.CastLevel" }}</label>
<select name="data.level" data-dtype="Number">
{{#select data.level}}
{{#each config.castLevels as |name lvl|}}
<option value="{{lvl}}">{{name}}</option>
{{/each}}
{{/select}}
</select>
</div>
{{!-- Cast School --}}
<div class="form-group">
<label>{{ localize "SW5E.CastSchool" }}</label>
<select name="data.school">
{{#select data.school}}
{{#each config.castSchools as |name sch|}}
<option value="{{sch}}">{{name}}</option>
{{/each}}
{{/select}}
</select>
</div>
{{!-- Cast Components --}}
<div class="cast-components form-group stacked">
<label>{{ localize "SW5E.CastComponents" }}</label>
<label class="checkbox">
<input type="checkbox" name="data.components.vocal" {{checked data.components.vocal}}/> {{ localize "SW5E.ComponentVerbal" }}
</label>
<label class="checkbox">
<input type="checkbox" name="data.components.somatic" {{checked data.components.somatic}}/> {{ localize "SW5E.ComponentSomatic" }}
</label>
<label class="checkbox">
<input type="checkbox" name="data.components.material" {{checked data.components.material}}/> {{ localize "SW5E.ComponentMaterial" }}
</label>
<label class="checkbox">
<input type="checkbox" name="data.components.concentration" {{checked data.components.concentration}}/> {{ localize "SW5E.Concentration" }}
</label>
<label class="checkbox">
<input type="checkbox" name="data.components.ritual" {{checked data.components.ritual}}/> {{ localize "SW5E.Ritual" }}
</label>
</div>
{{!-- Material Components --}}
<div class="form-group stacked">
<label>{{ localize "SW5E.CastMaterials" }}</label>
<input class="materials" type="text" name="data.materials.value" value="{{data.materials.value}}"/>
{{#if data.materials.value}}
<div class="cast-materials flexrow">
<label>{{ localize "SW5E.Supply" }}</label>
<input type="text" name="data.materials.supply" value="{{data.materials.supply}}" data-dtype="Number" Placeholder="0"/>
<label>{{ localize "SW5E.CostGP" }}</label>
<input type="text" name="data.materials.cost" value="{{data.materials.cost}}" data-dtype="Number" Placeholder="-"/>
<label>{{ localize "SW5E.Consumed" }}</label>
<input type="checkbox" name="data.materials.consumed" {{checked data.materials.consumed}}/>
</div>
{{/if}}
</div>
{{!-- Preparation Mode --}}
<div class="form-group input-select">
<label>{{ localize "SW5E.CastPreparationMode" }}</label>
<div class="form-fields">
<label class="checkbox prepared">
{{ localize "SW5E.CastPrepared" }} <input type="checkbox" name="data.preparation.prepared" {{checked data.preparation.prepared}}/>
</label>
<select name="data.preparation.mode">
{{#select data.preparation.mode}}
<option value=""></option>
{{#each config.castPreparationModes as |name key|}}
<option value="{{key}}">{{name}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<h3 class="form-header">{{ localize "SW5E.CastingHeader" }}</h3>
{{!-- Item Activation Template --}}
{{> "systems/sw5e/templates/items/parts/item-activation.html"}}
<h3 class="form-header">{{ localize "SW5E.CastEffects" }}</h3>
{{!-- Item Action Template --}}
{{> "systems/sw5e/templates/items/parts/item-action.html"}}
{{!-- Cast Level Scaling --}}
<div class="form-group">
<label>{{ localize "SW5E.LevelScaling" }}</label>
<div class="form-fields">
<select name="data.scaling.mode">
{{#select data.scaling.mode}}
{{#each config.castScalingModes as |name key|}}
<option value="{{key}}">{{name}}</option>
{{/each}}
{{/select}}
</select>
<input type="text" name="data.scaling.formula" value="{{data.scaling.formula}}" placeholder="{{ localize 'SW5E.ScalingFormula' }}"/>
</div>
</div>
</div>
</section>
</form>

View file

@ -26,6 +26,7 @@
<nav class="sheet-navigation tabs" data-group="primary">
<a class="item active" data-tab="description">{{ localize "SW5E.Description" }}</a>
<a class="item" data-tab="details">{{ localize "SW5E.Details" }}</a>
<a class="item" data-tab="archetypes">{{ localize "SW5E.Archetypes" }}</a>
</nav>
{{!-- Item Sheet Body --}}
@ -38,7 +39,12 @@
{{!-- Details Tab --}}
<div class="tab details" data-group="primary" data-tab="details">
{{!-- Class Levels Table and Features --}}
{{editor content=data.classFeatures.value target="data.classFeatures.value" button=true owner=owner editable=editable}}
</div>
<!-- {{{data.classFeatures.value}}} -->
<!--
{{!-- Class Levels --}}
<div class="form-group">
<label>{{ localize "SW5E.ClassLevels" }}</label>
@ -113,10 +119,20 @@
</ul>
</div>
</div>
<<<<<<< Updated upstream
{{!-- Granted Abilities (TODO) --}}
<h3 class="form-header">{{ localize "SW5E.GrantedAbilities" }}</h3>
<p class="notification warning">This is still to-do</p>
</div>
=======
-->
{{!-- Archetypes Tab --}}
<div class="tab flexrow active" data-group="primary" data-tab="archetypes">
{{editor content=data.atFlavorText.value target="data.atFlavorText.value" button=true owner=owner editable=editable}}
</div>
>>>>>>> Stashed changes
</section>
</form>

View file

@ -0,0 +1,132 @@
<form autocomplete="off">
<!-- Effect Header -->
<header class="sheet-header">
<img class="effect-icon" src="{{ effect.icon }}" data-edit="icon">
<h1 class="effect-title">{{ effect.label }}</h1>
</header>
<!-- Effect Configuration Tabs -->
<nav class="sheet-tabs tabs">
<a class="item" data-tab="details"><i class="fas fa-book"></i> {{localize "EFFECT.TabDetails"}}</a>
<a class="item" data-tab="duration"><i class="fas fa-clock"></i> {{localize "EFFECT.TabDuration"}}</a>
<a class="item" data-tab="effects"><i class="fas fa-cogs"></i> {{localize "EFFECT.TabEffects"}}</a>
</nav>
<!-- Details Tab -->
<section class="tab" data-tab="details">
<div class="form-group">
<label>{{ localize "EFFECT.Label" }}</label>
<div class="form-fields">
<input type="text" name="label" value="{{ effect.label }}"/>
</div>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.Icon" }}</label>
<div class="form-fields">
{{filePicker target="icon" type="image"}}
<input class="image" type="text" name="icon" placeholder="path/image.png" value="{{effect.icon}}"/>
</div>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.IconTint" }}</label>
<div class="form-fields">
<input class="color" type="text" name="tint" value="{{effect.tint}}"/>
<input type="color" value="{{effect.tint}}" data-edit="tint"/>
</div>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.Disabled" }}</label>
<input type="checkbox" name="disabled" {{ checked effect.disabled }}/>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.Origin" }}</label>
<div class="form-fields">
<input type="text" name="origin" value="{{ effect.origin }}" disabled/>
</div>
</div>
</section>
<!-- Duration Tab -->
<section class="tab" data-tab="duration">
<div class="form-group">
<label>{{ localize "EFFECT.DurationSecs" }}</label>
<div class="form-fields">
<input type="number" name="duration.startTime" value="{{ effect.duration.seconds }}"/>
</div>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.StartTime" }}</label>
<div class="form-fields">
<input type="number" name="duration.startTime" value="{{ effect.duration.startTime }}"/>
</div>
</div>
<hr/>
<div class="form-group">
<label>{{ localize "EFFECT.DurationTurns" }}</label>
<div class="form-fields">
<label>{{ localize "COMBAT.Rounds" }}</label>
<input type="number" name="duration.rounds" value="{{ effect.duration.rounds }}"/>
<label>{{ localize "COMBAT.Turns" }}</label>
<input type="number" name="duration.turns" value="{{ effect.duration.turns }}"/>
</div>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.Combat" }}</label>
<div class="form-fields">
<input type="text" name="duration.combat" value="{{ effect.duration.combat }}" disabled/>
</div>
</div>
<div class="form-group">
<label>{{ localize "EFFECT.StartTurns" }}</label>
<div class="form-fields">
<label>{{ localize "COMBAT.Round" }}</label>
<input type="number" name="duration.startRound" value="{{ effect.duration.startRound }}"/>
<label>{{ localize "COMBAT.Turn" }}</label>
<input type="number" name="duration.startTurn" value="{{ effect.duration.startTurn }}"/>
</div>
</div>
</section>
<!-- Effects Tab -->
<section class="tab" data-tab="effects">
<header class="effect-change effects-header flexrow">
<div class="key">{{ localize "EFFECT.ChangeKey" }}</div>
<div class="mode">{{ localize "EFFECT.ChangeMode" }}</div>
<div class="value">{{ localize "EFFECT.ChangeValue" }}</div>
<div class="effect-controls">
<a class="effect-control" data-action="add"><i class="far fa-plus-square"></i></a>
</div>
</header>
<ol class="changes-list">
{{#each effect.changes as |change i|}}
<li class="effect-change flexrow" data-index="{{i}}">
<div class="key">
<input type="text" name="changes.{{i}}.key" value="{{change.key}}"/>
</div>
<div class="mode">
<select name="changes.{{i}}.mode" data-dtype="Number">
{{selectOptions ../modes selected=change.mode}}
</select>
</div>
<div class="value">
<input type="text" name="changes.{{i}}.value" value="{{change.value}}"/>
</div>
<div class="effect-controls">
<a class="effect-control" data-action="delete"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</section>
<footer class="sheet-footer">
<button type="submit"><i class="fas fa-save"></i> {{localize submitText}}</button>
</footer>
</form>