mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
add indication of long term countdowns
This commit is contained in:
parent
5b0b1023f6
commit
a02ca40f87
3 changed files with 30 additions and 2 deletions
|
|
@ -92,8 +92,7 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
ownership: DhCountdowns.#getPlayerOwnership(game.user, setting, countdown)
|
||||
}));
|
||||
return values.filter(v =>
|
||||
v.ownership !== CONST.DOCUMENT_OWNERSHIP_LEVELS.NONE &&
|
||||
this.#shouldShowCountdown(v.countdown)
|
||||
v.ownership !== CONST.DOCUMENT_OWNERSHIP_LEVELS.NONE
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -156,6 +155,13 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
acc[key]=countdown;
|
||||
return acc;
|
||||
}, {});
|
||||
context.hasHiddenLongTerm = !this._isFocused && allCountdowns.some(
|
||||
({countdown}) => countdown.type === CONFIG.DH.GENERAL.countdownBaseTypes.longterm.id
|
||||
);
|
||||
console.log('Debug - isFocused:', this._isFocused);
|
||||
console.log('Debug - hasHiddenLongTerm:', context.hasHiddenLongTerm);
|
||||
console.log('Debug - allCountdowns:', allCountdowns);
|
||||
console.log('Debug - longterm countdowns:', allCountdowns.filter(({countdown}) => countdown.type === CONFIG.DH.GENERAL.countdownBaseTypes.longterm.id));
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue