diff --git a/module.json b/module.json index 13e0e99..99e9e92 100644 --- a/module.json +++ b/module.json @@ -1,6 +1,6 @@ { - "name": "drag-ruler", - "title": "Drag Ruler", + "name": "drag-ruler-alpha", + "title": "Drag Ruler (Alpha Branch)", "description": "When dragging a token displays a ruler showing how far you've moved that token.", "version": "1.8.2", "minimumCoreVersion" : "0.8.5", @@ -59,10 +59,10 @@ ], "socket": true, "url": "https://github.com/manuelVo/foundryvtt-drag-ruler", - "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.8.2.zip", - "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json", - "readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md", - "changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md", + "download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/alpha.zip", + "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/alpha/module.json", + "readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/alpha/README.md", + "changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/alpha/CHANGELOG.md", "bugs": "https://github.com/manuelVo/foundryvtt-drag-ruler/issues", - "allowBugReporter": true + "allowBugReporter": false } diff --git a/src/main.js b/src/main.js index 94503f6..4065a26 100644 --- a/src/main.js +++ b/src/main.js @@ -32,6 +32,14 @@ Hooks.once("init", () => { }) Hooks.once("ready", () => { + { + const alphaWarning = "You are using the alpha branch of Drag Ruler. DO NOT USE IT IN PRODUCTION ENVIRONMENTS. This branch is used for pre-release testing. As a result this branch will only be updated sporadically and may be siginificantly newer (or even older) than the main Drag Ruler release branch. In addition this branch is likely to be likely to contain more bugs."; + console.warn(alphaWarning) + ui.notifications.warn(alphaWarning) + if (game.modules.get("drag-ruler")?.active) { + ui.notification.error("You have both the release version and the alpha version of Drag Ruler enabled. Doing so prevents the module from working properly. Please disable either the release or the alpha version of Drag Ruler.", {permanent: true}); + } + } performMigrations() checkDependencies(); Hooks.callAll("dragRuler.ready", SpeedProvider) diff --git a/src/socket.js b/src/socket.js index f610fb5..966630f 100644 --- a/src/socket.js +++ b/src/socket.js @@ -3,7 +3,7 @@ import {currentSpeedProvider} from "./api.js"; let socket; Hooks.once("socketlib.ready", () => { - socket = socketlib.registerModule("drag-ruler"); + socket = socketlib.registerModule("drag-ruler-alpha"); socket.register("updateCombatantDragRulerFlags", _socketUpdateCombatantDragRulerFlags); socket.register("recalculate", _socketRecalculate); });