ArchipelagoMW / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
480 stars 638 forks source link

Tests: add test that option classes aren't reused #3530

Open alwaysintreble opened 3 months ago

alwaysintreble commented 3 months ago

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.

Silvris commented 3 months ago

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.

alwaysintreble commented 3 months ago

it ignores Visibility.none entirely

Exempt-Medic commented 3 weeks ago

This should work now btw