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

WebHost: Fix special-range value setting to custom when randomization is toggled off #1856

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

ThePhar
Copy link
Member

@ThePhar ThePhar commented Jun 2, 2023

What is this fixing or adding?

Discord Bug Report: https://discord.com/channels/731205301247803413/1113657616397246544

Exempt-Medic: If you go to any game's settings page and set progression balancing to Custom and then click the die to randomize it and then click the die again to unrandomize it, the progression balancing gets given a value of "custom" and attempting to generate gives the error:

Something went wrong and your game could not be generated. {'player': 'Failed to generate mystery in player: Error generating option progression_balancing in The Witness'}


When toggling randomization off on any "Special Range" type option on a player settings page, it would update the "value" of the option to: custom, causing a generation issue as its not a valid option.

This fixes that issue by preventing an unneeded update to game settings when toggled.

How was this tested?

Ran WebHost and tested value set in localStorage is valid.

Before:
image
image

After:
image
image

If this makes graphical changes, please attach screenshots.

See above.

@ThePhar ThePhar added is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. affects: webhost Issues/PRs that touch webhost and may need additional validation. labels Jun 2, 2023
@LegendaryLinux LegendaryLinux merged commit 59ad9e9 into ArchipelagoMW:main Jun 23, 2023
@ThePhar ThePhar deleted the fix-custom-special-range branch June 23, 2023 02:16
Witchybun pushed a commit to Witchybun/Archipelago that referenced this pull request Jun 26, 2023
…on is toggled off (ArchipelagoMW#1856)

* WebHost: Fix custom-range value setting to `custom` when randomization is toggled off

* Remove redundant code

* Add optional parameter default
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
…on is toggled off (ArchipelagoMW#1856)

* WebHost: Fix custom-range value setting to `custom` when randomization is toggled off

* Remove redundant code

* Add optional parameter default
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
…on is toggled off (ArchipelagoMW#1856)

* WebHost: Fix custom-range value setting to `custom` when randomization is toggled off

* Remove redundant code

* Add optional parameter default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: webhost Issues/PRs that touch webhost and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants