Skip to content

Conversation

wuke32767
Copy link
Contributor

Although #953 looks to be good, but i still noticed somethong:

What if code modders don't use it correctly?

According to https://github.com/EverestAPI/Resources/wiki/Making-Code-Mods#on-hooks, when hooking a coroutine with SwapImmediately, sometimes the method suffix will not run. However, #953 will ALWAYS run them. While nobody should be doing this, this could cause problems in the future:

  • B flattens the sequence, just because they can.
  • A adds a method suffix.
    • the suffix should not run, but...
  • A runs before B.
    • their sequence will be flattened by B. so it runs.
  • A is released with the bug.
  • Some users don't enable B. For no reason.
  • A can't work.

Actually there's no solution for this. so
This pr changes Coroutine to always run suffixes.

still not tested, but looks good to me.

@maddie480-bot maddie480-bot added the draft This PR is not ready for review yet (bot-managed) label Aug 2, 2025
@wuke32767 wuke32767 marked this pull request as ready for review October 11, 2025 15:35
@maddie480-bot maddie480-bot added review needed This PR needs 2 approvals to be merged (bot-managed) and removed draft This PR is not ready for review yet (bot-managed) labels Oct 11, 2025
@Wartori54
Copy link
Member

Looks good, I'd like to test it before giving my approval, which I will do at some other time.

@microlith57 microlith57 self-requested a review October 14, 2025 06:53
Copy link
Member

@Wartori54 Wartori54 left a comment

Choose a reason for hiding this comment

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

Self-reminder to update the docs of SwapImmediately at the wiki once this is merged.
LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review needed This PR needs 2 approvals to be merged (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants