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

feat: Add priority for event handlers to Exiled Events #423

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

warquys
Copy link

@warquys warquys commented Feb 1, 2025

Description

Describe the changes
Add priority for the eventhandler to the exiled events. This allows the plugin to be the last to handle an event even if the plugin has a high priority and vice versa.

What is the current behavior? (You can also link to an open issue here)
The current behaviour follow the order of ellements added in the inner event. First added first called.
First call the "classic" handler then coroutine handler.

What is the new behavior? (if this is a feature change)
First added first called, when same priority. highest priority, first call.
First call the "classic" handler then coroutine handler, when same priority.

Does this PR introduce a breaking change? no

Other information: I like trains
I didn't test it in game only in unit tests.
I don't care if this pull request get merge or not it's just a draft.
It took me 10 minutes to code it.


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

@github-actions github-actions bot added the Events label Feb 1, 2025
@warquys warquys marked this pull request as draft February 1, 2025 02:22
@warquys warquys changed the title Add priority for event handlers to Exiled Events feat: Add priority for event handlers to Exiled Events Feb 1, 2025
@louis1706
Copy link

Thanks for the PR this will be a very great feature to merge let me know when you have finish and remove all unneeded comment

@warquys warquys marked this pull request as ready for review February 1, 2025 23:29
@warquys
Copy link
Author

warquys commented Feb 4, 2025

Tested by RomzyyTV. In-game testing, the test verifies only default priorities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants