* Fill: add test for swap error with item rules
https://discord.com/channels/731205301247803413/731214280439103580/1167195750082560121
* Fill: fix swap error found in CI
Swap now assumes the unplaced items can be placed before the to-be-swapped item.
Unsure if that is safe or unsafe.
* Test: clarify docstring and comments in fill swap test
* Test: clarify comments in fill swap test more
🤞
* 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>
* Tests: Add a test for fill to WorldTestBase
* test items and minimal accessibility, only bailing out when no reachable locations exist.
* put egg shard max/goal at sane values
114 locations - 35 always-present progression items - 25 excluded locations from settings <= 74 egg shards
past me can't do arithmetic
* f
* i'm bad at git
* make fill import local to prevent circular imports
---------
Co-authored-by: espeon65536 <espeon65536@gmail.com>
* Tests: add a name removal method, and have assertAccessDependency use and dispose its own state
* Update test/TestBase.py
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Core: lazy-load worlds in unpickler
this should hopefully fix customserver's memory consumption
* WebHost: move imports around to save memory in MP
* MultiServer: prefer loading _speedups without pyximport
This saves ~15MB per MP and speeds up module import if it was built in-place.
* Tests: fix tests for changed WebHost imports
* CustomServer: run GC after setup
* CustomServer: cleanup exception handling
* MultiServer: fix wrong missing for empty state w/o speedups
* Tests: fix some tests not being run
* Tests: add test for set intersection with LocationStore
* Settings: disable saving and gui during tests
* Tests: create a fresh host.yaml for TestHostYAML
Now that host.yaml is .gitignored, testing the local host.yaml makes no sense anymore
## What is this fixing or adding?
Major content update for Stardew Valley
## How was this tested?
One large-scale public Beta on the archipelago server, plus several smaller private asyncs and test runs
You can go to https://github.com/agilbert1412/StardewArchipelago/releases to grab the mod (latest 4.x.x version), the supported mods and the apworld, to test this PR
## New Features:
- Festival Checks [Easy mode or Hard Mode]
- Special Orders [Both Board and Qi]
- Willy's Boat
- Ginger Island Parrots
- TV Channels
- Trap Items [Available in various difficulty levels]
- Entrance Randomizer: Buildings and Chaos
- New Fishsanity options: Exclude Legendaries, Exclude Hard fish, Only easy fish
- Resource Pack overhaul [Resource packs are now more enjoyable and varied]
- Goal: Greatest Walnut Hunter [Find every single Golden Walnut]
- Goal: Perfection [Achieve Perfection]
- Option: Profit Margin [Multiplier over all earnings]
- Option: Friendsanity Heart Size [Reduce clutter from friendsanity hearts]
- Option: Exclude Ginger Island - will exclude many locations and items to generate a playthrough that does not go to the island
- Mod Support [Curated list of mods]
## New Contributors:
@Witchybun for the mod support
---------
Co-authored-by: Witchybun <embenham05@gmail.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* Add settings API ("auto settings") for host.yaml
* settings: no BOM when saving
* settings: fix saving / groups resetting themselves
* settings: fix AutoWorldRegister import
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
* Lufia2: settings: clean up imports
* settings: more consistent class naming
* Docs: update world api for settings api refactor
* settings: fix access from World instance
* settings: update migration timeline
* Docs: Apply suggestions from code review
Co-authored-by: Zach Parks <zach@alliware.com>
* Settings: correctly resolve .exe in UserPath and LocalPath
---------
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
Co-authored-by: Zach Parks <zach@alliware.com>
* Server: allow games with no locations again
* Server: validate locations in pure python implementation
and rework tests
* Server: fix tests for py<3.11
* MultiServer: speed up location commands
Adds optimized pure python wrapper around locations dict
Adds optimized cython implementation of the wrapper, saving cpu time and 80% memory use
* Speedups: auto-build on import and build during setup
* Speedups: add requirements
* CI: don't break with build_ext
* Speedups: use C++ compiler for pyximport
* Speedups: cleanup and more validation
* Speedups: add tests for LocationStore
* Setup: delete temp in-place build modules
* Speedups: more tests and safer indices
The change has no security implications, but ensures that entries[IndexEntry.start] is always valid.
* Speedups: add cython3 compatibility
* Speedups: remove unused import
* Speedups: reformat
* Speedup: fix empty set in test
* Speedups: use regular dict in Locations.get_for_player
* CI: run unittests with beta cython
now with 2x nicer names
* Core: Add support for non dictionary iterables for `Region.add_exits`
* some cleanup and duplicate code removal
* add unit test for non dict iterable
* use more consistent naming
* sometimes i just make stuff harder on myself :)
* OriBF: Move Ori and the Blind Forest to `worlds_disabled/`
* Add readme for `worlds_disabled` folder
* fix link
* fix link 2
* Remove useless comment
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
---------
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
* Tests: add test for mixing minimal and non-minimal
* Tests: minor cleanup in test_minimal_mixed_fill
* fix fill_restrictive for mixed minimal/non-minimal
The reason why this only happens for minimal is because it would not accept the solution it found otherwise.
Tracking and releasing unreachable items would be the better solution, but that's a lot harder to do.
* fix typo in fill_restrictive
* fix pep8 in fill_restrictive
* Fill: cleanup invalid unsafe placements, better comments
* Fill: more cleanup
* Tests: test that the game is beatable for WorldTestBases
* update docstring
* don't test the bases with default options for real this time
* invert the property so worlds can use it easier
* setup check should be or
* test class needs to always be constructed
* skip default tests before multiworld setup
* check if the calling method is in the base's __dict__
* shorter property and functional setup skipping
* shorter property and functional setup skipping
* Tests: test that worlds don't create regions or locations after `create_items`
* recache during the location counts just to be extra safe
* adjust typing and use a Tuple instead of a list
* remove unused import
* Tests: test all state and empty state on world test bases
* actually add the test methods to the dict
* only test if the world test base has non default options
* remove temp logging
* ditch the meta class and document methods
* Tests: WorldTestBase comment and docstring cleanup
* skip default tests if setUp or world_setup are modified and use a property
* negation hurts my head
* docstring
* use a better name for the property
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Stardew Valley Archipelago implementation
* fix breaking changes
* - Added and Updated Documentation for the game
* Removed fun
* Remove entire idea of step, due to possible inconsistency with the main AP core
* Commented out the desired steps, fix renaming after rebase
* Fixed wording
* tests now passes on 3.8
* run flake8
* remove dependency so apworld work again
* remove dependency for real
* - Fix Formatting in the Game Page
- Removed disabled Option Descriptions for Entrance Randomizer
- Improved Game Page's description of the Arcade Machine buffs
- Trimmed down the text on the Options page for Arcade Machines, so that it is smaller
* - Removed blankspace
* remove player field
* remove None check in options
* document the scripts
* fix pytest warning
* use importlib.resources.files
* fix
* add version requirement to importlib_resources
* remove __init__.py from data folder
* increment data version
* let the __init__.py for 3.9
* use sorted() instead of list()
* replace frozenset from fish_data with tuples
* remove dependency on pytest
* - Add a bit of text to the guide to tell them about how to redeem some received items
* - Added a comment about which mod version to use
* change single quotes for double quotes
* Minimum client version both ways
* Changed version number to be more specific. The mod will handle deciding
---------
Co-authored-by: Alex Gilbert <alexgilbert@yahoo.com>
* Tests: check that Regions are reachable
try to prevent errors from unconnected/never reachable Regions
* Test region access (#1039)
* Tests: note oot's default unreachable regions
* [SM] Fixed failing testAllStateCanReachEverything (#1087)
* [SM] Fixed failing testAllStateCanReachEverything
- by adding exclusion for Regions used only when corresponding Starting Location is used
- by removing unnecessary VARIA Regions used only for EscapeRando (not supported in AP anyway)
* Update worlds/sm/Regions.py
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Update worlds/sm/Rules.py
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Update worlds/sm/Regions.py
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Update test/general/TestReachability.py
---------
Co-authored-by: espeon65536 <81029175+espeon65536@users.noreply.github.com>
Co-authored-by: lordlou <87331798+lordlou@users.noreply.github.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>