diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f81789..ef35fde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## In development +### Compatiblilty +- Drag Ruler's Generic Speed Provider is now able to work with game systems that put non-number characters behind the tokens movement speed (like `30ft.`). One example for such a game system is Dungeon Crawl Classics. ([#60](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/60)) + + ## 1.5.2 ### Bugfixes - Drag Ruler no longer prevents tokens that don't have an actor from being moved. ([#58](https://github.com/manuelVo/foundryvtt-drag-ruler/issues/58)) diff --git a/src/speed_provider.js b/src/speed_provider.js index 5623e76..6ffcb47 100644 --- a/src/speed_provider.js +++ b/src/speed_provider.js @@ -124,7 +124,7 @@ export class GenericSpeedProvider extends SpeedProvider { const speedAttribute = this.getSetting("speedAttribute") if (!speedAttribute) return [] - const tokenSpeed = getProperty(token, speedAttribute) + const tokenSpeed = parseInt(getProperty(token, speedAttribute)); if (tokenSpeed === undefined) { console.warn(`Drag Ruler (Generic Speed Provider) | The configured token speed attribute "${speedAttribute}" didn't return a speed value. To use colors based on drag distance set the setting to the correct value (or clear the box to disable this feature).`) return []