Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill: remove safety checks when allow_partial is disabled #4733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alwaysintreble
Copy link
Collaborator

What is this fixing or adding?

This removes the extra check that there are unfilled locations, and the safety check that the multiworld is still beatable when allow_partial is false. There are a few cases where fill_restrictive is called, and this should only change the behavior for a single case.

  1. Equal amount of prog items to be placed and locations to be filled. With allow_partial any extra items will be returned to be handled elsewhere so it is my opinion this should crash.
  2. More locations to be filled than there are items, but the remaining locations are invalid. With us having the start_inventory escape for main fill (which does use allow_partial) this should always fail.
  3. More locations to be filled than there are items, and all items have been placed. Currently, this code does not trigger, and it will still not with this change.
  4. More prog items to be placed than there are locations to fill. With allow_partial set to False, this should crash, as that indicates (in my opinion) an error in pool submissions, but this currently passes silently allowing a world to call this method and just assume their items are all being placed.

How was this tested?

Only ran unit tests. Needs scrutiny since it does change some behavior. As far as main fill is concerned, the only case where the second if is getting hit, will crash shortly after the panic_method handling so it's nonsensical for that use case.

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Mar 12, 2025
@ScipioWright ScipioWright added the is: enhancement Issues requesting new features or pull requests implementing new features. label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants