Skip to content

Fix/map page recognition and acquisition api#353

Merged
yltx merged 6 commits intoOpenWSGR:mainfrom
yltx:fix/map-page-recognition-and-acquisition-api
Mar 6, 2026
Merged

Fix/map page recognition and acquisition api#353
yltx merged 6 commits intoOpenWSGR:mainfrom
yltx:fix/map-page-recognition-and-acquisition-api

Conversation

@yltx
Copy link
Copy Markdown
Contributor

@yltx yltx commented Mar 6, 2026

No description provided.

yltx and others added 4 commits March 6, 2026 16:37
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
Copilot AI review requested due to automatic review settings March 6, 2026 13:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_PROBES probe coordinates and refined is_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):
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

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:

Copilot uses AI. Check for mistakes.
@yltx yltx merged commit f5c55b0 into OpenWSGR:main Mar 6, 2026
1 check failed
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