xdy / xdy-pf2e-workbench

Random assortment of possibly useful doodads, thingumabobs and whatchamacallits for the foundry vtt pf2e system.
Other
22 stars 37 forks source link

Reverted: feat: BAM: Wrap macros in a class. #1366

Closed xyzzy42 closed 4 months ago

xyzzy42 commented 4 months ago
This gets rid of all the BAM actions that were specified as an array of
strings.  A new class that implements ActionVariant is created, it works by
executing a macro for the use() method, with the macro name supplied during
construction.

Typescript's type checking then caught that "event" is not an argument to
Macro.execute().  The event needs to be in an object along with anything else
to be placed into the scope of the macro.  Which is now done.  The allows
the shift click on the BAM button to control the slow roll dialog.

The existing code would download _all_ documents in the compendium the
macro was in.  It will now specify a name in the query and foundry will only
download the macro to be executed.

It would also create a new macro from the existing one, which appears to be
unnecessary.
xdy commented 4 months ago

Reverted the commits as it didn't build. Make a new PR (couldn't reopen this for whatever reason.) Also, don't use BREAKING CHANGE:, it's actually a command to the build system, see https://github.com/semantic-release/semantic-release

xyzzy42 commented 4 months ago

Thought it was correct to use breaking change here, since the pf2e system version was bumped in the module.json.

I see what happened for the build failure. I didn't update all the type files at first and it worked. Then I saw I missed some, and one of them was types/types/foundry/client/core/settings.d.ts, which has a local change from the pf2e system version that needs to be kept. That was reverted.

Can be fixed by restoring just that one file to its older version:

git checkout v6.3.1 types/types/foundry/client/core/settings.d.ts
github-actions[bot] commented 4 months ago

:tada: This PR is included in version 6.4.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: