Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop context changes #1182

Open
wants to merge 10 commits into
base: demo-pop-context
Choose a base branch
from
Open

Conversation

dkmk100
Copy link
Contributor

@dkmk100 dkmk100 commented Dec 7, 2023

This adds two main changes:

SpellContext#pop now takes a boolean for whether a filter passed

  • if it did, it behaves as before
  • if not, the default behavior is to
  • the boolean is passed to the context manipulator
  • Anything that doesn't do any filtering, like linger and burst, just passes true obviously

Spell Validator added

  • context manipulators can accept or veto a context creator
  • holds a set of context creators which glyphs can add themselves to
  • ensures nested glyphs are legal to prevent things like a linger inside a burst

Finally: showcase glyphs which aren't meant to be in the final mod but show why addons need the two above features:

  • else glyph: can follow after filters, and allows something else to run if they fail
  • example filter: a filter to help showcase

Also fixes a bug with PopContext but I really don't wanna make it two commits
Added support for filters, and added validation and stuff

The else and example filter glyphs are only there for showcase purposes and can be removed in the final PR
SpellContext#pop wasn't keeping track of context creators inside the context correctly.
Also moved the set keeping track of context creators to the API as it's needed by spell context.
@dkmk100 dkmk100 marked this pull request as ready for review December 7, 2023 23:15
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.

None yet

2 participants