mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
* Weapons and Armor are now stored like any other item on the PC. Added equip/unequip logic. * Changed so that equip attempts always go through and the neccessary weapons are unequipped to fascilitate it * Fixed drag equip and extracted unequipBeforeEquip logic
35 lines
No EOL
1.9 KiB
Handlebars
35 lines
No EOL
1.9 KiB
Handlebars
<div class="inventory-container">
|
|
{{#each this.inventory as |section key|}}
|
|
<ol class="inventory-item-list inventory-item-header">
|
|
<li class="item inventory-title-row-container">
|
|
<div class="inventory-title-row">
|
|
<div class="inventory-item-title-container">{{section.titles.name}}</div>
|
|
<div class="inventory-item-quantity title">{{section.titles.quantity}}</div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
<ol class="item-list inventory-item-list">
|
|
{{#each this.items as |item|}}
|
|
<li class="item inventory-item">
|
|
<div class="inventory-row" data-item-id="{{item.uuid}}">
|
|
<div class="inventory-item-title-container">
|
|
<div data-action="viewObject" data-value="{{item.uuid}}" class="inventory-item-title">
|
|
<img src="{{item.img}}" />
|
|
{{item.name}}
|
|
</div>
|
|
</div>
|
|
<div class="flexrow">
|
|
<button data-action="toggleEquipItem" id="{{item.id}}">{{localize "Equip"}}</button>
|
|
</div>
|
|
<div class="inventory-item-quantity spaced">
|
|
<i data-action="itemQuantityDecrease" class="fa-solid fa-chevron-left icon-button {{#if (lte item.system.quantity 1)}}disabled{{/if}}"></i>
|
|
<input type="text" data-item="system.quantity" value="{{item.system.quantity}}" data-dtype="Number" />
|
|
<i data-action="itemQuantityIncrease" class="fa-solid fa-chevron-right icon-button"></i>
|
|
</div>
|
|
<i data-action="deleteItem" class="fas fa-trash icon-button secondary row-icon"></i>
|
|
</div>
|
|
</li>
|
|
{{/each}}
|
|
</ol>
|
|
{{/each}}
|
|
</div> |