Reworked Action storage

This commit is contained in:
WBHarry 2025-06-30 23:01:50 +02:00
parent 3333a9e00a
commit ce593d02f3
16 changed files with 196 additions and 23 deletions

View file

@ -10,6 +10,12 @@
{{#if document.system.class.subclass}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.subclass') ' - ' document.system.class.subclass.name) type='subclass'}}
{{/if}}
{{#if document.system.actions}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize "DAGGERHEART.Sheets.PC.Actions") type='actions'}}
{{/if}}
{{#if document.system.companionActions}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize "DAGGERHEART.Sheets.PC.CompanionActions") type='companionActions'}}
{{/if}}
{{#if document.system.community}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.community') ' - ' document.system.community.name) type='community'}}
{{/if}}

View file

@ -0,0 +1,16 @@
<li class="inventory-item" data-item-id="{{item.id}}" data-is-action="true" data-partner="{{partner}}">
<img src="{{item.img}}" class="item-img" data-action="useItem" />
<div class="item-label">
<div class="item-name">{{item.name}}</div>
{{!-- <div class="item-tags">
<div class="tag">
</div>
<div class="tag">
</div>
</div> --}}
</div>
<div class="controls">
<a data-action="toChat" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
<a data-action="triggerContextMenu" data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
</div>
</li>

View file

@ -34,6 +34,16 @@
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
{{/if}}
{{/each}}
{{#each document.system.actions as |action|}}
{{#if (or (eq ../type 'actions'))}}
{{> 'systems/daggerheart/templates/sheets/global/partials/action-item.hbs' item=action}}
{{/if}}
{{/each}}
{{#each document.system.companionActions as |action|}}
{{#if (or (eq ../type 'companionActions'))}}
{{> 'systems/daggerheart/templates/sheets/global/partials/action-item.hbs' item=action partner=true}}
{{/if}}
{{/each}}
{{/unless}}
</ul>