Skip to content

Ensure no conflicting settings are specified in plandos#1562

Merged
cjohnson57 merged 1 commit into
OoTRandomizer:Devfrom
fenhl:plando-validate-disabled-settings
May 30, 2022
Merged

Ensure no conflicting settings are specified in plandos#1562
cjohnson57 merged 1 commit into
OoTRandomizer:Devfrom
fenhl:plando-validate-disabled-settings

Conversation

@fenhl

@fenhl fenhl commented Apr 20, 2022

Copy link
Copy Markdown
Collaborator

The disable field on Setting_Info is supposed to ensure that incompatible settings, such as glitched logic and entrance randomizer, aren't selected together. It does this by disabling the setting's GUI element and setting it to its disabled_default value. However, nothing is validated when settings are specified via plando. In the case of glitched logic + ER, seed generation fails later (because it will try to shuffle nonexistent entrances), but with #1531 this lack of validation can lead to softlocks. This PR adds this validation, which also makes the already failing combinations fail faster and with a better error message.

I've done a quick test and this seems to be working as expected, but I'm not very comfortable with the plando section of the code.

@cjohnson57 cjohnson57 added the Component: Plandomizer Plandomizer library and functionality label Apr 22, 2022

@cjohnson57 cjohnson57 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note that this PR prevents 2 conflicted settings set in plando, but if there's a setting in plando that conflicts with an effective GUI setting it won't catch it. This will likely be added later.

@cjohnson57 cjohnson57 merged commit 5928c10 into OoTRandomizer:Dev May 30, 2022
@fenhl fenhl deleted the plando-validate-disabled-settings branch May 30, 2022 20:56
@fenhl fenhl added this to the 7.0 milestone Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Plandomizer Plandomizer library and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants