Various fixes

This commit is contained in:
2020-07-26 17:06:06 +02:00
parent b9baa32d02
commit 0fecc3a202
7 changed files with 14 additions and 63 deletions

View File

@ -28,6 +28,7 @@ export class RdDTMRDialog extends Dialog {
dialogConf.title = "Terres Médianes de Rêve",
dialogOptions.width = 920;
dialogOptions.height = 960;
dialogOptions['z-index'] = 20;
super(dialogConf, dialogOptions);
@ -91,7 +92,6 @@ export class RdDTMRDialog extends Dialog {
if (result == "souffle") {
let souffle = TMRUtility.getSouffle();
}
await this.maximize();
console.log("-> refouler", this.currentRencontre)
this.updateValuesDisplay();
}
@ -99,7 +99,6 @@ export class RdDTMRDialog extends Dialog {
async matriser(data) {
this.actor.deleteTMRRencontreAtPosition( ); // Remove the stored rencontre if necessary
this.updatePreviousRencontres();
await this.maximize();
let draconic = this.actor.getBestDraconic();
let carac = this.actor.getCurrentReve();
@ -110,11 +109,16 @@ export class RdDTMRDialog extends Dialog {
myroll.roll();
if ( myroll.total > scoreDef.score ) {
TMRUtility.processRencontreEchec( this.actor, this.rencontre);
ChatMessage.create( { title: "TMR", content: game.user.name + " a perdu sa rencontre.", user: game.user._id, whisper: ChatMessage.getWhisperRecipients("GM") } );
ChatMessage.create( { title: "TMR", content: "Vous avez <strong>échoué</strong> à votre maîtrise d'un " . this.currentRencontre.name + " de force " +
this.currentRencontre.force +
"<br>Vous quittez brutalement les Terres Médianes !",
user: game.user._id, whisper: [ game.user ] } );
ChatMessage.create( { title: "TMR", content: game.user.name + " a perdu sa rencontre contre : " + this.currentRencontre.name + " de force " + this.currentRencontre.force, user: game.user._id, whisper: ChatMessage.getWhisperRecipients("GM") } );
this.close();
} else {
TMRUtility.processRencontreReussite( this.actor, this.rencontre);
ChatMessage.create( { title: "TMR", content: game.user.name + " a gagné sa rencontre.", user: game.user._id, whisper: ChatMessage.getWhisperRecipients("GM") } );
ChatMessage.create( { title: "TMR", content: "Vous avez <strong>réussi</strong> votre maîtrise d'un " + this.currentRencontre.name + " de force " + this.currentRencontre.force, user: game.user._id, whisper: [ game.user ] } );
ChatMessage.create( { title: "TMR", content: game.user.name + " a gagné sa rencontre contre : " + this.currentRencontre.name + " de force " + this.currentRencontre.force, user: game.user._id, whisper: ChatMessage.getWhisperRecipients("GM") } );
}
console.log("-> matriser", this.currentRencontre);
this.updateValuesDisplay();
@ -145,7 +149,6 @@ export class RdDTMRDialog extends Dialog {
if (rencontre) { // Manages it
this.currentRencontre = duplicate(rencontre);
await this.minimize();
let diag = new Dialog( { title: "Rencontre en TMR!",
content: "Vous recontrez un " + rencontre.name + " de force " + rencontre.force + "<br>",
buttons: {
@ -198,8 +201,6 @@ export class RdDTMRDialog extends Dialog {
manageCaseHumideResult() {
if ( this.toclose )
this.close();
else
this.maximize();
}
/* -------------------------------------------- */
@ -242,7 +243,6 @@ export class RdDTMRDialog extends Dialog {
}
}
);
await this.minimize();
humideDiag.render(true);
}
}