From 96fc42e537c5cbbda02ae784eb0fffa53a15ca5d Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 24 May 2021 09:39:42 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20sur=20double=20mont=C3=A9e=20en=20TMR?= =?UTF-8?q?=C3=A9?= 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 + system.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/module/actor.js b/module/actor.js index 1b0a41e1..2381485c 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2919,6 +2919,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 f761d3a4..d5646460 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -277,6 +277,7 @@ export class RdDTMRDialog extends Dialog { if (!this.viewOnly) { this._tellToGM(this.actor.name + " a quitté les terres médianes"); } + ths.isClosed = true; } /* -------------------------------------------- */ diff --git a/system.json b/system.json index abdd9c7e..abff3cd8 100644 --- a/system.json +++ b/system.json @@ -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.6", + "version": "1.4.7", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "0.8.5",