Ajout await à l'init
This commit is contained in:
parent
2336289f5a
commit
575b8a0a30
@ -175,9 +175,6 @@ export class RdDCalendrier extends Application {
|
|||||||
liste = this.listeNombreAstral;
|
liste = this.listeNombreAstral;
|
||||||
}
|
}
|
||||||
let astralData = liste.find((nombreAstral, i) => nombreAstral.index == indexDate);
|
let astralData = liste.find((nombreAstral, i) => nombreAstral.index == indexDate);
|
||||||
if (!astralData?.nombreAstral) {
|
|
||||||
this.rebuildListeNombreAstral();
|
|
||||||
}
|
|
||||||
return astralData?.nombreAstral;
|
return astralData?.nombreAstral;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +211,7 @@ export class RdDCalendrier extends Application {
|
|||||||
else if (calendarSet) {
|
else if (calendarSet) {
|
||||||
this.positionnerHeure(Number(calendarSet.value));
|
this.positionnerHeure(Number(calendarSet.value));
|
||||||
}
|
}
|
||||||
await this.updateDisplay();
|
this.updateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -226,7 +223,7 @@ export class RdDCalendrier extends Application {
|
|||||||
}
|
}
|
||||||
if (this.calendrier.heureRdD > 11) {
|
if (this.calendrier.heureRdD > 11) {
|
||||||
this.calendrier.heureRdD -= 12;
|
this.calendrier.heureRdD -= 12;
|
||||||
await this.incrementerJour();
|
this.incrementerJour();
|
||||||
}
|
}
|
||||||
game.settings.set("foundryvtt-reve-de-dragon", "calendrier", duplicate(this.calendrier));
|
game.settings.set("foundryvtt-reve-de-dragon", "calendrier", duplicate(this.calendrier));
|
||||||
// Notification aux joueurs
|
// Notification aux joueurs
|
||||||
|
@ -210,7 +210,7 @@ function messageDeBienvenue() {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
Hooks.once("ready", function () {
|
Hooks.once("ready", async function () {
|
||||||
|
|
||||||
StatusEffects.onReady();
|
StatusEffects.onReady();
|
||||||
RdDHerbes.initializeHerbes();
|
RdDHerbes.initializeHerbes();
|
||||||
@ -218,7 +218,7 @@ Hooks.once("ready", function () {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Affiche/Init le calendrier */
|
/* Affiche/Init le calendrier */
|
||||||
let calendrier = new RdDCalendrier();
|
let calendrier = new RdDCalendrier();
|
||||||
calendrier.initCalendrier();
|
await calendrier.initCalendrier();
|
||||||
let templatePath = "systems/foundryvtt-reve-de-dragon/templates/calendar-template.html";
|
let templatePath = "systems/foundryvtt-reve-de-dragon/templates/calendar-template.html";
|
||||||
let templateData = {};
|
let templateData = {};
|
||||||
renderTemplate(templatePath, templateData).then(html => {
|
renderTemplate(templatePath, templateData).then(html => {
|
||||||
|
Loading…
Reference in New Issue
Block a user