From 47ae15778199f4b86eeb45385df47d85bedc8ae7 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 24 May 2021 09:35:49 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20pour=20mont=C3=A9e=20TMR=20en=20double?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 5 +++++ module/rdd-tmr-dialog.js | 1 + 2 files changed, 6 insertions(+) diff --git a/module/actor.js b/module/actor.js index 3f1765f6..497bd73d 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2450,6 +2450,11 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async displayTMR(mode = "normal") { + if (this.currentTMR != undefined && !this.currentTMR.isClosed) { + ui.notifications.warn('Vous êtes déja dans les Terres Médianes !'); + return; + } + let isRapide = mode == "rapide"; if (mode != "visu") { let minReveValue = (isRapide && !EffetsDraconiques.isDeplacementAccelere(this) ? 3 : 2) + this.countMonteeLaborieuse(); diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index 92329451..01a0d3d6 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -206,6 +206,7 @@ export class RdDTMRDialog extends Dialog { if (!this.viewOnly) { this._tellToGM(this.actor.name + " a quitté les terres médianes"); } + this.isClosed = true; }