-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Document and improve hooks #21
Comments
Areas for hook improvements:
|
Additionally, add ability to untap, add priorities, etc |
Can we not untap? Thought we could. |
I don't think we can officially right now, you can always hack around it e.g. let a = true
hooks.example.tap("MyPlugin", () => {
if (!a) return
console.log("still tapped")
a = false
console.log("untapped for future use")
}) |
Ah okay, that's fair. Should we still use tapable or move away from that? I vaguely recall you complaining about it in the past. |
We already migrated off tapable because it's codegen at runtime approach could be buggy, this is what we're using rn |
Ah right I forgot about that change, mostly because we kept the API design the same. |
This PR adds some small things useful for plugins that I was missing: - Adds an extra hook `onUserLogin` that gets called when a user logs in (requests `/configuration/Init`); - Adds back functionality to the `onMissionEnd` hook that already existed but was never called; - Passes a plugin's filename to the plugin, which can especially be useful for SMF-added plugins. (Basically just https://nodejs.org/api/modules.html#__filename) Relevant issue: #21
The text was updated successfully, but these errors were encountered: