mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
[Feature] Reload Check (#2051)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
8d68166e4c
commit
26bcc2dddc
22 changed files with 223 additions and 14 deletions
|
|
@ -18,6 +18,7 @@
|
|||
<p class="hint">{{localize (concat "DAGGERHEART.SETTINGS.Automation.FIELDS.roll." field.name ".hint")}}</p>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{formGroup settingFields.schema.fields.reload value=settingFields.reload localize=true}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
{{#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" id="{{item.uuid}}-resource" class="inventory-item-resource" value="{{item.system.resource.value}}" min="0" max="{{rollParsed item.system.resource.max item.actor item true}}" />
|
||||
{{#if item.system.hasReload}}
|
||||
<a data-action="toggleItemReload" title="{{localize (ifThen item.system.needsReload 'DAGGERHEART.GENERAL.Resource.unloaded' 'DAGGERHEART.GENERAL.Resource.loaded')}}">
|
||||
<i class="fa-solid fa-gun {{#if item.system.needsReload}}unloaded{{/if}}"></i>
|
||||
</a>
|
||||
{{else}}
|
||||
<i class="{{#if item.system.resource.icon}}{{item.system.resource.icon}}{{else}}fa-solid fa-hashtag{{/if}}"></i>
|
||||
<input type="number" id="{{item.uuid}}-resource" class="inventory-item-resource" value="{{item.system.resource.value}}" min="0" max="{{rollParsed item.system.resource.max item.actor item true}}" />
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else if (eq item.system.resource.type 'diceValue')}}
|
||||
<div class="item-resources">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<div class="roll-buttons">
|
||||
{{#if (eq automationSettings.reload 'button')}}
|
||||
<button class="roll-reload-check" {{#if needsReload}}disabled{{/if}}>{{localize "DAGGERHEART.ACTIONS.Reload.checkReload"}}</button>
|
||||
{{/if}}
|
||||
{{#if areas.length}}<button class="action-areas end-button"><i class="fa-solid fa-crosshairs"></i></button>{{/if}}
|
||||
{{#if hasDamage}}
|
||||
{{#if damage.active}}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
<div class="chat-roll">
|
||||
<div class="roll-part-title"><span>{{title}}</span></div>
|
||||
|
||||
{{#if (eq action.type 'attack')}}
|
||||
{{#if needsReload}}
|
||||
<div class="roll-reload-container">
|
||||
{{#if needsReload}}
|
||||
<p class='reload-warning'>{{localize "DAGGERHEART.ACTIONS.Reload.reloadRequired"}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if actionDescription}}{{> 'systems/daggerheart/templates/ui/chat/parts/description-part.hbs'}}{{/if}}
|
||||
{{#if hasRoll}}
|
||||
<div class="roll-part-header"><span>{{localize "Result"}}</span></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue