Repository navigation
Prechecks: a program's start checks as a named list, FRLG RNG first - #485
Merged
Merged
Conversation
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
marked this pull request as ready for review
November 15, 2026 00:16
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: aPrecheckhas a stable name, a one-lineneedsand a policy (ALWAYS_RUNSorSKIPPABLE), andrun_prechecks()runs a list in order, leaves out the skippable ones when asked, returns one result per check (name, passed/failed/skipped, message) and throwsUserSetupErrorwith the check's message at the first failure. FRLG RNG now runsblack_borderthenfree_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