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

BizHawkClient: Use callbacks in connector script instead of else/ifs #2784

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

Zunawe
Copy link
Collaborator

@Zunawe Zunawe commented Jan 31, 2024

What is this fixing or adding?

Addresses #2763. I suppose it's probably technically a speed improvement and better follows typical lua practices. But otherwise shouldn't change functionality. Just cleanup.

Also moves the debug variable up to the top of the file. for easier access.

How was this tested?

Ran Emerald for a couple minutes. Triggered an "unknown command" error to make sure it still got sent to the client.

@ScipioWright ScipioWright added the is: refactor/cleanup Improvements to code/output readability or organizization. label Jan 31, 2024
@PoryGone PoryGone added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Feb 10, 2024
Copy link
Collaborator

@agilbert1412 agilbert1412 left a comment

Choose a reason for hiding this comment

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

Changes seem good and result in more readable code.
I would even go one step further and make named functions with the content of every branch, but the current code is still an improvement over the previous one.

@ScipioWright ScipioWright added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Feb 14, 2024
@Berserker66 Berserker66 merged commit 687af30 into ArchipelagoMW:main Feb 16, 2024
7 checks passed
@github-actions github-actions bot removed the waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. label Feb 16, 2024
@Zunawe Zunawe deleted the bhc-table branch March 25, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants