Version 11.2.9 - La barbe d'Akarlikarlikar #690

Merged
uberwald merged 7 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2023-12-09 16:23:41 +01:00
2 changed files with 10 additions and 8 deletions
Showing only changes of commit 56a5d06f16 - Show all commits

View File

@ -162,9 +162,11 @@ export class RdDTMRDialog extends Dialog {
} }
async forceTMRDisplay() { async forceTMRDisplay() {
this.bringToTop() if (this.rendered) {
if (this.subdialog?.bringToTop) { this.bringToTop()
this.subdialog.bringToTop(); if (this.subdialog?.bringToTop) {
this.subdialog.bringToTop();
}
} }
} }
@ -581,7 +583,7 @@ export class RdDTMRDialog extends Dialog {
} }
this.descenteTMR = false; this.descenteTMR = false;
this.currentRencontre = undefined; this.currentRencontre = undefined;
if (this._presentCite(tmr)) { if (await this._presentCite(tmr)) {
return; return;
} }
this.currentRencontre = await this._jetDeRencontre(tmr); this.currentRencontre = await this._jetDeRencontre(tmr);
@ -592,7 +594,7 @@ export class RdDTMRDialog extends Dialog {
} }
else { else {
const dialog = new RdDTMRRencontreDialog(this.actor, this.currentRencontre, tmr); const dialog = new RdDTMRRencontreDialog(this.actor, this.currentRencontre, tmr);
dialog.render(true); await dialog.render(true);
this.setTMRPendingAction(dialog); this.setTMRPendingAction(dialog);
} }
} }
@ -602,11 +604,11 @@ export class RdDTMRDialog extends Dialog {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
_presentCite(tmr) { async _presentCite(tmr) {
const presentCite = this.casesSpeciales.find(c => EffetsDraconiques.presentCites.isCase(c, tmr.coord)); const presentCite = this.casesSpeciales.find(c => EffetsDraconiques.presentCites.isCase(c, tmr.coord));
if (presentCite) { if (presentCite) {
const caseData = presentCite; const caseData = presentCite;
const dialog = EffetsDraconiques.presentCites.choisirUnPresent(caseData, present => { const dialog = await EffetsDraconiques.presentCites.choisirUnPresent(caseData, present => {
this._utiliserPresentCite(presentCite, present, tmr) this._utiliserPresentCite(presentCite, present, tmr)
this.restoreTMRAfterAction(); this.restoreTMRAfterAction();
}); });

View File

@ -49,7 +49,7 @@ export class PresentCites extends Draconique {
content: `La ${this.tmrLabel(casetmr)} vous offre un présent, faites votre choix`, content: `La ${this.tmrLabel(casetmr)} vous offre un présent, faites votre choix`,
buttons: buttons buttons: buttons
}); });
dialog.render(true); await dialog.render(true);
return dialog return dialog
} }