Fix startup calendar

# Conflicts:
#	system.json
This commit is contained in:
sladecraven 2021-06-25 13:24:43 +02:00 committed by Vincent Vandemeulebrouck
parent cb91cb4842
commit 5e5e391e8d

View File

@ -88,7 +88,7 @@ export class RdDCalendrier extends Application {
// nombre astral // nombre astral
if (game.user.isGM) { if (game.user.isGM) {
this.listeNombreAstral = this._loadListNombreAstral(); this.listeNombreAstral = this._loadListNombreAstral();
await this.rebuildListeNombreAstral(); // Ensure always up-to-date await this.rebuildListeNombreAstral(undefined, false); // Ensure always up-to-date
} }
console.log(this.calendrier, this.calendrierPos, this.listeNombreAstral); console.log(this.calendrier, this.calendrierPos, this.listeNombreAstral);
} }
@ -197,7 +197,7 @@ export class RdDCalendrier extends Application {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async rebuildListeNombreAstral( raison = 'incjour') { async rebuildListeNombreAstral( raison = 'incjour', showDice = true) {
if (game.user.isGM) { if (game.user.isGM) {
let jourCourant = this.getCurrentDayIndex(); let jourCourant = this.getCurrentDayIndex();
@ -208,7 +208,7 @@ export class RdDCalendrier extends Application {
if (na) { if (na) {
newList[i] = duplicate(na); newList[i] = duplicate(na);
} else { } else {
newList[i] = await this.ajouterNombreAstral(dayIndex, raison == 'incjour' ); newList[i] = await this.ajouterNombreAstral(dayIndex, showDice );
} }
} }
console.log("SAVE list", newList, jourCourant); console.log("SAVE list", newList, jourCourant);