Make all item types quantifiable in the party actor

This commit is contained in:
Carlos Fernandez 2026-04-16 02:02:26 -04:00
parent 76a3268cf3
commit 9aab9fca52
13 changed files with 91 additions and 45 deletions

View file

@ -14,7 +14,7 @@
<div class="form-group">
<label>{{localize "DAGGERHEART.GENERAL.quantity"}}</label>
<div class="form-fields">
<range-picker step="1" min="1" max="{{max}}" name="quantity" value="{{max}}"></range-picker>
<range-picker step="1" min="1" max="{{max}}" name="quantity" value="{{initial}}"></range-picker>
</div>
</div>
</div>

View file

@ -39,6 +39,7 @@
collection=@root.inventory.consumables
isGlassy=true
canCreate=true
isQuantifiable=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.loot'
@ -47,6 +48,7 @@
isGlassy=true
canCreate=true
showActions=true
isQuantifiable=true
}}
</div>
</section>

View file

@ -29,6 +29,7 @@
canCreate=true
hideResources=true
hideContextMenu=true
isQuantifiable=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.armor'
@ -39,6 +40,7 @@
canCreate=true
hideResources=true
hideContextMenu=true
isQuantifiable=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.consumable'
@ -48,6 +50,7 @@
isGlassy=true
canCreate=true
hideContextMenu=true
isQuantifiable=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.loot'
@ -57,6 +60,7 @@
isGlassy=true
canCreate=true
hideContextMenu=true
isQuantifiable=true
}}
</div>
</section>

View file

@ -66,6 +66,7 @@ Parameters:
showLabels=../showLabels
isAction=../isAction
hideResources=../hideResources
isQuantifiable=../isQuantifiable
showActions=../showActions
}}

View file

@ -63,10 +63,10 @@ Parameters:
{{#if (and (not hideResources) (not (eq item.system.resource.type 'diceValue')))}}
{{> "systems/daggerheart/templates/sheets/global/partials/item-resource.hbs"}}
{{/if}}
{{#if (and (not hideResources) (gte item.system.quantity 0))}}
<div class="item-resource">
<input type="number" id="{{item.uuid}}-quantity" class="inventory-item-quantity" value="{{item.system.quantity}}" min="0" />
</div>
{{#if (or isQuantifiable (or (eq item.system.quantity 0) (gt item.system.quantity 1)))}}
<div class="item-resource">
<input type="number" id="{{item.uuid}}-quantity" class="inventory-item-quantity" value="{{item.system.quantity}}" min="0" />
</div>
{{/if}}
{{!-- Controls --}}