Make the multi-turn indicator work fully

This commit is contained in:
Oliver-Akins 2025-02-15 01:43:25 -07:00
parent c549a59c13
commit e1be6675e0
6 changed files with 76 additions and 28 deletions

View file

@ -10,9 +10,9 @@ export class RipCryptCombatTracker extends CombatTracker {
turn.hasDecimals = true;
turn.initiative = combatant.dynamicInitiative;
const groupKey = combatant.groupKey;
const groupKey = combatant?.groupKey;
if (groupKey && combat.started) {
turn.active ||= combat.combatant.groupKey === groupKey;
turn.active ||= combat.combatant?.groupKey === groupKey;
if (turn.active && !turn.css.includes(`active`)) {
turn.css += `active`;
};