Skip to content

Docs for events #140

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Docs for events #140

wants to merge 15 commits into from

Conversation

gsmj
Copy link
Contributor

@gsmj gsmj commented Dec 30, 2024

  • added all event docs from open.mp

@gsmj gsmj mentioned this pull request Dec 30, 2024
@gsmj gsmj marked this pull request as draft December 30, 2024 21:11
@gsmj gsmj marked this pull request as ready for review December 30, 2024 22:00
@gsmj
Copy link
Contributor Author

gsmj commented Dec 30, 2024

изображение
looks fine

@dennorske dennorske self-requested a review May 14, 2025 14:10
@dennorske
Copy link
Collaborator

dennorske commented May 14, 2025

I am also wondering if we should not document the inner callbacks for the events - Ideally we should document these as proper events. Maybe we can somehow tell sphinx that we want them to be annotated as events and not as classmethods? Wondering if you have some experience with this @Cheaterman

@Cheaterman
Copy link
Collaborator

Great question! I haven't done that in the past, but from a quick glance at Sphinx docs, the way to achieve this might be to develop a autodoc extension that will apply some special behavior to our @event decorator ; I'll ask on IRC and see if it's the right call :-)

@Cheaterman
Copy link
Collaborator

Another small detail I mentioned on Discord but will repost here - it's probably a good idea to document which SAMP/open.mp callback is being wrapped by each event, and provide a link to the corresponding open.mp documentation ; the first part so that people coming from Pawn can be 100% sure which event corresponds to the callback they're looking for, and the second part in case eg open.mp adds extra warnings or behavior changes to the official documentation (I don't think we'll be keeping it in sync constantly, probably too much maintenance burden).

@gsmj gsmj requested a review from dennorske May 18, 2025 15:32
Copy link
Collaborator

@dennorske dennorske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve the changes and I think they are valuable to get in to our documentation as a "for now they are good enough" kind of deal.

Thank you very much @gsmj !

I however want us to clarify and label the events properly via sphinx, so we will have to follow up on that later.

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.

3 participants