Use parseInt on the speed attribute to increase compatibility with game systems (resolves #60)

This commit is contained in:
Manuel Vögele
2021-04-20 16:59:06 +02:00
parent 1faeda6f47
commit 4be6730fd5
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -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 []