Kekilla0 / Item-Macro

Store macros in your items, execute them from your character sheet or from your favorite automation module!
MIT License
18 stars 21 forks source link

[Feature Request] Allow to switch Macro Editor sheet #74

Open MiahNelah opened 10 months ago

MiahNelah commented 10 months ago

I'm working on lib-blockly module, a module to help people without JS background to write simple macros. I would like to add ItemMacro compatibility.

However, whenever I try to switch Macro Editor sheet, I get an issue : image

I took some time to look at how ItemMacro works. When we switch document sheet, Foundry always call DocumentSheetConfig._onSubmit () method, which save object. However, since ItemMacro do not manage a real macro but just macro's data, switching document sheet looks not possible because, as there is no real macro, there is no _id attribute.

Globally, it's impossible to use custom document sheet with item macro.