Fix/map page recognition and acquisition api#353
Merged
yltx merged 6 commits intoOpenWSGR:mainfrom Mar 6, 2026
Merged
Conversation
feat: add POST /api/expedition/check endpoint (#350)
- Move TAB_PROBES[0] y from 0.0417 to 0.0650 to avoid loot badge overlay - Add GET /api/game/acquisition - OCR recognition of ship/loot counts - Add GET /api/game/context - game context runtime counters - Bump version to 2.0.4
- Move TAB_PROBES[1] y from 0.0486 to 0.0650 to avoid tab text pixels - Add debug logging to is_tabbed_page() for diagnosis - Bump version to 2.0.4.post1
There was a problem hiding this comment.
Pull request overview
This PR adjusts tabbed-page recognition for map-related UI detection and adds HTTP API endpoints to query acquisition counts via OCR and read runtime counters from the game context.
Changes:
- Tweaked
TAB_PROBESprobe coordinates and refinedis_tabbed_page()bookkeeping for tabbed-page detection. - Added
/api/game/acquisition(OCR-based acquisition count recognition) and/api/game/context(read-only context counters) endpoints to the FastAPI server. - Bumped package version to
2.0.4.post1.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| autowsgr/ui/tabbed_page.py | Adjusts tab probe coordinates and refactors tabbed-page detection logic. |
| autowsgr/server/main.py | Introduces new game status/query endpoints for acquisition OCR and context counters. |
| autowsgr/init.py | Updates the package version string. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| blue_count = 0 | ||
| dark_count = 0 | ||
| for x, y in TAB_PROBES: | ||
| for i, (x, y) in enumerate(TAB_PROBES): |
There was a problem hiding this comment.
i from enumerate(TAB_PROBES) is unused (only referenced in commented-out debug), which will trigger Ruff/pyflakes unused-variable lint. Use for x, y in TAB_PROBES again, or rename the index to _/_i, or re-enable logging so the index is actually used.
Suggested change
| for i, (x, y) in enumerate(TAB_PROBES): | |
| for x, y in TAB_PROBES: |
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.
No description provided.