Feu-Secret / Tokenmagic

A Foundry VTT module that allows you to add animations and graphic effects to tokens, tiles, templates and drawings.
GNU General Public License v3.0
52 stars 36 forks source link

Token Magic Fx - Foundry V10 - Compatibility Update #203

Closed danil0man closed 2 years ago

danil0man commented 2 years ago

Hello Feu. I wonder if you could update Token Magic FX to work with version v.10 as currently is not working. All effects don't apply anymore to the tokens.

Kuresov commented 2 years ago

The specific exception is TypeError: Error thrown in hooked function '' for hook 'canvasReady'. canvas.background is undefined from https://github.com/Feu-Secret/Tokenmagic/blob/e21960848ea9bfaff52077fe1846cd0c14482189/tokenmagic/module/tokenmagic.js#L1557

Looks like it doesn't exist anymore according to the API docs (same for canvas.foreground). I'm reviewing them to see if I can figure out what the equivalent is.

sanguaire commented 2 years ago

Maybe the equivalent is

const bgtiles = canvas.tiles.placeables.filter(t => !t.document.overhead)

sanguaire commented 2 years ago

I made a dirty fix with these changes (see attached files). files.zip

OsiJr commented 2 years ago

The PR is ready for review. Quite a few corners were cut and might be worth a tidy up in future to remove some of the <=0.8 support to improve the code quality for future maintenance (happy to help with that adhoc).

bradleyquinn commented 2 years ago

Thank you guys for jumping on fixing this. My campaign is kinda a mess without it. Looking forward to seeing that merge!

Feu-Secret commented 2 years ago

I'm working on it as well as all others waiting PR. A release should be available in a couple hours.

atkinsgt commented 2 years ago

I'm working on it as well as all others waiting PR. A release should be available in a couple hours.

Super excited to see this. For something that primarily sits in the background for me, I'm eagerly awaiting your work! Thank you for jumping on this.

Feu-Secret commented 2 years ago

Done!