Merged with development

This commit is contained in:
WBHarry 2025-10-29 19:13:46 +01:00
commit 6d3e5302eb
62 changed files with 1776 additions and 660 deletions

View file

@ -2,20 +2,22 @@
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.APPLICATIONS.OwnershipSelection.default"}}</label>
<select name="ownership.default" data-dtype="Number">
{{selectOptions @root.ownershipOptions selected=ownership.default labelAttr="label" valueAttr="value" }}
<select name="default" data-dtype="Number" disabled>
{{selectOptions ownershipDefaultOptions selected=defaultOwnership labelAttr="label" valueAttr="value" localize=true }}
</select>
</div>
</div>
{{#each ownership.players as |player id|}}
<div class="ownership-container">
<img src="{{player.img}}" />
<div>{{player.name}}</div>
<select name="{{concat "ownership.players." id ".type"}}" data-dtype="Number">
{{selectOptions @root.ownershipOptions selected=player.ownership labelAttr="label" valueAttr="value" }}
</select>
</div>
{{/each}}
<ul class="ownership-list">
{{#each ownership as |player id|}}
<li class="ownership-container">
<img src="{{player.img}}" />
<span>{{player.name}}</span>
<select name="{{concat "ownership." id}}" data-dtype="Number">
{{selectOptions @root.ownershipOptions selected=player.ownership labelAttr="label" valueAttr="value" localize=true }}
</select>
</li>
{{/each}}
</ul>
<footer class="flexrow">
<button type="submit">{{localize "Save"}}</button>
</footer>

View file

@ -2,7 +2,7 @@
<div class="tiers-container">
{{#each this.tiers as |tier key|}}
<fieldset class="tier-container">
<legend>{{tier.name}}</legend>
<legend>{{localize tier.name}}</legend>
{{#each tier.groups}}
<div class="checkbox-group-container">

View file

@ -7,7 +7,11 @@
<label>{{localize "DAGGERHEART.SETTINGS.Automation.FIELDS.hopeFear.label"}}</label>
{{formGroup settingFields.schema.fields.hopeFear.fields.gm value=settingFields._source.hopeFear.gm localize=true}}
{{formGroup settingFields.schema.fields.hopeFear.fields.players value=settingFields._source.hopeFear.players localize=true}}
</div>
<div class="form-group setting-two-values">
<label>{{localize "DAGGERHEART.SETTINGS.Automation.FIELDS.summaryMessages.label"}}</label>
{{formGroup settingFields.schema.fields.summaryMessages.fields.damage value=settingFields._source.summaryMessages.damage localize=true}}
{{formGroup settingFields.schema.fields.summaryMessages.fields.effects value=settingFields._source.summaryMessages.effects localize=true}}
</div>
{{formGroup settingFields.schema.fields.actionPoints value=settingFields._source.actionPoints localize=true}}
{{formGroup settingFields.schema.fields.hordeDamage value=settingFields._source.hordeDamage localize=true}}

View file

@ -19,6 +19,6 @@
</a>
</div>
</div>
<span class="card-name">{{item.name}}</span>
<span class="card-name" data-action="viewItem">{{item.name}}</span>
</div>
</li>

View file

@ -23,7 +23,13 @@ Parameters:
(hasProperty item "toChat" ) "toChat" "editDoc" ) }}' {{#unless hideTooltip}} {{#if (eq type 'attack' )}}
data-tooltip="#attack#{{item.actor.uuid}}" {{else}} data-tooltip="#item#{{item.uuid}}" {{/if}} {{/unless}}>
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" />
<img class="roll-img" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="d20">
{{#if (or item.system.actionsList.size item.system.actionsList.length item.actionType)}}
{{#if @root.isNPC}}
<img class="roll-img d20" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="d20">
{{else}}
<img class="roll-img duality" src="systems/daggerheart/assets/icons/dice/duality/DualityBW.svg" alt="2d12">
{{/if}}
{{/if}}
</div>
{{!-- Name & Tags --}}

View file

@ -3,10 +3,7 @@
data-tab='{{tabs.description.id}}'
data-group='{{tabs.description.group}}'
>
<fieldset>
<legend>{{localize "DAGGERHEART.GENERAL.description"}}</legend>
{{formInput systemFields.description value=document.system.description enriched=enrichedDescription toggled=true}}
</fieldset>
{{formInput systemFields.description value=document.system.description enriched=enrichedDescription toggled=true}}
{{#if (and showAttribution document.system.attribution.artist)}}
<label class="artist-attribution">{{localize "DAGGERHEART.GENERAL.artistAttribution" artist=document.system.attribution.artist}}</label>

View file

@ -1,4 +1,6 @@
<div>
<h2>{{localize "DAGGERHEART.APPLICATIONS.DaggerheartMenu.title"}}</h2>
<fieldset>
<legend>{{localize "Refresh Features"}}</legend>
@ -16,7 +18,9 @@
{{/each}}
</div>
<button data-action="refreshActors" {{disabled disableRefresh}}>{{localize "Refresh"}}</button>
<button data-action="refreshActors" {{disabled disableRefresh}}>{{localize "DAGGERHEART.GENERAL.refresh"}}</button>
</div>
</fieldset>
</div>
<button data-action="editCountdowns">{{localize "DAGGERHEART.APPLICATIONS.DaggerheartMenu.countdowns"}}</button>
</div>

View file

@ -0,0 +1,33 @@
<ul class="daggerheart chat damage-summary">
{{#each targets}}
<li class="token-target-container" data-token="{{this.token.id}}">
<header>
<img src="{{this.token.texture.src}}" />
<h2 class="actor-name">{{this.token.name}}</h2>
</header>
<ul class="damage-container">
{{#each this.updates}}
<li class="damage-row">
{{#if (gte this.value 0)}}
<span>
{{
localize "DAGGERHEART.UI.Chat.markResource"
quantity=this.value
resource=(localize (concat "DAGGERHEART.CONFIG.HealingType." this.key ".name"))
}}
</span>
{{else}}
<span>
{{
localize "DAGGERHEART.UI.Chat.clearResource"
quantity=(positive this.value)
resource=(localize (concat "DAGGERHEART.CONFIG.HealingType." this.key ".name"))
}}
</span>
{{/if}}
</li>
{{/each}}
</ul>
</li>
{{/each}}
</ul>

View file

@ -0,0 +1,33 @@
<div class="daggerheart chat effect-summary">
<div class="effect-header">
<span>{{localize "DAGGERHEART.GENERAL.Effect.plural"}}</span>
</div>
<div class="effects-container">
{{#each effects}}
<details class="effect-target-container">
<summary class="effect-label">
<img class="effect-img" src="{{this.img}}" />
<h2 class="title">{{this.name}}</h2>
<i class="fa-solid fa-chevron-down"></i>
</summary>
<div class="description">
{{{this.description}}}
</div>
</details>
{{/each}}
</div>
{{#if targets}}
<div class="actor-header">
<span>{{localize "DAGGERHEART.UI.Chat.appliedTo"}}</span>
</div>
<div class="targets-container">
{{#each targets}}
<div class="token-target-container" data-token="{{this.id}}">
<img src="{{this.texture.src}}" />
<h2 class="title">{{this.name}}</h2>
</div>
{{/each}}
</div>
{{/if}}
</div>

View file

@ -1,4 +1,7 @@
<div class="combat-tracker">
{{#if (gt this.spotlightRequests.length 0)}}
{{> 'systems/daggerheart/templates/ui/combatTracker/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.GENERAL.SpotlightRequests.plural") turns=this.spotlightRequests}}
{{/if}}
{{#if (gt this.characters.length 0)}}
{{> 'systems/daggerheart/templates/ui/combatTracker/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.GENERAL.Character.plural") turns=this.characters}}
{{/if}}

View file

@ -67,7 +67,6 @@
{{!-- Combat Controls --}}
<div class="inner-controls">
{{#if hasCombat}}
<button data-action="openCountdowns">{{localize "DAGGERHEART.APPLICATIONS.CombatTracker.openCountdowns"}}</button>
<div class="control-buttons right flexrow">
<div class="spacer"></div>
<button type="button" class="encounter-context-menu inline-control combat-control icon fa-solid fa-ellipsis-vertical"

View file

@ -0,0 +1,76 @@
<div>
<div class="edit-container">
<header class="dialog-header">
<h1>{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.editTitle"}}</h1>
</header>
<div class="header-tools">
<button class="header-main-button" data-action="addCountdown"><i class="fa-solid fa-plus"></i> {{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.newCountdown"}}</button>
<div class="hide-tools">
<label>{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.hideNewCountdowns"}}</label>
<input type="checkbox" name="hideNewCountdowns" {{checked hideNewCountdowns}} />
</div>
{{#if isGM}}
<div class="default-ownership-tools">
<i class="fa-solid fa-eye" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.defaultOwnershipTooltip"}}"></i>
<select name="defaultOwnership">
{{selectOptions ownershipDefaultOptions selected=defaultOwnership labelAttr="label" valueAttr="value" localize=true}}
</select>
</div>
{{/if}}
</div>
<div class="edit-content">
{{#each countdowns as | countdown id | }}
<div class="countdown-edit-container {{#unless countdown.editing}}viewing{{/unless}}" data-id="{{id}}">
<a data-action="editCountdownImage" id="{{id}}"><img src="{{countdown.img}}" /></a>
{{#unless countdown.editing}}
<div class="countdown-edit-text">
<h4>{{countdown.name}}</h4>
<div class="countdown-edit-subtext">
<div class="countdown-edit-sub-tag">{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.currentCountdownValue" value=countdown.progress.current}}</div>
<div class="countdown-edit-sub-tag">{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.currentCountdownMax" value=countdown.progress.max}}</div>
<div class="countdown-edit-sub-tag">{{countdown.typeName}}</div>
<div class="countdown-edit-sub-tag">{{countdown.progress.typeName}}</div>
</div>
</div>
{{else}}
<div class="countdown-edit-input">
<label>{{localize "Name"}}</label>
<input type="text" name="{{concat "countdowns." id ".name"}}" value="{{countdown.name}}" />
</div>
{{/unless}}
<div class="countdown-edit-tools {{#if countdown.editing}}same-row{{/if}}">
<a data-action="toggleCountdownEdit" data-countdown-id="{{id}}"><i class="fa-solid {{#unless countdown.editing}}fa-pen-to-square{{else}}fa-check{{/unless}}"></i></a>
<a data-action="editCountdownOwnership" data-countdown-id="{{id}}"><i class="fa-solid fa-users"></i></a>
<a data-action="removeCountdown" data-countdown-id="{{id}}"><i class="fa-solid fa-trash"></i></a>
</div>
</div>
{{#if countdown.editing}}
<div class="countdown-edit-subrow">
<div class="countdown-edit-input tiny">
<label>{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.current"}}</label>
<input type="number" name="{{concat "countdowns." id ".progress.current"}}" value="{{countdown.progress.current}}" />
</div>
<div class="countdown-edit-input tiny">
<label>{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.max"}}</label>
<input type="number" name="{{concat "countdowns." id ".progress.max"}}" value="{{countdown.progress.max}}" />
</div>
<div class="countdown-edit-input">
<label>{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.category"}}</label>
<select name="{{concat "countdowns." id ".type"}}">
{{selectOptions ../countdownBaseTypes selected=countdown.type valueAttr="id" labelAttr="name" localize=true}}
</select>
</div>
<div class="countdown-edit-input">
<label>{{localize "DAGGERHEART.APPLICATIONS.CountdownEdit.type"}}</label>
<select name="{{concat "countdowns." id ".progress.type"}}">
{{selectOptions ../countdownTypes selected=countdown.progress.type valueAttr="id" labelAttr="label" localize=true}}
</select>
</div>
</div>
{{/if}}
{{/each}}
</div>
</div>
</div>

View file

@ -1,45 +1,33 @@
<div>
{{#if simple}}
<div class="minimized-view">
{{#each source.countdowns}}
<a class="mini-countdown-container {{#if (not this.canEdit)}}disabled{{/if}}" data-countdown="{{@key}}">
<img src="{{this.img}}" />
<div class="mini-countdown-name">{{this.name}}</div>
<div class="mini-countdown-value">{{this.progress.current}}/{{this.progress.max}}</div>
</a>
{{/each}}
</div>
{{else}}
<div class="expanded-view">
<div class="countdowns-menu">
{{#if canCreate}}<button class="flex" data-action="addCountdown">{{localize "DAGGERHEART.APPLICATIONS.Countdown.addCountdown"}}</button>{{/if}}
{{#if isGM}}<button data-action="openOwnership" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Countdown.openOwnership"}}"><i class="fa-solid fa-users"></i></button>{{/if}}
</div>
<div class="countdowns-container">
{{#each source.countdowns}}
<fieldset class="countdown-fieldset">
<legend>
{{this.name}}
{{#if this.canEdit}}<a><i class="fa-solid fa-trash icon-button" data-action="removeCountdown" data-countdown="{{@key}}"></i></a>{{/if}}
{{#if @root.isGM}}<a><i class="fa-solid fa-users icon-button" data-action="openCountdownOwnership" data-countdown="{{@key}}" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Countdown.openOwnership"}}"></i></a>{{/if}}
</legend>
<div class="countdown-container">
<img src="{{this.img}}" {{#if this.canEdit}}data-action='editImage'{{else}}class="disabled"{{/if}} data-countdown="{{@key}}" />
<div class="countdown-inner-container">
{{formGroup @root.countdownFields.name name=(concat @root.base ".countdowns." @key ".name") value=this.name localize=true disabled=(not this.canEdit)}}
<div class="countdown-value-container">
{{formGroup @root.countdownFields.progress.fields.current name=(concat @root.base ".countdowns." @key ".progress.current") value=this.progress.current localize=true disabled=(not this.canEdit)}}
{{formGroup @root.countdownFields.progress.fields.max name=(concat @root.base ".countdowns." @key ".progress.max") value=this.progress.max localize=true disabled=(not this.canEdit)}}
</div>
{{formGroup @root.countdownFields.progress.fields.type.fields.value name=(concat @root.base ".countdowns." @key ".progress.type.value") value=this.progress.type.value localize=true localize=true disabled=(not this.canEdit)}}
<div class="countdowns-container">
{{#each countdowns as | countdown id |}}
<div class="countdown-container {{#if ../iconOnly}}icon-only{{/if}}">
<div class="countdown-main-container">
<img src="{{countdown.img}}" {{#if ../iconOnly}}data-tooltip="{{countdown.name}}"{{/if}}/>
<div class="countdown-content">
{{#unless ../iconOnly}}<label>{{countdown.name}}</label>{{/unless}}
<div class="countdown-tools">
{{#if countdown.editable}}<a data-action="decreaseCountdown" id="{{id}}"><i class="fa-solid fa-minus"></i></a>{{/if}}
<div class="progress-tag">
{{countdown.progress.current}}/{{countdown.progress.max}}
</div>
{{#if countdown.editable}}<a data-action="increaseCountdown" id="{{id}}"><i class="fa-solid fa-plus"></i></a>{{/if}}
</div>
</fieldset>
{{/each}}
</div>
</div>
{{#if (and @root.isGM (not ../iconOnly))}}
{{#if (gt countdown.playerAccess.length 0)}}
<div class="countdown-access-container">
{{#each countdown.playerAccess as |player|}}
<div class="countdown-access" style="{{concat "background: " player.color.css ";"}}" data-tooltip="{{player.name}}"></div>
{{/each}}
</div>
{{/if}}
{{#if countdown.noPlayerAccess}}
<div class="countdown-no-access-container"><i class="fa-solid fa-eye-slash" data-tooltip="{{localize "DAGGERHEART.UI.Countdowns.noPlayerAccess"}}"></i></div>
{{/if}}
{{/if}}
</div>
</div>
{{/if}}
{{/each}}
</div>
</div>