.dungeon/templates/actors/char-sheet-mvp/sheet.hbs
2023-12-24 11:58:02 -07:00

258 lines
No EOL
6.4 KiB
Handlebars

<form autocomplete="off" class="actor--pc">
{{#> dotdungeon.panel class="profile" title="dotdungeon.actor.pc.panel.profile"}}
{{#if settings.showAvatarOnSheet}}
<img
class="avatar"
src="{{actor.img}}"
data-edit="img"
title="{{actor.name}}"
/>
{{else}}
<label>
{{localize "dotdungeon.actor.pc.profile.avatar.label"}}
{{filePicker type="avatar" target="img"}}
</label>
{{/if}}
{{#if settings.devMode}}
<div class="debug-data">
Image URL: {{actor.img}}
</div>
{{/if}}
<label>
{{localize "dotdungeon.actor.pc.profile.name.label"}}
<input
type="text"
name="name"
value="{{actor.name}}"
placeholder="{{localize "dotdungeon.actor.pc.profile.name.placeholder"}}"
>
</label>
{{#if computed.canChangeGroup}}
<label>
{{localize "dotdungeon.actor.pc.profile.group.label"}}
{{#unless settings.playersCanChangeGroup}}
<span>{{localize "dotdungeon.actor.pc.profile.group.gm-edit"}}</span>
{{/unless}}
<input
type="text"
name="system.group"
value="{{system.group}}"
placeholder="{{localize "dotdungeon.actor.pc.profile.group.placeholder"}}"
>
</label>
{{/if}}
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="stats" title="dotdungeon.actor.pc.panel.statistics"}}
{{#each system.stats }}
{{> dotdungeon.stat name=@key value=this}}
{{/each}}
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="skills" title="dotdungeon.actor.pc.panel.skills"}}
{{#each system.skills as |skills|}}
<div class="skill-group">
<h3 class="skill-group__label">{{localize (concat "dotdungeon.actor.pc.skills." @key)}}</h3>
{{#each skills as |skill|}}
{{> dotdungeon.skill system=../../system stat=@../key name=@key value=skill}}
{{/each}}
</div>
{{/each}}
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="backpack" title="dotdungeon.actor.pc.panel.backpack"}}
<label class="row">
<span class="grow">
{{localize "dotdungeon.actor.pc.backpack.bytes.label"}}
</span>
<input
class="bytes-input"
type="number"
name="system.bytes"
value="{{system.bytes}}"
min="0"
aria-label="{{localize "dotdungeon.aria.actor.pc.input.bytes"}}"
aria-valuemin="0"
aria-valuenow="{{system.bytes}}"
>
</label>
<label class="row">
<span class="grow">
{{localize
(concat
"dotdungeon.settings.resourcesOrSupplies.option."
settings.resourcesOrSupplies
)
}}
{{#if settings.devMode}}
<span class="debug-data">
({{settings.resourcesOrSupplies}})
</span>
{{/if}}
</span>
<input
class="supplies-count"
type="number"
name="system.supplies"
value="{{system.supplies}}"
min="0"
max="5"
aria-label="{{localize "dotdungeon.aria.actor.pc.input.supplies"}}"
aria-valuemin="0"
aria-valuemax="5"
aria-valuenow="{{system.supplies}}"
>
</label>
<label class="row">
<span class="grow">
{{localize "dotdungeon.actor.pc.backpack.materials.label"}}
</span>
<input
class="materials-count"
type="number"
name="system.materials"
value="{{system.materials}}"
min="0"
max="5"
aria-label="{{localize "dotdungeon.aria.actor.pc.input.materials"}}"
aria-valuemin="0"
aria-valuemax="5"
aria-valuenow="{{system.supplies}}"
>
</label>
<label class="grow col">
Inventory
<textarea class="grow" name="system.inventoryString">{{system.inventoryString}}</textarea>
</label>
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="sync" title="dotdungeon.actor.pc.panel.health"}}
{{!--
NOTE: This would be neat to get working at some point, but isn't my highest
priority to do.
<div class="sync">
<h3 class="sync__header">
{{localize "dotdungeon.actor.pc.sync.header"}}
{{#if settings.devMode}}
<span class="debug-data">
({{system.syncDelta}})
</span>
{{/if}}
</h3>
<input
type="number"
class="sync__input sync"
value="{{computed.syncTotal}}"
>
</div>
--}}
<div class="respawns">
<h3 class="respawns__header">
{{localize "dotdungeon.actor.pc.respawns.header"}}
</h3>
{{#each system.respawns}}
<input
type="checkbox"
class="respawns__input"
name="system.respawns.{{@key}}"
{{checked this}}
>
{{/each}}
</div>
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="aspect" title="dotdungeon.actor.pc.panel.aspect"}}
<input
type="text"
class="aspect__name--input"
name="system.aspect.name"
value="{{system.aspect.name}}"
>
<label class="aspect__used--label">
Used
<input
type="checkbox"
class="aspect__used--input"
name="system.aspect.used"
{{checked system.aspect.used}}
>
</label>
<label class="aspect__duration--label">
Duration
{{#if system.aspect.deactivateAfter}}
<span class="friendly-duration aspect__duration--friendly">
({{dotdungeon-toFriendlyDuration system.aspect.deactivateAfter}})
</span>
{{/if}}
<input
type="number"
class="aspect__duration--input"
name="system.aspect.deactivateAfter"
value="{{system.aspect.deactivateAfter}}"
>
</label>
<textarea
class="aspect__description--input"
name="system.aspect.description"
>{{system.aspect.description}}</textarea>
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="weapons" title="dotdungeon.actor.pc.panel.weapons"}}
Weapons
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="spells" title="dotdungeon.actor.pc.panel.spells"}}
Spells
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="roles" title="dotdungeon.actor.pc.panel.roles"}}
{{#each system.roles}}
<textarea
name="system.roles.{{@key}}"
>{{this}}</textarea>
{{/each}}
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="mounts" title="dotdungeon.actor.pc.panel.mounts"}}
Mounts
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="summons" title="dotdungeon.actor.pc.panel.summons"}}
Summons
{{/ dotdungeon.panel}}
{{#> dotdungeon.panel class="storage" title="dotdungeon.actor.pc.panel.storage"}}
Storage
{{/ dotdungeon.panel}}
{{#if settings.devMode}}
<div class="debug-data" style="grid-column: 1 / span 3">
<div>
Settings:
<pre><code>{{dotdungeon-stringify settings}}</code></pre>
</div>
<hr>
<div>
System:
<pre><code>{{dotdungeon-stringify system}}</code></pre>
</div>
<hr>
<div>
Actor:
<pre><code>{{dotdungeon-stringify actor}}</code></pre>
</div>
</div>
{{/if}}
</form>