Skip to content

FRLG BagDetector: scroll arrow fix and tests - #1771

Merged
theastrogoth merged 8 commits into
PokemonAutomation:mainfrom
dayfine:frlg/bag-detector-tests-upstream
Oct 31, 2026
Merged

theastrogoth merged 8 commits into
PokemonAutomation:mainfrom
dayfine:frlg/bag-detector-tests-upstream

Conversation

@dayfine

@dayfine dayfine commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Adds screenshot tests for FRLG's BagDetector, which had none, pinning down what it does today.

  • Bag screens: the Items and Key Items pockets at the top of their lists.
  • The Items pocket scrolled down is expected as no bag, which is what the detector reads today: a red up-arrow covers the strip of the top frame it checks. The fix will flip this to a bag.
  • Not bag screens: a party menu, a box screen and the overworld.
  • Images: PokemonFRLG: BagDetector screenshots CommandLineTests#38 (PokemonFRLG/Bag/).

Testing

  • Run locally against those images: all six pass on the current detector.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 2 commits October 30, 2026 17:04
@dayfine
dayfine marked this pull request as ready for review October 31, 2026 00:12
Comment on lines +50 to +52
// Scrolled down: a bag, but a red up-arrow covers the middle of the top
// frame, and the detector's strip there runs under it, so it reads no bag.
database.add<Test_BagDetector>("PokemonFRLG/Bag/Items_Scrolled.png", false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we fix the detector's behavior now and flip this to true? I'd be fine with shortening the stripe along the top to avoid the issue mentioned here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeh added it in - was gonna keep it separate to showcase the current behavior clearly

dayfine and others added 3 commits October 30, 2026 22:49
The red up-arrow drawn over the bag's top frame once the pocket list is
scrolled made the check fail, so a scrolled bag read as no bag. The
strip now stops short of it, and the scrolled test expects a bag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…with no bag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 3 commits October 31, 2026 10:36
Register the tests in the detector's own files, as the other FRLG
detectors do, and drop the negative controls that read images from
other detectors' directories (Party/Party_1.png, Box/BoxSelection_White.png).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…ector tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@theastrogoth theastrogoth changed the title FRLG BagDetector: screenshot tests FRLG BagDetector: scroll arrow fix and tests Oct 31, 2026
@theastrogoth
theastrogoth merged commit 6fc9145 into PokemonAutomation:main Oct 31, 2026
7 checks passed
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.

2 participants