ArchipelagoMW / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
502 stars 657 forks source link

Core: Give the option to worlds to have a remaining fill that respects excluded locations #3738

Open NewSoupVi opened 2 months ago

NewSoupVi commented 2 months ago

Use case:

World dev wants to fill useful, filler and trap locally.

Problem:

fill_restrictive is slow because it thinks it needs to do location access stuff. remaining_fill does not respect excluded locations inherently for useful items - Fill actually does two calls to it, once with excludedlocations and filleritempool, then with defaultlocations and restitempool

Result:

World dev chooses to reimplement their own random fill with location.can_fill This has happened at least twice now, as far as I know.

What this PR does

Add an argument to remaining_fill for whether to check only the item rule or do a full location.can_fill check

Alternatives

Tested

Not really