-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: ✨ param and return manipulation for mod hooks #436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with the provided example project, in editor and as exported game.
Amazing work - thanks!
# Conflicts: # addons/mod_loader/internal/hooks.gd # addons/mod_loader/internal/mod_hook_preprocessor.gd
Co-authored-by: Alexejhero <[email protected]>
Are there any plans to support hooking into coroutine methods and/or having our own hooks be coroutines by awaiting execute_next? |
good point, i have a feeling we might currently be breaking every method that is called with await.. issue being that these methods aren't marked as async in any way so they are hard to detect with the preprocessor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the provided example project in-editor and exported. Looks good 👍
docs: ✏️ added comment about untyped `callbacks` array commit a156ef4 Merge: baccb9c 2bda113 Author: Kai <[email protected]> Date: Fri Nov 22 22:40:55 2024 +0100 Merge branch 'better-hooks' of https://github.com/GodotModding/godot-mod-loader into better-hooks commit 2bda113 Author: Qubus0 <[email protected]> Date: Fri Nov 22 14:55:03 2024 +0100 better static types commit baccb9c Author: steen <[email protected]> Date: Tue Nov 19 19:14:49 2024 +0100 fix static type Co-authored-by: Alexejhero <[email protected]> commit afc9c3a Author: Qubus0 <[email protected]> Date: Tue Nov 19 14:53:31 2024 +0100 typo protection commit 28e53fa Merge: d91a41f fc418e7 Author: Qubus0 <[email protected]> Date: Tue Nov 19 11:27:52 2024 +0100 Merge branch 'refs/heads/better-hooks' into feat-install-hooks-from-file commit fc418e7 Author: Qubus0 <[email protected]> Date: Mon Nov 18 22:56:04 2024 +0100 slightly more safety commit 62120ae Author: Qubus0 <[email protected]> Date: Mon Nov 18 22:34:31 2024 +0100 pr cleanup commit ef53739 Author: Luca Martinelli <[email protected]> Date: Mon Nov 18 21:57:21 2024 +0100 removed recursion from hook call sequence commit d91a41f Author: Qubus0 <[email protected]> Date: Mon Nov 18 01:59:58 2024 +0100 feat: :sparkles: allow installing hooks from a file like extensions commit bcd48ce Merge: 1f4af55 766ee3e Author: Qubus0 <[email protected]> Date: Mon Nov 18 01:57:41 2024 +0100 Merge branch 'refs/heads/4.x' into better-hooks commit 1f4af55 Author: Qubus0 <[email protected]> Date: Mon Nov 18 01:55:45 2024 +0100 docs fix commit 2d1c15a Author: Qubus0 <[email protected]> Date: Mon Nov 18 00:14:51 2024 +0100 refactor old names and better docs commit 60161a1 Author: Qubus0 <[email protected]> Date: Mon Nov 18 00:14:14 2024 +0100 fix call order commit 9a94748 Author: Qubus0 <[email protected]> Date: Sun Nov 17 17:30:28 2024 +0100 fix tutorial links commit 6758031 Author: Qubus0 <[email protected]> Date: Sun Nov 17 17:24:12 2024 +0100 better docs commit d79d754 Author: Qubus0 <[email protected]> Date: Sun Nov 17 16:26:15 2024 +0100 reaname linkage and better user docs commit f6e016a Author: Qubus0 <[email protected]> Date: Sat Nov 16 15:37:57 2024 +0100 feat: :sparkles: param and return manipulation for mod hooks commit eac9c84 Author: Qubus0 <[email protected]> Date: Sat Nov 16 04:37:12 2024 +0100 feat: :sparkles: param and return manipulation for mod hooks commit 346cd9e Merge: 5797c05 6380e79 Author: Qubus0 <[email protected]> Date: Sat Nov 16 01:10:33 2024 +0100 Merge branch 'refs/heads/4.x' into better-hooks commit 5797c05 Author: Qubus0 <[email protected]> Date: Fri Nov 15 16:05:47 2024 +0100 fix: hooks argument order
allows modders to manipulate parameters and return values similarly to how script extensions work.
also docs
test project with unpacked mod: project.zip