mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] Item Resource Support (#328)
* Initial * Resource setup finished * Fixed so that costs can be used * Corrected standard resources * Actions can only use item resources from their parent item * Fixed up dice * Fixed resource dice positioning * Fixed parsing of resource.max * Fixed styling on settings tab * Added manual input for Dice Resources * Lightmode fixes * Fixed Feature spellcasting modifier * Bugfix for item input to resourceDiceDialog * Item fix for TokenInput * PR Fixes
This commit is contained in:
parent
eefa116d9a
commit
4be3e6179c
53 changed files with 972 additions and 329 deletions
|
|
@ -10,7 +10,7 @@
|
|||
{{#each costs as | cost index |}}
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label for="{{type}}">{{type}}: {{total}}</label>
|
||||
<label>{{label}}: {{total}}</label>
|
||||
<input name="costs.{{index}}.enabled" type="checkbox"{{#if enabled}} checked{{/if}}>
|
||||
{{#if scalable}}
|
||||
<input type="range" value="{{scale}}" min="1" max="10" step="{{step}}" name="costs.{{index}}.scale">
|
||||
|
|
|
|||
16
templates/dialogs/dice-roll/resourceDice.hbs
Normal file
16
templates/dialogs/dice-roll/resourceDice.hbs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<section>
|
||||
<div class="resource-items">
|
||||
{{#times (rollParsed item.system.resource.max actor item numerical=true)}}
|
||||
{{#with (ifThen (lookup ../diceStates this) (lookup ../diceStates this) this) as | state |}}
|
||||
<div class="resource-item" data-dice="{{#if ../../this}}{{../this}}{{else}}{{state}}{{/if}}">
|
||||
<input type="number" data-dtype="Number" name={{concat "diceStates." (ifThen ../../this ../this state) ".value" }} value="{{state.value}}" />
|
||||
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/d" (ifThen ../../item.system.resource.dieFaces ../../item.system.resource.dieFaces ../item.system.resource.dieFaces) ".svg"}}" />
|
||||
</div>
|
||||
{{/with}}
|
||||
{{/times}}
|
||||
</div>
|
||||
<footer>
|
||||
<button data-action="save">{{localize 'Save'}}</button>
|
||||
<button data-action="rerollDice">{{localize "DAGGERHEART.APPLICATIONS.ResourceDice.rerollDice"}}</button>
|
||||
</footer>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue