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

Document and improve hooks #21

Open
3 tasks
RDIL opened this issue Nov 13, 2022 · 7 comments
Open
3 tasks

Document and improve hooks #21

RDIL opened this issue Nov 13, 2022 · 7 comments
Labels
documentation Improvements or additions to documentation. plugins Related to plugins.

Comments

@RDIL
Copy link
Member

RDIL commented Nov 13, 2022

  • Document the hooks
  • Maybe improve the API?
  • Add new hooks where plugin makers need them
@RDIL RDIL added documentation Improvements or additions to documentation. plugins Related to plugins. labels Nov 13, 2022
@AnthonyFuller
Copy link
Contributor

Areas for hook improvements:

  • Challenges
  • CPD (Maybe allow modders to do some cool stuff with this? May not need hooks.)
  • Mastery
  • Scoring(?)
  • Multiplayer(?)

@RDIL
Copy link
Member Author

RDIL commented Oct 12, 2023

Additionally, add ability to untap, add priorities, etc

@AnthonyFuller
Copy link
Contributor

Can we not untap? Thought we could.

@RDIL
Copy link
Member Author

RDIL commented Oct 12, 2023

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")
})

@AnthonyFuller
Copy link
Contributor

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.

@RDIL
Copy link
Member Author

RDIL commented Oct 12, 2023

We already migrated off tapable because it's codegen at runtime approach could be buggy, this is what we're using rn

@AnthonyFuller
Copy link
Contributor

Ah right I forgot about that change, mostly because we kept the API design the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation. plugins Related to plugins.
Projects
None yet
Development

No branches or pull requests

2 participants