-
Notifications
You must be signed in to change notification settings - Fork 715
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
Tests: add test that option classes aren't reused #3530
Tests: add test that option classes aren't reused #3530
Conversation
Should this ignore Removed? Unsure if they go into Game options by default like other options, but it is the main use I can see of a duplicate class. |
it ignores |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this test, the code looks good, and only one option from world fails it
This should work now btw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this because the display name for the option is per class, making it bad UX to reuse the class.
What is this fixing or adding?
Prevents worlds from reusing the exact same option class in their available options. This becomes problematic when trying to use Option Groups since all the grouping happens via the actual class and not the dataclass's attributes. Namely #3393
How was this tested?
Ran tests a few times, added a duplicate option and removed it ensuring it behaved how I expected.