diff --git a/.vs/Tokenmagic/v16/.suo b/.vs/Tokenmagic/v16/.suo index c995a52..9192dda 100644 Binary files a/.vs/Tokenmagic/v16/.suo and b/.vs/Tokenmagic/v16/.suo differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index e91cde2..e395333 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/README.md b/README.md index 200a29a..8671dbc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Token Magic FX - Update v0.1.3b-alpha +# Token Magic FX - Update v0.1.3c-alpha ## FX @@ -16,7 +16,8 @@ The new filters have been added to the TokenMagic macro compendium. *Fixed issues :* - The padding property value is now multiplied by the zoom factor. - Some internal improvements and refactoring. -- Animations freezing with target-enhancements module +- Freezing when a scene is updated +- Crash when a scene with animated tokens or tiles is deleted (with active players/GM in the scene) # Token Magic FX - Update v0.1.2-alpha diff --git a/Tokenmagic.zip b/Tokenmagic.zip index 9d54087..7f4b831 100644 Binary files a/Tokenmagic.zip and b/Tokenmagic.zip differ diff --git a/tokenmagic/module.json b/tokenmagic/module.json index 5a9ca30..5ef93e9 100644 --- a/tokenmagic/module.json +++ b/tokenmagic/module.json @@ -2,7 +2,7 @@ "name": "tokenmagic", "title": "Tokenmagic", "description": "
Add graphic filters and animations on your tokens and tiles.
", - "version": "0.1.3b", + "version": "0.1.3c", "compatibleCoreVersion": "0.6.5", "minimumCoreVersion": "0.6.0", "author": "SecretFire", diff --git a/tokenmagic/module/tokenmagic.js b/tokenmagic/module/tokenmagic.js index 4eb00f4..9add523 100644 --- a/tokenmagic/module/tokenmagic.js +++ b/tokenmagic/module/tokenmagic.js @@ -553,13 +553,13 @@ Hooks.on("canvasReady", (canvas) => { Anime.activateAnimation(); }); -Hooks.on("updateScene", (scene, data, options) => { - log("Hook -> updateScene"); +Hooks.on("deleteScene", (scene, data, options) => { + log("Hook -> deleteScene"); - // to resolve an incompatibility with target-enhancements module - if (data.hasOwnProperty("flags") && data.flags.hasOwnProperty("target-enhancements")) { return; } - - Anime.resetAnimation(); + if (!(scene == null) && scene.id === game.user.viewedScene) { + Anime.desactivateAnimation(); + Anime.resetAnimation(); + } }); Hooks.on("deleteToken", (parent, doc, options, userId) => { diff --git a/tokenmagic/updates/UPDATE-0.1.3c.md b/tokenmagic/updates/UPDATE-0.1.3c.md new file mode 100644 index 0000000..8cb33a7 --- /dev/null +++ b/tokenmagic/updates/UPDATE-0.1.3c.md @@ -0,0 +1,6 @@ +# Token Magic FX - Update v0.1.3c-alpha + +*Fixed issues :* +- Freezing when a scene is updated +- Crash when a scene with animated tokens or tiles is deleted (with active players/GM in the scene) +