Inform the user about incompatibilities between Smart Doors and Arms Reach and offer help for conflict resolution
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
## In development
|
## In development
|
||||||
### Bugfix
|
### Bugfix
|
||||||
- Disabled features are now less likely to interfere with other modules, increasing compatibility.
|
- Disabled features are now less likely to interfere with other modules, increasing compatibility.
|
||||||
- This module can now be used together with the `Arms Reach` module if the `Toggle Secret Doors` feature is disabled in the settings.
|
- This module can now be used together with the `Arms Reach` module if the `Toggle Secret Doors` feature is disabled in the settings.
|
||||||
|
|
||||||
|
### Other
|
||||||
|
- Warn the user about incompatibility if they use this module together with `Arms Reach` and have incompatible features enabled.
|
||||||
|
|
||||||
## v1.2.1
|
## v1.2.1
|
||||||
### Other
|
### Other
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
},
|
},
|
||||||
"ui": {
|
"ui": {
|
||||||
"messages": {
|
"messages": {
|
||||||
|
"armsReachIncompatiblilty": "You have the modules Smart Doors and Arms Reach activated. Those modules are known to conflict with each other. To resolve the conflict please disable either the \"Toggle Secret Doors\" setting of Smart Doors or the \"Hotkey 'e' for interaction\" setting of Arms Reach.",
|
||||||
"migrating": "Migrating Smart Doors to version {version}. Please don't close the application.",
|
"migrating": "Migrating Smart Doors to version {version}. Please don't close the application.",
|
||||||
"migrationDone": "Smart Doors successfully migrated to version {version}.",
|
"migrationDone": "Smart Doors successfully migrated to version {version}.",
|
||||||
"unknownVersion": "Smart Doors migration failed with the error: Unkown Version {version}. Please report this to the Smart Doors issue tracker. To prevent possible data loss don't use this plugin until this error is fixed."
|
"unknownVersion": "Smart Doors migration failed with the error: Unkown Version {version}. Please report this to the Smart Doors issue tracker. To prevent possible data loss don't use this plugin until this error is fixed."
|
||||||
|
|||||||
13
src/main.js
13
src/main.js
@@ -8,7 +8,7 @@ import * as SynchronizedDoors from "./features/synchronized_doors.js"
|
|||||||
import * as ToggleSecretDoor from "./features/toggle_secret_door.js"
|
import * as ToggleSecretDoor from "./features/toggle_secret_door.js"
|
||||||
|
|
||||||
import {performMigrations} from "./migration.js"
|
import {performMigrations} from "./migration.js"
|
||||||
import {registerSettings} from "./settings.js"
|
import {registerSettings, settingsKey} from "./settings.js"
|
||||||
|
|
||||||
Hooks.once("init", () => {
|
Hooks.once("init", () => {
|
||||||
registerSettings()
|
registerSettings()
|
||||||
@@ -20,6 +20,17 @@ Hooks.once("init", () => {
|
|||||||
|
|
||||||
Hooks.once("ready", () => {
|
Hooks.once("ready", () => {
|
||||||
performMigrations()
|
performMigrations()
|
||||||
|
|
||||||
|
// Check if arms-reach module is active and conflicting features are enabled
|
||||||
|
if (game.user.isGM && game.modules.get("arms-reach")?.active) {
|
||||||
|
// Our toggle-secret-door and arms-reach's hotkeyDoorInteraction conflict. Check if both are enabled.
|
||||||
|
if (game.settings.get(settingsKey, "toggleSecretDoors") && game.settings.get("arms-reach", "hotkeyDoorInteraction")) {
|
||||||
|
// Inform the user that they have incompatible features enabled
|
||||||
|
const incopatibilityMessage = game.i18n.localize("smart-doors.ui.messages.armsReachIncompatiblilty")
|
||||||
|
console.warn("Smart Doors | " + incopatibilityMessage)
|
||||||
|
ui.notifications.warn(incopatibilityMessage, {permanent: true})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
Hooks.on("renderChatMessage", LockedDoorAlert.onRenderChatMessage)
|
Hooks.on("renderChatMessage", LockedDoorAlert.onRenderChatMessage)
|
||||||
|
|||||||
Reference in New Issue
Block a user