Commit Graph

259 Commits

Author SHA1 Message Date
Aaron Wagener 3869a25944
Tests: assign the world to WorldTestBase, and a default player field (#2385)
* Tests: assign the World to WorldTestBase and add a player field (because I like typing self.player far more than random 1's all over the place)

* more accurate docstring for world and multiworld

* use self.player within the class
2024-02-15 23:49:52 +01:00
PoryGone 281fe01c25
Core: Purge the evil (`world: MultiWorld`) (#2749)
* Purge the evil

* Some files didn't save

* Fix a couple of missed string references

* multi_world -> multiworld
2024-02-05 00:38:00 +01:00
Fabian Dill 6c19bc42bb
Tests: add world load benchmark (#2768) 2024-02-04 09:09:07 +01:00
Ixrec 144769a141
Tests: use strict equality in some tests # (#2778)
* Tests: replace .assertLess/GreaterEqual() with .assertEqual() in two tests where strict equality seems more correct
2024-01-30 09:00:47 +01:00
black-sliver 5663c21f39
Tests: test that item/location name groups are not empty (#2748)
* Tests: test that item/location name groups are not empty

* Tests: better name for test_groups TestCase

---------

Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2024-01-30 08:34:54 +01:00
Fabian Dill 79e2f7e357
Tests: test that World.options is not set on the class (#2725)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2024-01-15 20:50:16 +01:00
Fabian Dill ad074490bc
Test: add location access rule benchmark (#2433) 2024-01-14 21:30:00 +01:00
Aaron Wagener cfd758168c
Tests: add a test for worlds to not modify the itempool after `create_items` (#1460)
* Tests: add a test for worlds to only modify the itempool in `create_items`

* extend test multiworld setup instead of a new function

* cleanup the test a bit

* put more strict wording in `create_items` docstring

* list of shame

* Don't call `set_rules` before testing

* remove ChecksFinder from the list of shame

---------

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2024-01-14 02:15:35 +01:00
Doug Hoskisson ac2387e17c
Tests: remove deprecated option access from `WorldTestBase` (#2671)
* remove deprecated option access from `WorldTestBase`

* one in test_reachability
2024-01-12 00:22:04 +01:00
Remy Jette f530895c33
WebHost: Fix /api/generate (#2693) 2024-01-11 17:44:12 -05:00
Aaron Wagener d9d282c925
Tests: test that the datapackage after generation is still valid (#2575) 2023-12-12 02:14:44 +01:00
el-u ba53278147
core: make option resolution in world tests deterministic (#2471)
Co-authored-by: Zach Parks <zach@alliware.com>
2023-11-25 13:53:02 +01:00
el-u c944ecf628
Core: Introduce new Option class NamedRange (#2330)
Co-authored-by: Chris Wilson <chris@legendserver.info>
Co-authored-by: Zach Parks <zach@alliware.com>
2023-11-24 17:10:52 -06:00
Zach Parks 79ad54623b
WebHost, Core: Developer-defined game option presets. (#2143) 2023-11-16 04:37:06 -06:00
el-u 2af5410301
core: fix item/location descriptions test (#2450) 2023-11-15 07:26:10 +01:00
black-sliver e670ca513b
Fill: fix swap error found in CI (#2397)
* 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
2023-11-11 10:54:51 +01:00
Natalie Weizenbaum 2dd904e758
Allow worlds to provide item and location descriptions (#2409)
These are displayed in the weighted options page as hoverable tooltips.
2023-11-11 01:06:54 -05:00
Aaron Wagener 03e1c45d71
Tests: log the seed fo slot_data failures (#2402) 2023-11-08 09:15:06 +01:00
Aaron Wagener 5669579374
Core: make state.prog_items a `Dict[int, Counter[str]]` (#2407) 2023-11-02 06:41:20 +01:00
black-sliver 5f5c48e17b
Core: fix some memory leak sources without removing caching (#2400)
* Core: fix some memory leak sources

* Core: run gc before detecting memory leaks

* Core: restore caching in BaseClasses.MultiWorld

* SM: move spheres cache to MultiWorld._sm_spheres to avoid memory leak

* Test: add tests for world memory leaks

* Test: limit WorldTestBase leak-check to py>=3.11

---------

Co-authored-by: Fabian Dill <fabian.dill@web.de>
2023-10-31 02:08:56 +01:00
Fabian Dill 3e0d1d4e1c
Core: change Region caching to on_change from on-miss-strategy (#2366) 2023-10-29 19:47:37 +01:00
black-sliver bf46e0e60f
Core: deprecate Utils.get_options and remove Utils.get_default_options (#2352)
* Core: deprecate Utils.get_options and remove Utils.get_default_options

* L2AC, Adventure: use settings instead of Utils.get_options
2023-10-28 19:32:12 +02:00
Aaron Wagener 9281011315
Tests: Add a unit test for slot_data (#2333)
* Tests: Add a unit test for slot_data

* use NetUtils.encode

* modern PEP8
2023-10-27 12:33:59 +02:00
Aaron Wagener 30da81c390
Tests: modern PEP8-ify core test modules and methods (#2298)
* rename modules

* rename methods

* add docstrings to the general tests

* add base import stub

* test_base -> bases

* print deprecation warning

* redo 2346
2023-10-22 13:00:27 +02:00
Aaron Wagener 6e6fa13e44
Tests: add multiworld seed to fill subtest (#2346) 2023-10-22 12:12:26 +02:00
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
Aaron Wagener 5eeaf834cb
Tests: Add a test for fill to WorldTestBase (#2049)
* 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>
2023-10-08 12:08:47 +02:00
Aaron Wagener fd93f6e722
Tests: add can_reach_region method to WorldTestBase (#2274) 2023-10-08 11:46:30 +02:00
black-sliver cdbb2cf7b7
Core: fix unittest world discovery (#2262) 2023-10-03 09:47:22 +02:00
black-sliver 5d9b47355e
CI: run tests multi-threaded (#2251) 2023-10-02 08:47:28 +02:00
Aaron Wagener f33babc420
Tests: add a name removal method (#2233)
* 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>
2023-09-30 11:53:11 +02:00
Alchav 812dc413e5
LTTP: Key Drop Shuffle (#282)
Co-authored-by: espeon65536 <81029175+espeon65536@users.noreply.github.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
Co-authored-by: Bondo <38083232+BadmoonzZ@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2023-09-27 05:24:10 +02:00
black-sliver d471dcc067
Core, WebHost: lazy-load worlds in unpickler, WebHost and WebHostLib (#2156)
* 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
2023-09-20 16:05:56 +02:00
el-u 6c908de13f core: add a test to verify that fill_restrictive removes the exact same item from the item_pool that it has used to fill 2023-07-30 20:11:29 +02:00
black-sliver 6d93a6234e
MultiServer: fix wrong missing for empty state w/o speedups and add/fix tests (#2052)
* 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
2023-07-29 19:44:10 +02:00
black-sliver 7b8f8918fc
Settings: change/fix tests behavior (#2053)
* 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
2023-07-29 18:50:21 +02:00
agilbert1412 62657df3fb
Stardew Valley: 4.x.x - The Ginger Update (#1931)
## 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>
2023-07-19 20:26:38 +02:00
Fabian Dill 60586aa284 Tests: ensure unreachable_regions is correctly set 2023-07-18 12:41:26 +02:00
black-sliver 827444f5a4
Core: Add settings API ("auto settings") for host.yaml (#1871)
* 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>
2023-07-05 22:39:35 +02:00
black-sliver 6fd16ecced
MultiServer: Allow games with no locations, add checks to pure python implementation. (#1944)
* Server: allow games with no locations again

* Server: validate locations in pure python implementation

and rework tests

* Server: fix tests for py<3.11
2023-07-05 10:35:03 +02:00
black-sliver b6e78bd1a3
MultiServer: speed up location commands (#1926)
* 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
2023-07-04 19:12:43 +02:00
Aaron Wagener 9b15278de8
Core: Add support for non dictionary iterables for `Region.add_exits` (#1698)
* 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 :)
2023-06-30 20:37:44 -05:00
Zach Parks c9fb443c64
OriBF: Move Ori and the Blind Forest to `worlds_disabled`. (#1906)
* 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>
2023-06-29 13:36:48 -05:00
black-sliver a45e8730cb
Fill: fix fill_restrictive for mixed minimal and non-minimal and test (#1800)
* 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
2023-06-25 02:55:13 +02:00
Fabian Dill 58cf9783eb Tests: make names more unique 2023-06-01 01:45:24 +02:00
Fabian Dill fad0fe16f4
Tests: sort custom loaded tests (#1851) 2023-06-01 01:44:54 +02:00
Fabian Dill a60f370224 Test: fix setting seed from the hash of the seed method, rather than calling it 2023-05-03 04:31:35 +02:00
Fabian Dill 599cd2c82e
Launcher: add Discord links and generate yamls (#1716) 2023-04-16 01:57:52 +02:00
alwaysintreble f52ca2571f
Tests: Add tests for location name groups (#1706) 2023-04-14 20:11:01 +02:00
alwaysintreble 94a02510c0
core: Region management helpers (#761) 2023-04-10 21:07:37 +02:00
Fabian Dill 9d73988030
Tests: check that options have a docstring (#823) 2023-04-10 04:33:47 +02:00
Fabian Dill 90813c0f4b
Test: explicitly make sure there is no double use of location Name or ID (#1605) 2023-03-26 16:04:13 -07:00
alwaysintreble 1c69fb3c3c
The Messenger: Add more difficult logic options (#1550) 2023-03-21 21:21:27 +01:00
alwaysintreble 21fb16291d
Tests: test that the game is beatable for WorldTestBases (#1495)
* 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
2023-03-03 00:30:40 +01:00
alwaysintreble 9cb9cbe47d
Tests: test that worlds don't create regions or locations after `create_items` (#1465)
* 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
2023-02-27 02:13:24 +01:00
alwaysintreble f3bdf0c5ed
Tests: test all state and empty state on world test bases (#1476)
* 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>
2023-02-27 01:24:54 +01:00
Jérémie Bolduc af7d0dbf37
Stardew Valley: implement new game (#1455)
* 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>
2023-02-27 01:19:15 +01:00
alwaysintreble 1d6ab13015
ArchipIDLE: add a completion condition instead of hard coding tests around a game (#1444) 2023-02-23 21:16:10 -05:00
Fabian Dill ecd2675ea8
Tests: check that Regions are reachable (#1034)
* 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>
2023-02-19 23:09:54 +01:00
el-u ad4846cedd
core: clarify usage of classmethods in World class (#1449) 2023-02-16 00:28:02 +01:00
alwaysintreble 8af7908cd0
Tests: datapackage and more multiworld renaming (#1454)
* Tests: add a test that created items and locations exist in the datapackage

* move FF validation to `assert_generate` and remove test exclusion

* test created location addresses are correct

* make the assertion proper and more verbose

* make item count test ~~a bit faster~~ a lot nicer

* 120 blaze it

* name test multiworld setup better and fix another over 120 line in FFR
2023-02-15 22:46:10 +01:00
alwaysintreble 7cbeb8438b
core: rip out RegionType and rework Region class (#814) 2023-02-14 01:06:43 +01:00
alwaysintreble 9e3c2e2464
Tests: test that exits to `Regions` are the parents of the `Entrance` (#1442) 2023-02-13 02:05:52 +01:00
alwaysintreble 29e1c3dcf4
LTTP: fix open pyramid for real this time (#1393) 2023-01-19 16:17:16 +01:00
Fabian Dill 2f37bedc92
Tests: ensure item name groups do not collide with item names (#1074) 2023-01-18 15:45:48 +01:00
alwaysintreble b8abe9f980
Tests: add a test to check for dupe locations (#1378) 2023-01-15 20:18:32 +01:00
Fabian Dill 94c6562f82 Tests: make sure DB overwrite actually takes 2023-01-02 20:23:00 +01:00
Fabian Dill 2dcfbff751
Tests: now autoload tests from /worlds/*/test (#1318)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-12-11 13:15:23 +01:00
Fabian Dill 78d4da53a7
Tests: verify and fix host.yaml/Utils.py match (#1302) 2022-12-08 02:06:34 +01:00
Fabian Dill 32b8f9f9f3
WebHost: restore old silent ignore of mimetypes in json getting (#1292)
* WebHost: restore old silent ignore of mimetypes in json getting of /api/generate

* Tests: add tests for /api/generate
2022-12-05 22:27:15 +01:00
espeon65536 edd1fff4b7
Core: make early_items internal only (#1177)
Co-authored-by: beauxq <beauxq@yahoo.com>
2022-11-16 17:32:33 +01:00
espeon65536 4e5c10ad66
OoT: make Bottles and Adult Trade Item hintable groups (#1222)
* OoT: make Bottles and Adult Trade Item hintable groups
2022-11-09 22:07:14 +01:00
Doug Hoskisson c933fa7e34
Core: optimize early items and add unit test (#1197)
* optimize early items and add unit test

* move sorting list init closer to sorting
2022-11-04 17:56:47 +01:00
Doug Hoskisson 962e48c078
Zillion: fix unreproducible seeds (#1166)
* fix zillion unreproducible seeds

* world to multiworld merge
2022-11-01 14:45:17 +01:00
alwaysintreble 2af510328e
Core: rename `world` to `multiworld` (#931)
* rename references to `Multiworld` in core to `multiworld` instead of `world`

* fix smz3

* fix oot

* fix low hanging fruit

* revert mysteriously broken spacing in world api.md

* fix more randomly broken spacing

* hate

* that better be all of it

* begrudgingly move over smw

* ._.

* missed some worlds

* this is getting tedious now

* Missed some self.world definitions

Co-authored-by: espeon65536 <espeon65536@gmail.com>
Co-authored-by: Zach Parks <zach@alliware.com>
2022-10-31 21:41:21 -05:00
Zach Parks 1cad51b1af
Rogue Legacy: World folder clean up and generation improvements. (#1148)
* Minor cleanup and renaming of some files/functions.

* Rename `LegacyWorld` and `LegacyWeb` to RLWorld and RLWeb.

* Undo accidental change to comment.

* Undo accidental change to comment.

* Restructure Items.py format and combine all tables into one.

* Restructure Locations.py format and combine all tables into one.

* Split boss event items into separate boss entries.

* Remove definitions folder.

* Reformatted __init__.py for Rogue Legacy.

* Allow fairy chests to be disabled.

* Add working prefill logic for early vendors.

* Re-introduce Early Architect setting.

* Revamped rules and regions and can now generate games.

* Fix normal vendors breaking everything.

* Fix early vendor logic and add fairy chest logic to require Dragons or Enchantress + runes.

* Fix issue with duplicate items being created.

* Move event placement into __init__.py and fix duplicate Vendors.

* Tweak weights and spacing.

* Update documentation and include bug report link.

* Fix relative link for template file.

* Increase amount of chest locations in `location_table`.

* Correct a refactor rename gone wrong.

* Remove unused reference in imports.

* Tweak mistake in boss name in place_events.

* English is hard.

* Tweak some lines in __init__.py to use `.settings()` method.

* Add unique id tests for Rogue Legacy.

IDs are mixed around, so let's try to avoid accidentally using the same identifier twice.

* Fix typo in doc.

* Simplify `fill_slot_data`.

* Change prefix on `_place_events` to maintain convention.

* Remove items that are **not** progression from rules.
2022-10-29 22:15:06 -05:00
Doug Hoskisson 09d8c4b912
MultiServer: fix case sensitivity in server commands (#1156)
* fix case sensitivity in server commands

* improve ambiguous match breakout

* worried about accidentally swapping team and slot

* Remove now unused import
2022-10-30 00:41:07 +02:00
AkumaGath17 e6c6b00109
Minecraft: Two by two logical requirement fix (#1152)
* [Minecraft] Two by two logical requirement fix

* Two by two update

* Two by Two logical fix [Description in order]

* Two by Two fix [Bucket only= False]

Along with the others isolated items checks
2022-10-28 10:34:46 +02:00
beauxq ad445629bd Zillion: fix unit tests
previous fix was incorrect
2022-10-24 01:28:06 +02:00
Doug Hoskisson 24105ac249
Tests: fix random failures on Zillion tests (#1128)
* tests: fix random failures on Zillion tests

Normally there's a low probably that the game doesn't require a power-up that it usually requires.
This makes sure it always has that requirement for tests.

* better type narrowing
2022-10-22 03:42:16 +02:00
Doug Hoskisson 265ee7098a
New Game: Zillion (#1081)
* Option RangeWithSpecialMax

* amendment to typing in web options

* compare string with number

* lots of work on zillion

* fix zillion fill logic

* fix a few more issues in zillion fill logic

* can make zillion patch and use it

* put multi items in zillion rom

* work on ZillionClient

* logging and auth in client

* work on sending and receiving items

* implement item_handling flag

* fix locations ids to NuktiServer package

* use rewrite of zri

* cache logic rule data for performance

* use new id maps

* fix some problems with the big recent merge

* ZillionClient: use new context manager for Memory class

* fix ItemClassification for Zillion items
and some debug statements for asserts,
documentation on running scripts for manual testing
type correction in CommonContext

* fix some issues in client, start on docs, put rescue and item ram addresses in slot data

* use new location name system
fix item locations getting out of sync in progression balancing

* zillion client can read slot name from game

* zillion: new item names

* remove extra unneeded import

* newer options (room gen and starting cards)

* update comment in zillion patch

* zillion non static regions

* change some logging, update some comments

* allow ZillionClient to exit in certain situations

* todo note to fix options doc strings

* don't force auto forfeit

* rework validation of floppy requirement and item counts
and fix race condition in generate_output

* reorganize Zillion component structure
with System class

* documentation updates for Zillion

* attempt inno_setup.iss

* remove todo comment for something done

* update comment

* rework item count zillion options
and some small cleanups

* fix location check count

* data package version 1

* Zillion can pass unit tests without rom

* fix freeze if closing ZillionClient while it's waiting for server login

* specify commit hash for zilliandomizer package

* some changes to options validation

* Zillion doors saved on multiworld server

* add missing function in inno_setup
and name of vanilla continues in options

* rework zillion sync task and context

* Apply documentation suggestions from SoldierofOrder

Co-authored-by: SoldierofOrder <107806872+SoldierofOrder@users.noreply.github.com>

* update zillion package

* workaround for asyncio udp bug

There is a bug in Python in Windows
https://github.com/python/cpython/issues/91227
that makes it so if I look for RetroArch before it's ready, it breaks the asyncio udp transport system.

As a workaround, we don't look for RetroArch until the user asks for it with /sms

* a few of the smaller suggestions from review

* logic only looks at my locations
instead of all the multiworld locations

* some adjustments from pull request discussion
and some unit tests

* patch webhost changes from pull request discussion

* zillion logic tests

* better vblr test

* test interaction of character rescue items with logic

* move unit tests to new worlds folder

* comment improvements

* fix minor logic issue
and add memory read timeout

* capitalization in option display names
Opa-Opa is a proper noun

* redirect zz stdout to debug

* fix option validation bug making unbeatable seeds

* remove line that does nothing

* attach logic cache to world

Co-authored-by: SoldierofOrder <107806872+SoldierofOrder@users.noreply.github.com>
Co-authored-by: Doug Hoskisson <doughoskisson@novuslabs.com>
2022-10-20 19:41:11 +02:00
Doug Hoskisson f12b73f487
Tests: world test base class (#1116)
* world test base class

* game not instance property

* I would have guessed that this only collected 1.

* game property

* move SoE tests into worlds

* don't force auto world setup
2022-10-18 18:54:41 +02:00
black-sliver 49ae79e5ce
Tests: add fill tests for #1109 and #1114 (#1115)
* Test: for fill issues fixed in PR #1109

* Test: for double sweep collect fixed in PR #1114
2022-10-18 10:20:57 +02:00
Fabian Dill b533ffb9e8
Locality: rewrite for linear memory consumption, from quadratic (#1091) 2022-10-17 03:22:02 +02:00
black-sliver 097ac189e4
SoE: add tests ... (#1097)
* SoE: add tests ...

... for goals, bronze axe and bronze spear+

* SoE: fix tests
2022-10-14 19:35:53 +02:00
toasterparty 7f3f886e41
Overcooked! 2: Implementation (#1046)
Overcooked! 2 is a couch co-op arcade game with a very high skill ceiling. It has a small but occult following, and the community craves a reason to keep coming back besides just grinding high scores. as such, this PR represents 3 major milestones in one:

 * The launch of OC2 Modding, a modding framework which is the first public mod for the game beyond simple RAM trainers
 * The launch of OC2 Randomizer
 * The integration of OC2 Randomizer in Archipelago
2022-10-13 19:57:50 +02:00
Jarno e708bea819
[Sudoku] Added new BK mode game (#910)
Co-authored-by: Hussein Farran <hmfarran@gmail.com>
Co-authored-by: SoldierofOrder <107806872+SoldierofOrder@users.noreply.github.com>
2022-10-13 07:55:00 +02:00
alwaysintreble f909576813
core: Generic boss plando handler (#1044)
* fix some blunders i made when implementing this

* move generic functions to core class

* move lttp specific stuff out and split up from_text a bit for more modularity

* slightly optimize from_text call order

* don't make changes on github apparently. reading hard

* Metaclass Magic

* do a check against the base class

* copy paste strikes again

* use option default instead of hardcoded "none". check locations and bosses aren't reused.

* throw dupe location error for lttp

* generic singularity support with a bool

* forgot to enable it for lttp

* better error handling

* PlandoBosses: fix inheritance of singularity

* Tests: PlandoBosses

* fix case insensitive tests

* Tests: cleanup PlandoBosses tests

* f in the chat

* oop

* split location into a different variable

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

* pass the list of options as `option_list`

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

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-10-12 20:28:32 +02:00
Fabian Dill 060a04700d
Core: allow generic access to indirect_connections (#1056) 2022-09-30 04:58:19 +02:00
Doug Hoskisson c96b6d7b95
Core: some typing and docs in various parts of the interface (#1060)
* some typing and docs in various parts of the interface

* fix whitespace in docstring

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

* suggested changes from discussion

* remove redundant import

* adjust type for json messages

* for options module detection:
 module.lower().endswith("options")

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-09-28 23:54:10 +02:00
black-sliver 809bda02d1 Test: item/location name must not be numeric 2022-09-20 18:38:16 +02:00
Alchav 9daa64741b
New, smarter fast_fill function (#646)
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2022-09-17 02:06:25 +02:00
Fabian Dill af11fa5150
Core: auto alias (#1022)
* Test: check that default templates can be parsed into Option objects
2022-09-16 00:32:30 +02:00
toasterparty 8aad75ed23
Tests: Check for Holes in the Item Pool (#992)
* test for holes in the item pool

* Update test/general/TestItems.py

Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>

* Update test/general/TestItems.py

Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>

* Update test/general/TestItems.py

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

* Update test/general/TestItems.py

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

Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-09-05 10:02:40 +02:00
Fabian Dill e413619c26
Tests: verify that a world doesn't use the same ID multiple times (#985) 2022-09-01 21:25:06 +02:00
Fabian Dill c390801c4c
Test: verify file webhost file creations work to some degree (#953)
WebHost: fix some file creation paths
2022-08-23 01:07:17 +02:00
alwaysintreble 81cf1508e0
Core: Refactor Autoworld.options to Autoworld.option_definitions (#906)
* refactor `world.options` -> `world.option_definitions`

* rename world api reference

* missed some self.options
2022-08-15 23:46:59 +02:00
black-sliver b8ca41b45f
Utils: SI: fix rounding problems (#895)
* Utils: SI: fix rounding problems

999.999 would give 1000.00 instead of 1.00k

* Tests: add Utils: SI tests
2022-08-12 00:46:11 +02:00
Fabian Dill 21f7c6c0ad
Core: optimize away Item.world (#840)
* Core: optimize away Item.world

* Update test/general/TestFill.py

* Test: undo unnecessary changes

* lttp: remove two more Item.world writes

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-08-05 17:09:21 +02:00
Fabian Dill 6c525e1fe6
Core: move multiple Item properties into a single Flag (#638) 2022-06-17 03:23:27 +02:00