mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Add setting to hide party stats (#1861)
This commit is contained in:
parent
e95ea3c281
commit
2ffe678503
9 changed files with 212 additions and 142 deletions
|
|
@ -1,3 +1,4 @@
|
|||
<div>
|
||||
{{formGroup settingFields.schema.fields.hideObserverPermissionInChat value=settingFields._source.hideObserverPermissionInChat localize=true}}
|
||||
{{formGroup settingFields.schema.fields.hidePartyStats value=settingFields._source.hidePartyStats localize=true}}
|
||||
</div>
|
||||
|
|
@ -23,143 +23,164 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<ul class="actors-list">
|
||||
{{#each partyMembers as |member id|}}
|
||||
<li class="actor-resources">
|
||||
<div class="actor-img-frame">
|
||||
<img class="actor-img" src="{{member.img}}">
|
||||
{{#if member.weapons}}
|
||||
<div class="equipped-weapons">
|
||||
{{#each member.weapons as |weapon|}}
|
||||
<img src="{{weapon.img}}" data-tooltip="{{weapon.name}}"/>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if member.evasion includeZero=true}}
|
||||
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.evasion">{{member.evasion}}</div>
|
||||
{{/if}}
|
||||
{{#if member.difficulty includeZero=true}}
|
||||
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.difficulty">{{member.difficulty}}</div>
|
||||
{{/if}}
|
||||
{{#unless (eq member.type 'companion')}}
|
||||
<div class="threshold-section">
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.minor"}}</h4>
|
||||
<h4 class="threshold-value">{{member.damageThresholds.major}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.major"}}</h4>
|
||||
<h4 class="threshold-value">{{member.damageThresholds.severe}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.severe"}}</h4>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
<header>
|
||||
<h2 class="actor-name">
|
||||
<a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a>
|
||||
<a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a>
|
||||
</h2>
|
||||
<div>
|
||||
{{#unless (or (eq member.type 'companion') (eq member.type 'adversary')) }}
|
||||
<div class="hope-section">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4>
|
||||
{{#times member.resources.hope.max}}
|
||||
<span class='hope-value' data-action='toggleHope' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte member.resources.hope.value (add this 1))}}
|
||||
<i class='fa-solid fa-diamond'></i>
|
||||
{{else}}
|
||||
<i class='fa-regular fa-circle'></i>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/times}}
|
||||
{{#if @root.showStats}}
|
||||
<ul class="actors-list">
|
||||
{{#each partyMembers as |member id|}}
|
||||
<li class="actor-resources">
|
||||
<div class="actor-img-frame">
|
||||
<img class="actor-img" src="{{member.img}}">
|
||||
{{#if member.weapons}}
|
||||
<div class="equipped-weapons">
|
||||
{{#each member.weapons as |weapon|}}
|
||||
<img src="{{weapon.img}}" data-tooltip="{{weapon.name}}"/>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if member.evasion includeZero=true}}
|
||||
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.evasion">{{member.evasion}}</div>
|
||||
{{/if}}
|
||||
{{#if member.difficulty includeZero=true}}
|
||||
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.difficulty">{{member.difficulty}}</div>
|
||||
{{/if}}
|
||||
{{#unless (eq member.type 'companion')}}
|
||||
<div class="threshold-section">
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.minor"}}</h4>
|
||||
<h4 class="threshold-value">{{member.damageThresholds.major}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.major"}}</h4>
|
||||
<h4 class="threshold-value">{{member.damageThresholds.severe}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.severe"}}</h4>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
{{#if member.subtitle}}
|
||||
<span class="subtitle">{{member.subtitle}}</span>
|
||||
{{/if}}
|
||||
</header>
|
||||
<section class="body">
|
||||
<section class="resources">
|
||||
{{#unless (eq member.type 'companion') }}
|
||||
<header>
|
||||
<h2 class="actor-name">
|
||||
<a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a>
|
||||
<a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a>
|
||||
</h2>
|
||||
<div>
|
||||
{{#unless (or (eq member.type 'companion') (eq member.type 'adversary')) }}
|
||||
<div class="hope-section">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4>
|
||||
{{#times member.resources.hope.max}}
|
||||
<span class='hope-value' data-action='toggleHope' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte member.resources.hope.value (add this 1))}}
|
||||
<i class='fa-solid fa-diamond'></i>
|
||||
{{else}}
|
||||
<i class='fa-regular fa-circle'></i>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
{{#if member.subtitle}}
|
||||
<span class="subtitle">{{member.subtitle}}</span>
|
||||
{{/if}}
|
||||
</header>
|
||||
<section class="body">
|
||||
<section class="resources">
|
||||
{{#unless (eq member.type 'companion') }}
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.HitPoints.plural">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-heart" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.resources.hitPoints.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.resources.hitPoints.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.resources.hitPoints.max}}
|
||||
<span class='slot {{#if (gte member.resources.hitPoints.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleHitPoints' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.HitPoints.plural">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.stress">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-heart" inert></i>
|
||||
<i class="fa-solid fa-bolt" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.resources.hitPoints.value}}</span>
|
||||
<span class="current">{{member.resources.stress.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.resources.hitPoints.max}}</span>
|
||||
<span class="max">{{member.resources.stress.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.resources.hitPoints.max}}
|
||||
<span class='slot {{#if (gte member.resources.hitPoints.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleHitPoints' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#times member.resources.stress.max}}
|
||||
<span class='slot {{#if (gte member.resources.stress.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleStress' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.stress">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-bolt" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.resources.stress.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.resources.stress.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.resources.stress.max}}
|
||||
<span class='slot {{#if (gte member.resources.stress.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleStress' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if member.armorScore.max}}
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.armorSlots">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-shield" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.armorScore.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.armorScore.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.armorScore.max}}
|
||||
<a class='armor-slot' data-action='toggleArmorSlot' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte member.armorScore.value (add this 1))}}
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
{{else}}
|
||||
<i class="fa-solid fa-shield-halved"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/times}}
|
||||
{{#if member.armorScore.max}}
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.armorSlots">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-shield" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.armorScore.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.armorScore.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.armorScore.max}}
|
||||
<a class='armor-slot' data-action='toggleArmorSlot' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte member.armorScore.value (add this 1))}}
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
{{else}}
|
||||
<i class="fa-solid fa-shield-halved"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
{{#if member.traits}}
|
||||
<div class="traits">
|
||||
{{#each member.traits as |trait|}}
|
||||
<span class="trait">
|
||||
<span class="label">{{trait.label}}</span>
|
||||
<span class="value">{{trait.value}}</span>
|
||||
</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
{{#if member.traits}}
|
||||
<div class="traits">
|
||||
{{#each member.traits as |trait|}}
|
||||
<span class="trait">
|
||||
<span class="label">{{trait.label}}</span>
|
||||
<span class="value">{{trait.value}}</span>
|
||||
</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<ul class="actors-list limited">
|
||||
{{#each partyMembers as |member id|}}
|
||||
<li class="actor-resources">
|
||||
<div class="actor-img-frame">
|
||||
<img class="actor-img" src="{{member.img}}">
|
||||
</div>
|
||||
<header>
|
||||
<h2 class="actor-name">
|
||||
<a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a>
|
||||
<a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a>
|
||||
</h2>
|
||||
{{#if member.subtitle}}
|
||||
<span class="subtitle">{{member.subtitle}}</span>
|
||||
{{/if}}
|
||||
</header>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{#unless document.system.partyMembers.length}}
|
||||
<div class="actors-dragger">
|
||||
<span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue