Skip to content

fix: Workers now return resources to nearest base (SC2 behavior)#1134

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-ai-worker-headquarters-5RRnr
Jan 30, 2026
Merged

fix: Workers now return resources to nearest base (SC2 behavior)#1134
braedonsaunders merged 1 commit into
mainfrom
claude/fix-ai-worker-headquarters-5RRnr

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

Fixed two issues in ResourceSystem:

  1. findAndReturnToBase() was returning to the FIRST valid base found instead of the NEAREST base. Now properly calculates distance to all bases and selects the closest one.

  2. Added diagnostic logging to handleResourceReturn() to track base selection when multiple bases exist. This will help identify any remaining issues with worker pathing to expansions.

Both functions now use identical nearest-base selection logic, matching SC2's expected behavior where workers always return to the closest dropoff point.

https://claude.ai/code/session_01FdBRa5qtZZHg1TPE8UVGk6

Fixed two issues in ResourceSystem:

1. findAndReturnToBase() was returning to the FIRST valid base found
   instead of the NEAREST base. Now properly calculates distance to all
   bases and selects the closest one.

2. Added diagnostic logging to handleResourceReturn() to track base
   selection when multiple bases exist. This will help identify any
   remaining issues with worker pathing to expansions.

Both functions now use identical nearest-base selection logic, matching
SC2's expected behavior where workers always return to the closest
dropoff point.

https://claude.ai/code/session_01FdBRa5qtZZHg1TPE8UVGk6
@braedonsaunders braedonsaunders merged commit 0cda208 into main Jan 30, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/fix-ai-worker-headquarters-5RRnr branch January 30, 2026 04:59
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