6 Commits

7 changed files with 19 additions and 21 deletions

View File

@@ -1,3 +1,11 @@
## v1.2.4
### Bugfix
- Fixed a race condition that may cause doors to not be properly synchronized across scenes
## v1.2.3
### Other
- Smart Doors is now compatible with Arms Reach
## v1.2.2
### Bugfix
- Disabled features are now less likely to interfere with other modules, increasing compatibility.

View File

@@ -22,7 +22,7 @@ Which where the secret doors again? This tints all secret doors grey in the GM v
### Toggle Secret Doors
![Toggle Secret Doors demonstration](https://raw.githubusercontent.com/manuelVo/foundryvtt-smart-doors/da5872042ea81e2f41875a193d161331a81a2b6d/media/secret_door_toggle.webp)
Easily reveal secret doors to players. Strg+left click secrets doors to turn them into regular doors. Strg+left click can also be done on normal doors to turn them into secret doors. Using this in combination with Tint Secret Doors is recommended so you can actually see what you are doing.
Easily reveal secret doors to players. Ctrl+left click secrets doors to turn them into regular doors. Ctrl+left click can also be done on normal doors to turn them into secret doors. Using this in combination with Tint Secret Doors is recommended so you can actually see what you are doing.
### Locked Door Alerts
@@ -44,7 +44,7 @@ To set up door synchronization, assign all doors that should be synchronized to
Once a Synchronization Group is set up for multiple doors, simply open/close/lock/unlock one of the doors to achieve the same effect on other doors as well.
## Planned Features
## Features ideas
- Attach macros to doors that are being executed when the door is being opened/closed
- Give out keys to players, that allow them to lock/unlock associated doors
- Doors that can only be seen from one side when closed

View File

@@ -28,7 +28,6 @@
},
"ui": {
"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.",
"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."

View File

@@ -2,7 +2,7 @@
"name": "smart-doors",
"title": "Smart Doors",
"description": "Makes doors smarter. Allows doors to synchronize across multiple scenes and sends chat messages when players try to open locked doors.",
"version": "1.2.2",
"version": "1.2.4",
"minimumCoreVersion" : "0.7.7",
"compatibleCoreVersion" : "0.7.9",
"authors": [
@@ -24,7 +24,7 @@
],
"url": "https://github.com/manuelVo/foundryvtt-smart-doors",
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-smart-doors/master/module.json",
"download": "https://github.com/manuelVo/foundryvtt-smart-doors/archive/v1.2.2.zip",
"download": "https://github.com/manuelVo/foundryvtt-smart-doors/archive/v1.2.4.zip",
"readme": "https://github.com/manuelVo/foundryvtt-smart-doors/blob/master/README.md",
"changelog": "https://github.com/manuelVo/foundryvtt-smart-doors/blob/master/CHANGELOG.md",
"bugs": "https://github.com/manuelVo/foundryvtt-smart-doors/issues"

View File

@@ -121,12 +121,13 @@ export function onDoorRightClick() {
}
// Updates all doors in the specified synchronization group with the provided data
function updateSynchronizedDoors(updateData, synchronizationGroup) {
async function updateSynchronizedDoors(updateData, synchronizationGroup) {
// Search for doors belonging to the synchronization group in all scenes
let scenes = Util.filterAllWalls(wall => wall.door && wall.flags.smartdoors?.synchronizationGroup === synchronizationGroup);
// Update all doors in the synchronization group
scenes.forEach((scene) => {
scene.scene.updateEmbeddedEntity("Wall", scene.walls.map((wall) => {return {_id: wall._id, ...updateData}}))
})
for (const scene of scenes) {
// When VFTT 0.8 is out look for a way to do this in a single call.
await scene.scene.updateEmbeddedEntity("Wall", scene.walls.map((wall) => {return {_id: wall._id, ...updateData}}))
}
}

View File

@@ -2,7 +2,8 @@ import {settingsKey} from "../settings.js"
// Toggles between normal and secret doors
export function onDoorLeftClick(event) {
if (game.settings.get(settingsKey, "toggleSecretDoors") && event.data.originalEvent.ctrlKey && game.user.isGM) {
// We don't trust the event to be filled with the expected data for compatibilty with arms reach (which passes a broken event)
if (game.settings.get(settingsKey, "toggleSecretDoors") && event.data?.originalEvent?.ctrlKey && game.user.isGM) {
const types = CONST.WALL_DOOR_TYPES
const newtype = this.wall.data.door === types.DOOR ? types.SECRET : types.DOOR
this.wall.update({door: newtype})

View File

@@ -20,17 +20,6 @@ Hooks.once("init", () => {
Hooks.once("ready", () => {
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)