Potential Adversaries can be dragged out of the sheet onto canvas

This commit is contained in:
WBHarry 2025-07-02 13:44:19 +02:00
parent 4a53adf857
commit 1506f46efb
11 changed files with 54 additions and 66 deletions

View file

@ -49,8 +49,8 @@
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature companion=true}}
{{/if}}
{{/each}}
{{#each this.adversaries as |adversary id|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary.uuid type='adversary' hideControls=true isActor=true categoryAdversary=@../key actorId=id}}
{{#each adversaries as |adversary|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' hideControls=true isActor=true categoryAdversary=@../key}}
{{/each}}
{{/unless}}

View file

@ -115,10 +115,10 @@
{{#if isActor}}
<div class="controls">
{{#if (eq type 'adversary')}}
<a data-action="viewAdversary" data-potential-adversary="{{categoryAdversary}}" data-adversary="{{actorId}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.openActorWorld"}}'>
<a data-action="viewAdversary" data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.openActorWorld"}}'>
<i class="fa-solid fa-globe"></i>
</a>
<a data-action='deleteAdversary' data-potential-adversary="{{categoryAdversary}}" data-adversary="{{actorId}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'>
<a data-action='deleteAdversary' data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'>
<i class='fas fa-trash'></i>
</a>
{{/if}}