Archipelago/worlds/oot
Aaron Wagener 7193182294
Core: move option results to the World class instead of MultiWorld (#993)
🤞 

* map option objects to a `World.options` dict

* convert RoR2 to options dict system for testing

* add temp behavior for lttp with notes

* copy/paste bad

* convert `set_default_common_options` to a namespace property

* reorganize test call order

* have fill_restrictive use the new options system

* update world api

* update soe tests

* fix world api

* core: auto initialize a dataclass on the World class with the option results

* core: auto initialize a dataclass on the World class with the option results: small tying improvement

* add `as_dict` method to the options dataclass

* fix namespace issues with tests

* have current option updates use `.value` instead of changing the option

* update ror2 to use the new options system again

* revert the junk pool dict since it's cased differently

* fix begin_with_loop typo

* write new and old options to spoiler

* change factorio option behavior back

* fix comparisons

* move common and per_game_common options to new system

* core: automatically create missing options_dataclass from legacy option_definitions

* remove spoiler special casing and add back the Factorio option changing but in new system

* give ArchipIDLE the default options_dataclass so its options get generated and spoilered properly

* reimplement `inspect.get_annotations`

* move option info generation for webhost to new system

* need to include Common and PerGame common since __annotations__ doesn't include super

* use get_type_hints for the options dictionary

* typing.get_type_hints returns the bases too.

* forgot to sweep through generate

* sweep through all the tests

* swap to a metaclass property

* move remaining usages from get_type_hints to metaclass property

* move remaining usages from __annotations__ to metaclass property

* move remaining usages from legacy dictionaries to metaclass property

* remove legacy dictionaries

* cache the metaclass property

* clarify inheritance in world api

* move the messenger to new options system

* add an assert for my dumb

* update the doc

* rename o to options

* missed a spot

* update new messenger options

* comment spacing

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* fix tests

* fix missing import

* make the documentation definition more accurate

* use options system for loc creation

* type cast MessengerWorld

* fix typo and use quotes for cast

* LTTP: set random seed in tests

* ArchipIdle: remove change here as it's default on AutoWorld

* Stardew: Need to set state because `set_default_common_options` used to

* The Messenger: update shop rando and helpers to new system; optimize imports

* Add a kwarg to `as_dict` to do the casing for you

* RoR2: use new kwarg for less code

* RoR2: revert some accidental reverts

* The Messenger: remove an unnecessary variable

* remove TypeVar that isn't used

* CommonOptions not abstract

* Docs: fix mistake in options api.md

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* create options for item link worlds

* revert accidental doc removals

* Item Links: set default options on group

* change Zillion to new options dataclass

* remove unused parameter to function

* use TypeGuard for Literal narrowing

* move dlc quest to new api

* move overcooked 2 to new api

* fixed some missed code in oc2

* - Tried to be compliant with 993 (WIP?)

* - I think it all works now

* - Removed last trace of me touching core

* typo

* It now passes all tests!

* Improve options, fix all issues I hope

* - Fixed init options

* dlcquest: fix bad imports

* missed a file

* - Reduce code duplication

* add as_dict documentation

* - Use .items(), get option name more directly, fix slot data content

* - Remove generic options from the slot data

* improve slot data documentation

* remove `CommonOptions.get_value` (#21)

* better slot data description

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

---------

Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <beauxq@yahoo.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: Alex Gilbert <alexgilbert@yahoo.com>
2023-10-10 22:30:20 +02:00
..
data Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
docs Docs: Revise all docs mentioning Lua in EmuHawk (which are in English), and other misc. corrections (#1782) 2023-06-26 08:53:44 +02:00
ColorSFXOptions.py Templates: Remove auto wordwrap, fix manual indentation, and reformat docstrings for world options in main. (#1201) 2022-11-06 08:28:16 -06:00
Colors.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
Cosmetics.py OoT: Python 3.11 Compatibility fix and Minor Bug fixes (#1948) 2023-07-09 14:30:05 +02:00
Dungeon.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
DungeonList.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Entrance.py Core: rename `world` to `multiworld` (#931) 2022-10-31 21:41:21 -05:00
EntranceShuffle.py oot: remove special NL exceptions in entrance randomization 2023-01-26 21:24:27 +01:00
HintList.py oot/alttp: fix bugs found through MMBN3 testing (#1527) 2023-03-11 20:15:30 +01:00
Hints.py LttP: extract Dungeon and Boss from core (#1787) 2023-05-20 19:57:48 +02:00
IconManip.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
ItemPool.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Items.py OoT: Python 3.11 Compatibility fix and Minor Bug fixes (#1948) 2023-07-09 14:30:05 +02:00
JSONDump.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
LICENSE Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Location.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
LocationList.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
LogicTricks.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
MQ.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
Messages.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Music.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
N64Patch.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Options.py oot: bugfixes (#1709) 2023-04-16 01:45:31 +02:00
Patches.py oot: bugfixes (#1709) 2023-04-16 01:45:31 +02:00
Regions.py core: rip out RegionType and rework Region class (#814) 2023-02-14 01:06:43 +01:00
Rom.py Setup, Launcher, Linux Support (#359) 2022-03-31 05:08:15 +02:00
RuleParser.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Rules.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
SaveContext.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
SceneFlags.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
Sounds.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
TextBox.py oot: bugfixes (#1709) 2023-04-16 01:45:31 +02:00
Utils.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00
__init__.py Core: move option results to the World class instead of MultiWorld (#993) 2023-10-10 22:30:20 +02:00
build_color_options.py Options: change displayname to display_name 2022-02-02 16:29:29 +01:00
crc.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
ntype.py Ocarina of Time (#64) 2021-09-02 14:35:05 +02:00
texture_util.py Ocarina of Time 7.0 (#1277) 2022-12-11 04:11:40 +01:00