Don't show the difficult terrain measurement hint when no terrain module is enabled

This commit is contained in:
Manuel Vögele
2021-04-15 17:17:38 +02:00
parent 9e5b344b0d
commit 447995977b
2 changed files with 23 additions and 16 deletions
+5
View File
@@ -1,3 +1,8 @@
## In development
### Bugfixes
- The hint that tells users how to enable difficult terrain measurement in Drag Ruler is no longer shown if no terrain layer module is installed.
## 1.5.0
### New features
- In combat Drag Ruler will now remember the path that was taken by a token during the turn. Picking the token up during the same turn will continue the previous measurement, taking steps that are already taken into account.
+2
View File
@@ -61,6 +61,7 @@ export function checkDependencies() {
else if (game.modules.get("TerrainLayer")?.active) {
enabledTerrainModule = game.modules.get("TerrainLayer").data.title;
}
if (enabledTerrainModule) {
new Dialog({
title: game.i18n.localize("drag-ruler.dependencies.terrain-ruler.title"),
content: `<h2>${game.i18n.localize("drag-ruler.dependencies.terrain-ruler.title")}</h2><p>${game.i18n.format("drag-ruler.dependencies.terrain-ruler.text", {moduleName: enabledTerrainModule})}</p>`,
@@ -81,4 +82,5 @@ export function checkDependencies() {
}
}
}
}