diff --git a/CHANGELOG.md b/CHANGELOG.md index 457db95..5f203de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ### 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. +### Module compatibility +- Drag Ruler is now fully compatible with the `Enhanced Terrain Layer` module. ([#50](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/50)) + ## 1.4.5 ### Bugfixes diff --git a/src/speed_provider.js b/src/speed_provider.js index 58a8d2c..5623e76 100644 --- a/src/speed_provider.js +++ b/src/speed_provider.js @@ -67,7 +67,7 @@ export class SpeedProvider { */ getCostForStep(token, area) { // Lookup the cost for each square occupied by the token - const costs = area.map(space => canvas.terrain.costGrid[space.y]?.[space.x]?.multiple ?? 1) + const costs = area.map(space => terrainRuler.getCost(space.x, space.y, {token})); // Return the maximum of the costs return costs.reduce((max, current) => Math.max(max, current)) }