dragonflagon-fvtt
dragonflagon-fvtt copied to clipboard
lib-df-buttons: let buttons launch when canvas has no active scene
I am creating a module that converts images in a folder to webp format. The module works fine, as long as there is an active scene. When there is no active scene, your module returns out of the _onClick function.
Is this necessary?
It would be nice if your module still works even if there is no active scene.
I removed line 181 locally and tried to see if anything blew up. It worked fine.
This is probably not necessary. Likely some test code that didn't get removed. I'll have to take a look.
Yeah so this was following the same design as the scene buttons which also don't show when the canvas is turned off. I think the better solution would maybe be to add a flag to a module button registration that indicates your buttons work without a canvas.
The fix to get the buttons working without an active scene is not a priority for me. I just hope to avoid issues in my module where people claim the buttons don't work. I am fine with any solution.
The fix for the getModuleButtons
hook is more pressing for me.