Compare commits

..

2 Commits

Author SHA1 Message Date
Manuel Vögele 4b68b82590 Release v1.5.1 2021-04-15 17:19:32 +02:00
Manuel Vögele 447995977b Don't show the difficult terrain measurement hint when no terrain module is enabled 2021-04-15 17:17:38 +02:00
3 changed files with 25 additions and 18 deletions
+5
View File
@@ -1,3 +1,8 @@
## 1.5.1
### 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 ## 1.5.0
### New features ### 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. - 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 -2
View File
@@ -2,7 +2,7 @@
"name": "drag-ruler", "name": "drag-ruler",
"title": "Drag Ruler", "title": "Drag Ruler",
"description": "When dragging a token displays a ruler showing how far you've moved that token.", "description": "When dragging a token displays a ruler showing how far you've moved that token.",
"version": "1.5.0", "version": "1.5.1",
"minimumCoreVersion" : "0.7.9", "minimumCoreVersion" : "0.7.9",
"compatibleCoreVersion" : "0.7.9", "compatibleCoreVersion" : "0.7.9",
"authors": [ "authors": [
@@ -49,7 +49,7 @@
], ],
"socket": true, "socket": true,
"url": "https://github.com/manuelVo/foundryvtt-drag-ruler", "url": "https://github.com/manuelVo/foundryvtt-drag-ruler",
"download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.5.0.zip", "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.5.1.zip",
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json", "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json",
"readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md", "readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md",
"changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md", "changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md",
+18 -16
View File
@@ -61,23 +61,25 @@ export function checkDependencies() {
else if (game.modules.get("TerrainLayer")?.active) { else if (game.modules.get("TerrainLayer")?.active) {
enabledTerrainModule = game.modules.get("TerrainLayer").data.title; enabledTerrainModule = game.modules.get("TerrainLayer").data.title;
} }
new Dialog({ if (enabledTerrainModule) {
title: game.i18n.localize("drag-ruler.dependencies.terrain-ruler.title"), new Dialog({
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>`, title: game.i18n.localize("drag-ruler.dependencies.terrain-ruler.title"),
buttons: { 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>`,
ok: { buttons: {
icon: '<i class="fas fa-check"></i>', ok: {
label: game.i18n.localize("drag-ruler.dependencies.ok"), icon: '<i class="fas fa-check"></i>',
callback: () => game.settings.set(settingsKey, "lastTerrainRulerHintTime", Date.now()), label: game.i18n.localize("drag-ruler.dependencies.ok"),
callback: () => game.settings.set(settingsKey, "lastTerrainRulerHintTime", Date.now()),
},
neverShowAgain: {
icon: '<i class="fas fa-times"></i>',
label: game.i18n.localize("drag-ruler.dependencies.terrain-ruler.neverShowAgain"),
callback: () => game.settings.set(settingsKey, "neverShowTerrainRulerHint", true),
}
}, },
neverShowAgain: { close: () => game.settings.set(settingsKey, "lastTerrainRulerHintTime", Date.now())
icon: '<i class="fas fa-times"></i>', }).render(true);
label: game.i18n.localize("drag-ruler.dependencies.terrain-ruler.neverShowAgain"), }
callback: () => game.settings.set(settingsKey, "neverShowTerrainRulerHint", true),
}
},
close: () => game.settings.set(settingsKey, "lastTerrainRulerHintTime", Date.now())
}).render(true);
} }
} }
} }