MrPrimate / tokenizer

Tiny yet capable in-game token editor for Foundry VTT
MIT License
29 stars 25 forks source link

Stop UI from showing up if Permission to save files is not granted #114

Closed Drental closed 1 year ago

Drental commented 1 year ago

Hi Mr Primate,

I'm seeing this module a lot in Organized Play and it's great to give the random art players come to the table with a unified feel (plus all the usual enemy token stuff that is really neat during preparation as usual)

But Many GMs don't enable the permission to upload files to the assets folder. When this module is active the players can usually still opoen the Tokenizer UI, style their token, and only get the error after the token.img and actor.img are already changed. This is then mysterymen and broken links and everyone is unhappy.

Can the module be adjusted to check the permission to save files before opening the UI and giving a warning istead if the permission was denied?

Thank you in advance.

MrPrimate commented 1 year ago

It does already emit a warning if the user is unable to upload files.

Drental commented 1 year ago

Yeah, at the point when the image path for (avatar and) token are already changed. The request is to not even open the Tokenizer UI when it's not possible to use it.

This isn't anything pressing, I just wanted an issue in the backlog for whenever you have time, or someoen else who could contribute :)

MrPrimate commented 1 year ago

AH gotcha, yes, that's fair.

MrPrimate commented 1 year ago

This is now the default behaviour in v3.11.0 (Tokenizer just behaves as if it's not there).