mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Fixed up dice
This commit is contained in:
parent
e37fc83c59
commit
132d9ee6c8
20 changed files with 417 additions and 68 deletions
19
templates/sheets/global/partials/item-resource.hbs
Normal file
19
templates/sheets/global/partials/item-resource.hbs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{{#if (eq item.system.resource.type 'simple')}}
|
||||
<div class="item-resource">
|
||||
<i class="{{#if item.system.resource.icon}}{{item.system.resource.icon}}{{else}}fa-solid fa-hashtag{{/if}}"></i>
|
||||
<input type="number" class="inventory-item-resource" value="{{item.system.resource.value}}" step="1" />
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item-resources">
|
||||
{{#each item.system.resource.diceStates as | state key |}}
|
||||
<a class="item-resource" data-action="toggleResourceDice" data-dice="{{key}}">
|
||||
<div class="item-dice-resource">
|
||||
<label>{{tertiary state.value '?'}}</label>
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/d" ../item.system.resource.dieFaces ".svg"}}" />
|
||||
{{#if state.used}}<i class="fa-solid fa-x"></i>{{/if}}
|
||||
</div>
|
||||
</a>
|
||||
{{/each}}
|
||||
<a data-action="handleResourceDice"><i class="fa-solid fa-gears resource-edit"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue