Skip to content

Validate non-negative (local_)early_items as well as [0, 0]#6242

Open
bbernardoni wants to merge 1 commit into
ArchipelagoMW:mainfrom
bbernardoni:early_items_validation
Open

Validate non-negative (local_)early_items as well as [0, 0]#6242
bbernardoni wants to merge 1 commit into
ArchipelagoMW:mainfrom
bbernardoni:early_items_validation

Conversation

@bbernardoni

Copy link
Copy Markdown

What is this fixing or adding?

Validate that early_items and local_early_items counts are non-negative by raising a ValueError. Also validate that both are not zero for any player, item combination (and ignore in that case).

Previously, a count of [0, 0] was decremented to [-1, 0] and then compared to [0, 0]. Since they are unequal, the code would proceed to place all of that item in the itempool.

How was this tested?

Unit tests passed.

@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 Jun 4, 2026
@bbernardoni bbernardoni force-pushed the early_items_validation branch from 1efc809 to dc40ac6 Compare June 4, 2026 00:09
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. 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.

1 participant