Skip to content

Prechecks: a program's start checks as a named list, FRLG RNG first - #485

Merged
dayfine merged 3 commits into
upstream/frlg-free-party-slotsfrom
lab/slice4-prechecks
Nov 15, 2026
Merged

dayfine merged 3 commits into
upstream/frlg-free-party-slotsfrom
lab/slice4-prechecks

Conversation

@dayfine

@dayfine dayfine commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Depends on PokemonAutomation#1881 (upstream)

Base: upstream/frlg-free-party-slots (upstream PokemonAutomation#1881's head); the diff shows only this change. First PR of #131 Slice 4.

FRLG RNG's run_precheck() was a one-off. This adds a precheck list: a Precheck has a stable name, a one-line needs and a policy (ALWAYS_RUNS or SKIPPABLE), and run_prechecks() runs a list in order, leaves out the skippable ones when asked, returns one result per check (name, passed/failed/skipped, message) and throws UserSetupError with the check's message at the first failure. FRLG RNG now runs black_border then free_party_slots(n); the FRLG "Run Start Checks" box skips the skippable checks, as it skipped the party check before, and the messages are unchanged. Programs without a list are untouched. Tested with new table-driven unit tests (NintendoSwitch::Prechecks, PokemonFRLG::Prechecks) and a syntax-only compile of the touched files; no console run.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 2 commits November 14, 2026 13:35
A Precheck has a stable name, a one-line "needs" and a policy (REQUIRED or
OPTIONAL). run_prechecks() runs a list in order, leaves out the OPTIONAL
ones when asked, returns one result per check (name, passed/failed/skipped,
message) and throws UserSetupError with the check's message at the first
failure.

FRLG RNG's run_precheck() now runs rng_prechecks(n): black_border
(REQUIRED), then free_party_slots(n) (OPTIONAL, only when n > 0). The
"Run Start Checks" box in the FRLG Game Settings skips the OPTIONAL checks,
as it skipped the party check before. Messages are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…de health

OPTIONAL is a macro in the Windows headers, so the policy values are
ALWAYS_RUNS and SKIPPABLE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine marked this pull request as ready for review November 15, 2026 00:16
@dayfine
dayfine merged commit a7e19ea into upstream/frlg-free-party-slots Nov 15, 2026
8 of 9 checks passed
dayfine added a commit that referenced this pull request Nov 15, 2026
This reverts commit a7e19ea, reversing
changes made to eb27dfc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant