From 8cd5d7f2769af268f10f9da9d842f76d30f3c7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Sat, 10 Apr 2021 14:43:45 +0200 Subject: [PATCH] Migrate Drag Ruler to Terrain Ruler's new API --- src/compatibility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compatibility.js b/src/compatibility.js index 268fba7..c005d54 100644 --- a/src/compatibility.js +++ b/src/compatibility.js @@ -17,7 +17,7 @@ export function highlightMeasurementTerrainRuler(ray, startDistance, tokenShape= export function measureDistances(segments, token, shape, gridSpaces=true) { const terrainRulerAvailable = game.modules.get("terrain-ruler")?.active && canvas.grid.type !== CONST.GRID_TYPES.GRIDLESS; if (terrainRulerAvailable) - return game.terrainRuler.measureDistances(segments, {costFunction: (x, y) => getCostFromSpeedProvider(token, getAreaFromPositionAndShape({x, y}, shape), {x, y})}); + return terrainRuler.measureDistances(segments, {costFunction: (x, y) => getCostFromSpeedProvider(token, getAreaFromPositionAndShape({x, y}, shape), {x, y})}); else return canvas.grid.measureDistances(segments, { gridSpaces }); }