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

Limit @autoupdate directive executions #3191

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

Denneisk
Copy link
Member

This PR fixes #3190. In addition, I made this directive a little more informative. Unrelated to the linked issue, I also included some wrapping into the E2 editor to avoid the editor from failing to close (such failures are rare but extremely annoying).

Relevant changes:

  • Limited @autoupdate directive to only ever run once
  • Added error when @autoupdate is defined twice in the same file
    • An error is not ran, but the directive is still ignored, if the directive is in an include

Miscellaneous changes:

  • Add warning when @autoupdate is passed any arguments
  • Tried to prevent the E2 editor from ever failing to close
    • Normally the editor only fails on Validate, but I wrapped a few other functions to be on the safe side
  • Updated some annotations

Add some warning reporting to autoupdate directive
Annotate directive_handlers (doesn't really work :P)
@thegrb93
Copy link
Contributor

thegrb93 commented Dec 1, 2024

They said it crashes server too. Why the fix only being done for client?

@Denneisk
Copy link
Member Author

Denneisk commented Dec 2, 2024

I think you may have misread the code. The @autoupdate directive will only run once on the server and error after that, but there are some additions included that are only useful to the client (warnings and quickfixes).

Copy link
Contributor

@thegrb93 thegrb93 left a comment

Choose a reason for hiding this comment

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

Oki, just checking

@Denneisk Denneisk merged commit 99271ee into wiremod:master Dec 3, 2024
1 check failed
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.

Uploading an E2 with around 9'000 or more @autocomplete directive crashes the game/server
2 participants