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

Add support for V9 sheet registration #30

Closed ardittristan closed 2 years ago

ardittristan commented 2 years ago

Foundry V9 adds the Macros.registerSheet method which allows modules to register custom sheets for the macro sheet. Though Item Macro doesn't take this method into account yet when rendering it's macro sheet.

Kekilla0 commented 2 years ago

I registered the modules "macro editor" but that didn't seem to fix the problem. I dont think its being overwritten.

ardittristan commented 2 years ago

I'm also looking into it myself now; It seems the popup thinks it's an item sheet instead of macro sheet. Looking into how I can make it think it's a macro sheet.

CaosFR commented 2 years ago

Hi, does a way to know the advancement for the v9 compatiblity ? There’s always the warning. Thanks.

Kekilla0 commented 2 years ago

I'm also looking into it myself now; It seems the popup thinks it's an item sheet instead of macro sheet. Looking into how I can make it think it's a macro sheet.

have you found any resolution or any suggestions?

ardittristan commented 2 years ago

I haven't gotten a response yet, I'll try asking again, otherwise I'll just keep in the current workaround I have which is adding an extra hook in my code for this module

ravingdragoon commented 2 years ago

I haven't gotten a response yet, I'll try asking again, otherwise I'll just keep in the current workaround I have which is adding an extra hook in my code for this module

@ardittristan how would one implement this workaround?

ardittristan commented 2 years ago

I haven't gotten a response yet, I'll try asking again, otherwise I'll just keep in the current workaround I have which is adding an extra hook in my code for this module

@ardittristan how would one implement this workaround?

@ravingdragoon

https://github.com/ardittristan/VTTMacroEditor/blob/ee1a7f6bf807fae345f85a1655ccbb71d0cb340d/editor.js#L150

Though it was made as a temporary fix so ti is quite agressive at the moment

Kekilla0 commented 2 years ago

Revamped alot of stuff for 10.X, should have fixed the majority of the issue.

I will probably, eventually, have to do another complete re-write of the module :{