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

Port Options system from MultiWorld to AutoWorld #839

Closed
alwaysintreble opened this issue Jul 28, 2022 · 2 comments
Closed

Port Options system from MultiWorld to AutoWorld #839

alwaysintreble opened this issue Jul 28, 2022 · 2 comments
Assignees
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: refactor/cleanup Improvements to code/output readability or organizization.

Comments

@alwaysintreble
Copy link
Collaborator

Rather than accessing options with a dict through Autoworld.world.option_name[player] the option classes can be moved to Autoworld.options.option_name or Autoworld.options[option_name] and the current Autoworld.options should be migrated to Autoworld.option_definitions.
Can potentially use a TypedDict to auto fill out Autoworld.options to mimic Autoworld.option_definitions and already be filled with default option values, then have the actual Options filled in during the generation parsing step and gain access to typing hints.

@alwaysintreble alwaysintreble changed the title Port Options system from MultiWorld class to World class Port Options system from MultiWorld to AutoWorld Jul 28, 2022
@black-sliver black-sliver added is: refactor/cleanup Improvements to code/output readability or organizization. affects: core Issues/PRs that touch core and may need additional validation. labels Jul 29, 2022
@alwaysintreble
Copy link
Collaborator Author

TypedDict doesn't work for auto generating dictionaries especially since it needs a custom method to be backwards compatible. Need to create a custom object (maybe dataclass?) That builds both the dictionaries of old behavior on the multiworld and new behavior on autoworld.

@BootsinSoots
Copy link
Contributor

Is this what the #993 merge solved or is this unrelated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

No branches or pull requests

3 participants