Skip to content

Allow other modules to stop A-A asynchronously - #78

Merged
mattiabaraldi merged 1 commit into
theripper93:mainfrom
MrVauxs:patch-2
Aug 10, 2026
Merged

Allow other modules to stop A-A asynchronously#78
mattiabaraldi merged 1 commit into
theripper93:mainfrom
MrVauxs:patch-2

Conversation

@MrVauxs

@MrVauxs MrVauxs commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

One issue when combining multiple animation modules is that they often exist in their own space and cannot be reliably asked "will you run? ok, I will let you go / stop you for my own implementation." This allows that by other modules effectively hooking onto WorkflowStart like this:

Hooks.on("AutomatedAnimations-WorkflowStart", (clonedData, animationData) => {
  if (!overrideEnabled() || !animationData) return;
  (clonedData.deferrals ??= []).push(
    asyncFunctionFromModule(clonedData.item, TIMEOUT)
      .then(fired => { if (fired) clonedData.stopWorkflow = true; })
  );
});

Added asynchronous veto handling for workflow listeners.
@mattiabaraldi
mattiabaraldi merged commit 9013c97 into theripper93:main Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants