Commit Graph

176 Commits

Author SHA1 Message Date
Silvris ce42e42af7
Core: fix single player item links (#3721)
* fix single player item links

* Make a variable and fix weird spacing

* use advancement instead of classification

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-09-17 14:36:05 +02:00
NewSoupVi 64b654d42e
Core, some worlds: Rename sweep_for_events to sweep_for_advancements (#3571)
* Rename sweep_for_events to sweep_for_advancements

* more event->advancement renames

* oops accidentally deleted the deprecation thing in the force push

* Update TestDungeon.py

* Update BaseClasses.py

* Update BaseClasses.py

* oops

* utils.deprecate

* treble, you had no idea how right you were

* Update test_panel_hunt.py

* Update BaseClasses.py

Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>

---------

Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2024-08-23 01:15:05 +02:00
Aaron Wagener 8e7ea06f39
Core: dump all item placements for generation failures. (#3237)
* Core: dump all item placements for generation failures

* pass the multiworld from remaining fill

* change how the args get handled to fix formatting

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-08-14 00:17:42 +02:00
Fabian Dill b77805e5ee
Fill: remove sweep_for_events(key_only=True) (#2239) 2024-07-28 01:32:25 +02:00
Fabian Dill 2daccded36
Core: don't lock progression (#3501) 2024-06-12 15:35:51 +02:00
Fabian Dill 0ea20f3929
Core: add panic_method setting (#3261) 2024-05-22 14:02:18 +02:00
Aaron Wagener 005fc4e864
Fill: allow for single player fill restrictive placement and sweeping (#2415)
* Core: allow for single player state sweeping

* Fill: have distribute items use single_player fill when it can

* oop

* pass locations to sweep_for_events instead of the player

* finally found the diff that was breaking swap

* LTTP fills everyone's dungeons at once, not just a single player's

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-05-04 12:42:36 +02:00
Silvris 915ad61ecf
Core: fix unfilled items "Per-Player Count" (#2661) 2024-04-20 19:57:55 -05:00
Aaron Wagener 842a15fd3c
Core: replace `Location.event` with `advancement` property (#2871) 2024-04-14 20:37:48 +02:00
Aaron Wagener bb481256de
Core: Make fill failure error more human parseable (#3023) 2024-03-28 21:48:40 -05:00
Exempt-Medic 862d77820d
Fill: Improve clarity of remaining_fill messages (#2894)
* Update Fill.py

Make the fill message more descriptive

* Removing kwarg
2024-03-07 08:48:55 +01:00
Exempt-Medic 59ef010842
Fill: Changing deprecated option getter (#2735) 2024-02-10 22:07:11 +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 e8f96dabe8
Core: faster prog balance (#2586)
* Core: rename world to multiworld in balance_multiworld_progression

* Core: small optimization to progression balance speed
2023-12-10 20:42:07 +01:00
Fabian Dill d892622ab1
Plando: verify from_pool type (#2200) 2023-11-24 10:41:56 -06:00
Exempt-Medic a8e03420ec
Fill: Fix plando removing Usefuls first (#2445)
Co-authored-by: blastron <blastron@mac.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2023-11-24 10:33:59 -06: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
Fabian Dill f81e72686a
Core: log fill progress (#2382)
* Core: log fill progress

* Add names to common fill steps

* Update Fill.py

Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>

* cleanup default name

---------

Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
2023-10-30 01:22:00 +01:00
Silvris 7c2cb34b45
Plando: prevent duplicate candidate locations (#2286) 2023-10-21 12:59:53 +02:00
espeon65536 b82f48fe4b
Core: guard against plandoing items onto event locations (#2284) 2023-10-20 02:23:32 +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
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
Silvris 6e02a4ca3c
Plando: fix overwriting outer scope (#2196) 2023-09-20 00:43:37 +02:00
el-u 5869f78ea7 core: remove the correct item from the item_pool in fill_restrictive 2023-07-30 20:11:29 +02:00
black-sliver d49860fbeb
Fill: fix cleanup-after-swapping performance (#2016)
#1800 introduced a cleanup pass to "eject" unreachable items to hopefully get better error reporting of what could not be placed. The code to do so has an unnecessary amount of sweeps from pool.
2023-07-23 17:57:33 +02: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
Zach Parks e778e49574
Core: Fix ZeroDivisionError if a world is contained 100% locked locations. (#1659)
* Core: Fix divide by zero error if all locations are priority

* Core: 100% makes more sense than 0% in this context

* Core: Revert a some "autoformatter" damage

* Core: Move comparisons a bit earlier.

Worlds that are 100% filled with locked locations should now be completely skipped in the progression balancing step now as we filter them out at the very beginning of the stage now. Also skips progression balancing if it turns out all locations are locked early before attempting to balance.
2023-04-05 12:11:34 -05:00
Fabian Dill 6671b21a86
Core: Generic excluded fill (#1511) 2023-03-20 17:10:12 +01:00
black-sliver e78800d1bc Item Plando: make world selection deterministic 2023-03-05 02:16:55 +01:00
Fabian Dill 1288f15e45
Core: Fill fix local logic conflict (#1271) 2022-11-28 07:03:09 +01:00
Alchav 93a354cd81
[Core] Item plando early locations (and non-early locations) (#1228) 2022-11-17 17:40:44 +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
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
Alchav 802119502d
Core: Fix early items bug with priority locations (#1167) 2022-10-31 22:26:55 -05:00
Alchav 4b18920819
Early Items option (#1086)
* Early Items option

* Early Items description update

* Change Early Items to dict

* Rewrite early items as extra fill steps

* Move if statement up

* Document early_items

* Move early_items handling before fill_hook

* Apply suggestions from code review

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

* Subnautica pre-fill moved to early_items

* Subnautica early items fix

* Remove unit test bug workaround

* beauxq's pr

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
2022-10-27 09:00:24 +02:00
Alchav f18df4c1df
[Core] Fix priority location handling in accessibility corrections (#1121)
* Fix priority location handling in accessibility corrections

* Don't lock empty locations

* black sliver's suggested change

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-22 03:29:20 +02:00
Fabian Dill af0cfc5a38
Fill: Priority locks when placing and does not swap. (#1099)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2022-10-18 01:07:06 +02:00
black-sliver acf7fda26a Main: Fill: more opportunities for swapping 2022-10-17 00:45:51 +02:00
Alchav f7fc6fa7aa
Core: Fix forbid_important_item_rule with parenthesis (#1107) 2022-10-16 07:32:17 +02:00
Fabian Dill 0aea1e780f Fill: create minimal excluded location rule only once 2022-10-14 22:53:16 +02:00
Alchav 885c8d3fcc
Fix minimal accessibility failures (#726) 2022-09-29 19:59:57 +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 8484193151 Core: crash if non_local pool is too big 2022-08-15 23:36:07 +02:00
Alchav 530c5500c3
Break out of fill loop if locations is empty (#690) 2022-07-03 17:11:11 +02:00
Fabian Dill 6c525e1fe6
Core: move multiple Item properties into a single Flag (#638) 2022-06-17 03:23:27 +02:00
Fabian Dill 90d506ee7c Fill: fix type-crash on unfilled having either str or Location
Fill: speed up Counter creation by skipping intermediary list creation
2022-05-18 22:40:40 +02:00
Fabian Dill 44638ccc1a
Fill: fix priority_locations being undone by prog_balancing shop shuffle and other late-fills (#513) 2022-05-14 14:04:16 -07:00
Doug Hoskisson c085ee47ed
variable-progression-balancing (#356) 2022-05-11 09:13:21 +02:00
espeon65536 f6d857b5b5
Core: make progression balancing deterministic (#295) 2022-05-11 04:12:26 +02:00
Fabian Dill 491e6c8730
HK: don't progression balance "Currency"-like progression items (#419)
* HK: don't progression balance "Currency"-like progression items

* only skip prog balancing on charms that don't unlock checks by themselves

Co-authored-by: Kono Tyran <HAklowner@gmail.com>
2022-04-05 18:41:15 -04:00