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

Create NOOP object which can be returned by a before hook to indicate that the original function shouldn't be called #20

Open
monkeyman192 opened this issue Sep 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@monkeyman192
Copy link
Owner

Currently the original function is always called. This isn't always desirable, and with compound hooks there is currently no easy way around this.
One solution may be to create a singleton object, NOOP (no-op) which, when returned, will indicate to pymhf that the original function shouldn't be called.

The documentation should indicate that this value will have a profound affect on the hook and potentially the entire state of the program being hooked, as a function not returning some value may have large consequences on the game and should only be used with care.

@monkeyman192 monkeyman192 added the enhancement New feature or request label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant