mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Actions can only use item resources from their parent item
This commit is contained in:
parent
524b3fa921
commit
e37fc83c59
7 changed files with 79 additions and 74 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<li class="inventory-item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-type="{{type}}">
|
||||
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem" {{#if (not noTooltip)}}data-tooltip="{{concat "#item#" item.uuid}}"{{/if}} />
|
||||
<div class="item-label-wrapper">
|
||||
<div class="item-label {{#unless (and (not isSidebar) (or item.system.resource.max item.system.quantity))}}fullWidth{{/unless}}">
|
||||
<div class="item-label {{#unless (and (not isSidebar) (or item.system.resource item.system.quantity))}}fullWidth{{/unless}}">
|
||||
{{#if isCompanion}}
|
||||
<a class="item-name" data-action="attackRoll">{{item.name}}</a>
|
||||
{{else}}
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and (not isSidebar) item.system.resource.max)}}
|
||||
{{#if (and (not isSidebar) item.system.resource)}}
|
||||
<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" />
|
||||
|
|
|
|||
|
|
@ -1,10 +1,19 @@
|
|||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.Resource.single"}}</legend>
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.GENERAL.Resource.single"}}
|
||||
{{#unless source.system.resource}}
|
||||
<a data-action="addResource"><i class="fa-solid fa-plus icon-button"></i></a>
|
||||
{{else}}
|
||||
<a data-action="removeResource"><i class="fa-solid fa-trash"></i></a>
|
||||
{{/unless}}
|
||||
</legend>
|
||||
|
||||
<div class="two-columns even">
|
||||
{{formGroup systemFields.resource.fields.value value=source.system.resource.value localize=true}}
|
||||
{{formGroup systemFields.resource.fields.max value=source.system.resource.max localize=true}}
|
||||
{{formGroup systemFields.resource.fields.icon value=source.system.resource.icon localize=true placeholder="fa-solid fa-hashtag"}}
|
||||
{{formGroup systemFields.resource.fields.recovery value=source.system.resource.recovery localize=true}}
|
||||
</div>
|
||||
{{#if source.system.resource}}
|
||||
<div class="two-columns even">
|
||||
{{formGroup systemFields.resource.fields.value value=source.system.resource.value localize=true}}
|
||||
{{formGroup systemFields.resource.fields.max value=source.system.resource.max localize=true}}
|
||||
{{formGroup systemFields.resource.fields.icon value=source.system.resource.icon localize=true placeholder="fa-solid fa-hashtag"}}
|
||||
{{formGroup systemFields.resource.fields.recovery value=source.system.resource.recovery localize=true}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue