grandseiken / foundryvtt-multilevel-tokens

Multilevel tokens for Foundry VTT
MIT License
41 stars 20 forks source link

Macros are not asynchronous #112

Open DawidIzydor opened 2 years ago

DawidIzydor commented 2 years ago

Some features (most notably Roll) are marked as going to be obsolete in future releases in the synchronous versions.

To avoid problems modify the codebase to make the methods that start macros asynchronous (eg. https://github.com/grandseiken/foundryvtt-multilevel-tokens/blob/43e1769d075579613104013c3d3121bdfac4aa37/multilevel.js#L851 )

grandseiken commented 2 years ago

For now it's still possible to call async functions from macros, you just have to use the returned promise instead of await right? Looks like foundry's built-in way of calling macros has changed to allow async stuff though so yeah should be updated to match probably.

DawidIzydor commented 2 years ago

Currently it is true however this is marked as obsolete and to be removed in future - if in a next version the synchronous exectution is removed then multilevel will stop working. Changing this early gives more time to test if everything works correctly