daggerheart/templates/sheets/global/partials/inventory-item.hbs
Murilo Brito 3a6a973ea2
[Feature] New Environment Sheet (#243)
* rework new environment template sheet, add environment-settings sheet, improve adversary-settings sheet and  delete legacy actor sheet templates

* Potential Adversaries can be dragged out of the sheet onto canvas

* Added ToChat and UseItem

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
2025-07-02 14:30:36 +02:00

158 lines
No EOL
7.9 KiB
Handlebars

<li class="inventory-item" data-item-id="{{item.id}}" data-companion="{{companion}}">
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem"/>
<div class="item-label">
<div class="item-name">{{item.name}}</div>
{{#if (eq type 'weapon')}}
<div class="item-tags">
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize (concat 'DAGGERHEART.Abilities.' item.system.trait '.name')}}
{{localize (concat 'DAGGERHEART.Range.' item.system.range '.name')}}
<span> - </span>
{{item.system.damage.value}}
({{localize (concat 'DAGGERHEART.DamageType.' item.system.damage.type '.abbreviation')}})
</div>
</div>
{{else}}
<div class="tag">
{{localize (concat 'DAGGERHEART.Abilities.' item.system.trait '.name')}}
{{localize (concat 'DAGGERHEART.Range.' item.system.range '.name')}}
</div>
<div class="tag">
{{item.system.damage.value}}
({{localize (concat 'DAGGERHEART.DamageType.' item.system.damage.type '.abbreviation')}})
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.Burden.' item.system.burden)}}
</div>
{{/if}}
</div>
{{/if}}
{{#if (eq type 'armor')}}
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}:
{{item.system.baseScore}}
</div>
</div>
{{else}}
<div class="item-tags">
<div class="tag">
{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}:
{{item.system.baseScore}}
</div>
<div class="tag">
{{localize "DAGGERHEART.Sheets.Armor.baseThresholds.base"}}:
{{item.system.baseThresholds.major}}
<span>/</span>
{{item.system.baseThresholds.severe}}
</div>
</div>
{{/if}}
{{/if}}
{{#if (eq type 'domainCard')}}
{{#if isSidebar}}
<div class="item-labels">
<div class="label">
{{localize (concat 'DAGGERHEART.Domain.CardTypes.' item.system.type)}}
<span> - </span>
{{localize (concat 'DAGGERHEART.Domains.' item.system.domain '.label')}}
<span> - </span>
<span class="recall-value">{{item.system.recallCost}}</span>
<i class="fa-solid fa-bolt"></i>
</div>
</div>
{{else}}
<div class="item-tags">
<div class="tag">
{{localize (concat 'DAGGERHEART.Domain.CardTypes.' item.system.type)}}
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.Domains.' item.system.domain '.label')}}
</div>
<div class="tag">
<span class="recall-label">{{localize "DAGGERHEART.Sheets.DomainCard.RecallCost"}}: </span>
<span class="recall-value">{{item.system.recallCost}}</span>
</div>
</div>
{{/if}}
{{/if}}
{{#if (eq type 'effect')}}
<div class="item-tags">
<div class="tag">
{{localize (concat 'TYPES.Item.' item.parent.type)}}
<span>: </span>
{{item.parent.name}}
</div>
<div class="tag">
{{#if item.duration.duration}}
{{localize 'DAGGERHEART.Effects.duration.temporary'}}
{{else}}
{{localize 'DAGGERHEART.Effects.duration.passive'}}
{{/if}}
</div>
{{#each item.statuses as |status|}}
<div class="tag">
{{localize (concat 'DAGGERHEART.Condition.' status '.name')}}
</div>
{{/each}}
</div>
{{/if}}
{{#if (eq type 'action')}}
<div class="item-tags">
<div class="tag">
{{localize (concat 'DAGGERHEART.Actions.Types.' item.type '.name')}}
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.ActionType.' item.actionType)}}
</div>
</div>
{{/if}}
</div>
{{#unless hideControls}}
{{#if isActor}}
<div class="controls">
{{#if (eq type 'adversary')}}
<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="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'>
<i class='fas fa-trash'></i>
</a>
{{/if}}
</div>
{{else}}
<div class="controls">
{{#if (eq type 'weapon')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-hands"></i>
</a>
{{/if}}
{{#if (eq type 'armor')}}
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
<i class="fa-solid fa-shield"></i>
</a>
{{/if}}
{{#if (eq type 'domainCard')}}
{{#unless item.system.inVault}}
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToVault'}}">
<i class="fa-solid fa-arrow-down"></i>
</a>
{{else}}
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToLoadout'}}">
<i class="fa-solid fa-arrow-up"></i>
</a>
{{/unless}}
{{/if}}
<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>
{{/if}}
{{else}}
<span></span>
{{/unless}}
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
</li>