Merge branch 'main' into feature/56-Level-Up-Overview

This commit is contained in:
WBHarry 2025-06-07 00:30:07 +02:00
commit fafca7f2fc
2 changed files with 8 additions and 4 deletions

View file

@ -30,8 +30,8 @@ export default class DhCombatTracker extends foundry.applications.sidebar.tabs.C
async _prepareTrackerContext(context, options) {
await super._prepareTrackerContext(context, options);
const adversaries = context.turns.filter(x => x.isNPC);
const characters = context.turns.filter(x => !x.isNPC);
const adversaries = context.turns?.filter(x => x.isNPC) ?? [];
const characters = context.turns?.filter(x => !x.isNPC) ?? [];
Object.assign(context, {
actionTokens: game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.variantRules).actionTokens,

View file

@ -1,4 +1,8 @@
<div class="combat-tracker">
{{> 'systems/daggerheart/templates/ui/combat/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.General.Character.Plural") turns=this.characters}}
{{> 'systems/daggerheart/templates/ui/combat/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.General.Adversary.Plural") turns=this.adversaries}}
{{#if (gt this.characters.length 0)}}
{{> 'systems/daggerheart/templates/ui/combat/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.General.Character.Plural") turns=this.characters}}
{{/if}}
{{#if (gt this.adversaries.length 0)}}
{{> 'systems/daggerheart/templates/ui/combat/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.General.Adversary.Plural") turns=this.adversaries}}
{{/if}}
</div>