From e63ee1988d706bb3c5c8e20f4e86dd960dc78654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Tue, 18 May 2021 12:47:52 +0200 Subject: [PATCH] Deprecate the old (prior to 1.3.0) Drag Ruler API --- CHANGELOG.md | 3 +++ src/api.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2335404..9c49ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ ### Translation - Corrected typos in the german translation (thanks to CarnVanBeck!) +### API +- The old API that Drag Ruler offered prior to version 1.3.0 is now deprecated. Speed Providers that still use this API will continue to work for now, but will generate a warning in the console about the deprecation. All modules and game systems offered on the FoundryVTT website have already updated to the new API. If you see the deprecation warning, please consider updating to the current version of the respective system/module you're using. + ## 1.6.5 ### Bugfixes diff --git a/src/api.js b/src/api.js index 3c417ed..18f94cb 100644 --- a/src/api.js +++ b/src/api.js @@ -14,6 +14,9 @@ function register(module, type, speedProvider) { providerInstance = new speedProvider(id) } else { + console.warn(`Drag Ruler | The ${type} '${module.id}' uses the old, deprecated version of the Drag Ruler API. ` + + "That old API will be removed in a future Drag Ruler version. " + + `Please update the ${type} ${module.id} to stay compatible with future Drag Ruler versions.`); speedProvider.id = id speedProvider.usesRuler = () => true providerInstance = speedProvider