diff --git a/src/js/modules/cameraControl/index.js b/src/js/modules/cameraControl/index.js index 0fe8389..82a2bdb 100644 --- a/src/js/modules/cameraControl/index.js +++ b/src/js/modules/cameraControl/index.js @@ -119,7 +119,7 @@ export default class CameraControl extends AbstractSubModule { return; } activeCharacterTokens = activeCharacterTokens.filter((token) => - token.combatant + token.hasOwnProperty("combatant") ? !token.combatant.data.hidden && !token.combatant.data.defeated : true ); diff --git a/src/js/modules/doorHandler/index.js b/src/js/modules/doorHandler/index.js index 81c8218..c2b8937 100644 --- a/src/js/modules/doorHandler/index.js +++ b/src/js/modules/doorHandler/index.js @@ -76,7 +76,15 @@ export default class DoorHandler extends AbstractSubModule { `${doorCR.player.name}[${doorCR.token.name}]: toggling the door `, doorCR.door ); - doorCR.door.doorControl._onMouseDown(new MouseEvent("mousedown")); + const evt = new PIXI.InteractionEvent(); + // TODO: ugly hack to get the event to trigger properly + evt.data = { + button: 0, + originalEvent: { + button: 0 + } + }; + doorCR.door.doorControl._onMouseDown(evt); this.#nextDoorTimestamp = now + 150; } } diff --git a/src/module.tmpl.json b/src/module.tmpl.json index 749b5df..d039b7c 100644 --- a/src/module.tmpl.json +++ b/src/module.tmpl.json @@ -4,7 +4,7 @@ "version": "{{version}}", "title": "Mind Flayer - Token Controller", "description": "Adds functionality to control tokens through external applications or devices. Mind Flayer server (https://github.com/mindflayer-vtt/mindflayer-server) is required for the module to communicate with external services.", - "minimumCoreVersion": "0.8.0", + "minimumCoreVersion": "9.0", "compatibleCoreVersion": "9.269", "author": "749, shawly", "authors": [