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

Fix to Best-Of checkbox #2218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix to Best-Of checkbox #2218

wants to merge 1 commit into from

Conversation

Akiak7
Copy link

@Akiak7 Akiak7 commented Jan 27, 2024

The best-of-X checkbox when challenging someone does not work if the format is already set to Bo3 or Bo5. You get this error if you try to use it:

- Rule "bestof=5" conflicts with "bestof=3" (Use "!! bestof=5" to override "bestof=3".)

This fix solves this issue by making sure the best-of command always overrides any pre-existing best-of commands.

@@ -949,7 +949,7 @@
if (bestOf && bestOfValue) {
var hasCustomRules = format.includes('@@@');
format += hasCustomRules ? ', ' : '@@@';
format += 'Best of = ' + bestOfValue;
format += '!!Best of = ' + bestOfValue;
Copy link
Member

Choose a reason for hiding this comment

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

Should there be logic here to only add !! if the best of rule already exists?

Copy link
Author

Choose a reason for hiding this comment

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

Should there be logic here to only add !! if the best of rule already exists?

I don't see why it would make a difference personally.

Copy link
Member

Choose a reason for hiding this comment

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

image
because of this

Copy link
Author

Choose a reason for hiding this comment

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

I didn't know that was a thing, my bad.

Copy link
Author

Choose a reason for hiding this comment

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

I did try to make it conditional but I couldn't really figure out how to make sure it would cover all possible syntaxes for the best-of command, then I thought it wouldn't be needed so I let if be.

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.

None yet

2 participants