Reset des nombre astraux
This commit is contained in:
parent
cc8f432746
commit
020824af7e
@ -9,6 +9,7 @@ export class RdDAstrologieEditeur extends Dialog {
|
||||
constructor(html, calendrier, calendrierData) {
|
||||
|
||||
let myButtons = {
|
||||
resetButton: { label: "Re-tirer les nombres astraux", callback: html => this.resetNombreAstraux() },
|
||||
saveButton: { label: "Fermer", callback: html => this.fillData() }
|
||||
};
|
||||
|
||||
@ -21,6 +22,14 @@ export class RdDAstrologieEditeur extends Dialog {
|
||||
this.updateData( calendrierData );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
resetNombreAstraux() {
|
||||
game.system.rdd.calendrier.resetNombreAstral();
|
||||
game.system.rdd.calendrier.rebuildListeNombreAstral();
|
||||
|
||||
game.system.rdd.calendrier.showAstrologieEditor();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
fillData( ) {
|
||||
}
|
||||
|
@ -135,6 +135,12 @@ export class RdDCalendrier extends Application {
|
||||
return astralData?.nombreAstral ?? "N/A";
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
resetNombreAstral( ) {
|
||||
this.listeNombreAstral = [];
|
||||
game.settings.set("foundryvtt-reve-de-dragon", "liste-nombre-astral", this.listeNombreAstral);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
rebuildListeNombreAstral() {
|
||||
let jourCourant = this.getCurrentDayIndex();
|
||||
@ -150,6 +156,7 @@ export class RdDCalendrier extends Application {
|
||||
this.listeNombreAstral = newList;
|
||||
game.settings.set("foundryvtt-reve-de-dragon", "liste-nombre-astral", this.listeNombreAstral);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
onCalendarButton(ev) {
|
||||
ev.preventDefault();
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||
"version": "1.3.52",
|
||||
"version": "1.3.53",
|
||||
"manifestPlusVersion": "1.0.0",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
|
Loading…
Reference in New Issue
Block a user