This commit is contained in:
WBHarry 2025-09-21 23:12:16 +02:00
parent 49adeed8c5
commit 83709e334d
8 changed files with 63 additions and 17 deletions

View file

@ -181,11 +181,21 @@ export class DhCountdown extends foundry.abstract.DataModel {
};
}
static defaultCountdown(type) {
static defaultCountdown(type, playerHidden) {
const ownership = playerHidden
? game.users.reduce((acc, user) => {
if (!user.isGM) {
acc[user.id] = CONST.DOCUMENT_OWNERSHIP_LEVELS.NONE;
}
return acc;
}, {})
: undefined;
return {
type: type ?? CONFIG.DH.GENERAL.countdownBaseTypes.narrative.id,
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Countdown.newCountdown'),
img: 'icons/magic/time/hourglass-yellow-green.webp',
ownership: ownership,
progress: {
current: 1,
max: 1