Fixe calendrier again

This commit is contained in:
sladecraven 2021-06-05 23:26:03 +02:00
parent 71ce90aa4e
commit dc09e58b08
2 changed files with 11 additions and 6 deletions

View File

@ -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;

View File

@ -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",