From c0484113aeeaa177e6a2156a7a0e32917f5dc3df Mon Sep 17 00:00:00 2001 From: Ludovic D Date: Sun, 6 Jun 2021 19:53:56 +0200 Subject: [PATCH] Removed furnace exception. Added a video into the README. --- README.md | 1 + tokenmagic/module/tokenmagic.js | 43 --------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/README.md b/README.md index a705582..d12fd7f 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ In short : ###### In French +- [#jdr Foundry VTT Token Magic FX](https://www.youtube.com/watch?v=heBV1vYPQaQ) by *Ceizyl* - [#jdr #foundryvtt jeu de Rôle : Guide du débutant](https://www.youtube.com/watch?v=B0Gwvp-Ns6c&t=1s) by *Ceizyl* If you are a streamer and want your video about TMFX to be added to these lists, contact me on Discord or Github. diff --git a/tokenmagic/module/tokenmagic.js b/tokenmagic/module/tokenmagic.js index c26b242..f842c16 100644 --- a/tokenmagic/module/tokenmagic.js +++ b/tokenmagic/module/tokenmagic.js @@ -156,15 +156,6 @@ export function isVideoDisabled() { return game.settings.get("tokenmagic", "disableVideo"); } -export var isFurnaceDrawingsActive = () => { - // module exeption for the Furnace by KaKaRoTo - if (isActiveModule("furnace") - && game.settings.get("furnace", "enableDrawingTools")) { - return true; - } - return false; -}; - export function isTheOne() { const theOne = game.users.find((user) => user.isGM && user.active); return theOne && game.user === theOne; @@ -1411,39 +1402,6 @@ function initSocketListener() { }); }; -function initFurnaceDrawingsException() { - if (isFurnaceDrawingsActive()) { - const wrappedDCR = async function (wrapped, ...args) { - // Clear animations and filters if needed - let tmfxUpdate = false; - if (this.object.data.hasOwnProperty("flags") - && this.object.data.flags.hasOwnProperty("tokenmagic") - && this.object.data.flags.tokenmagic.hasOwnProperty("filters")) { - tmfxUpdate = true; - Anime.removeAnimation(this.object.id); - Magic._clearImgFiltersByPlaceable(this.object); - } - - // Furnace function apply (updating data and full redraw : destruction/reconstruction) - await wrapped(...args); - - // Reapply the filters if needed - if (tmfxUpdate) { - Magic._singleLoadFilters(this.object); - } - }; - - if (game.modules.get("lib-wrapper")?.active) { - libWrapper.register("tokenmagic", "FurnaceDrawingConfig.prototype.refresh", wrappedDCR, "WRAPPER"); - } else { - const cachedDCR = FurnaceDrawingConfig.prototype.refresh; - FurnaceDrawingConfig.prototype.refresh = function () { - return wrappedDCR.call(this, cachedDCR.bind(this), ...arguments); - }; - } - } -} - async function requestLoadFilters(placeable, startTimeout = 0) { var reqTimer; placeable.loadingRequest = true; @@ -1578,7 +1536,6 @@ Hooks.on("ready", () => { log("Hook -> ready"); tmfxDataMigration(); initSocketListener(); - initFurnaceDrawingsException(); window.TokenMagic = Magic; if (!game.modules.get("lib-wrapper")?.active && game.user.isGM)