diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js index 97273133..52c6f7ca 100644 --- a/module/rdd-calendrier.js +++ b/module/rdd-calendrier.js @@ -167,12 +167,17 @@ export class RdDCalendrier extends Application { }); } - /* -------------------------------------------- */ + /* -------------------------------------------- */ getNombreAstral(indexDate) { - let liste = this.listeNombreAstral ?? this._loadListNombreAstral(); - if ( typeof(liste) != 'Array' || liste.length == 0 ) { - this.rebuildListeNombreAstral(); - liste = this.listeNombreAstral; + if ( this.listeNombreAstral == undefined ) { + this.listeNombreAstral = this._loadListNombreAstral(); + } + let liste = this.listeNombreAstral; + if ( game.user.isGM ) { + if ( typeof(liste) != 'Array' || liste.length == 0 ) { + this.rebuildListeNombreAstral(); + liste = this.listeNombreAstral; + } } let astralData = liste.find((nombreAstral, i) => nombreAstral.index == indexDate); return astralData?.nombreAstral; diff --git a/system.json b/system.json index 97d76fe6..c2e1b1ff 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "1.4.25", + "version": "1.4.26", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "0.8.99",