Fix Calendar for Foundry 0.8.2

This commit is contained in:
raphaelpieroni 2021-05-01 17:33:01 +02:00
parent caeff1e82a
commit 3c6d286713

View File

@ -41,6 +41,7 @@ export class RdDCalendrier extends Application {
this.calendrier = duplicate(game.settings.get("foundryvtt-reve-de-dragon", "calendrier")); this.calendrier = duplicate(game.settings.get("foundryvtt-reve-de-dragon", "calendrier"));
//console.log("CALENDRIER", this.calendrier); //console.log("CALENDRIER", this.calendrier);
if (this.calendrier == undefined || this.calendrier.moisRdD == undefined) { if (this.calendrier == undefined || this.calendrier.moisRdD == undefined) {
this.calendrier = {};
this.calendrier.heureRdD = 0; // Index dans heuresList this.calendrier.heureRdD = 0; // Index dans heuresList
this.calendrier.minutesRelative = 0; this.calendrier.minutesRelative = 0;
this.calendrier.moisRdD = 0; // Index dans heuresList this.calendrier.moisRdD = 0; // Index dans heuresList
@ -52,6 +53,7 @@ export class RdDCalendrier extends Application {
// position // position
this.calendrierPos = duplicate(game.settings.get("foundryvtt-reve-de-dragon", "calendrier-pos")); this.calendrierPos = duplicate(game.settings.get("foundryvtt-reve-de-dragon", "calendrier-pos"));
if (this.calendrierPos == undefined || this.calendrierPos.top == undefined) { if (this.calendrierPos == undefined || this.calendrierPos.top == undefined) {
this.calendrierPos = {};
this.calendrierPos.top = 200; this.calendrierPos.top = 200;
this.calendrierPos.left = 200; this.calendrierPos.left = 200;
if (game.user.isGM) { // Uniquement si GM if (game.user.isGM) { // Uniquement si GM