Skip to content

fix: update getEntitiesWith to handle Selectable component queries#1230

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-unit-selection-VWYLy
Feb 2, 2026
Merged

fix: update getEntitiesWith to handle Selectable component queries#1230
braedonsaunders merged 1 commit into
mainfrom
claude/fix-unit-selection-VWYLy

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

SelectionSystem queries for entities using getEntitiesWith('Transform', 'Selectable'), but RenderStateWorldAdapter was only returning entities for 'Unit' or 'Transform' alone queries. This caused the selection system to receive no entities when trying to select.

Updated getEntitiesWith to properly handle Selectable queries:

  • ('Transform', 'Selectable') now returns both units and buildings
  • Explicit conditions for when to include units, buildings, and resources
  • Added documentation for supported query patterns

https://claude.ai/code/session_01VWGwpnz8yMDkYjicbv2dZ7

SelectionSystem queries for entities using getEntitiesWith('Transform', 'Selectable'),
but RenderStateWorldAdapter was only returning entities for 'Unit' or 'Transform' alone
queries. This caused the selection system to receive no entities when trying to select.

Updated getEntitiesWith to properly handle Selectable queries:
- ('Transform', 'Selectable') now returns both units and buildings
- Explicit conditions for when to include units, buildings, and resources
- Added documentation for supported query patterns

https://claude.ai/code/session_01VWGwpnz8yMDkYjicbv2dZ7
@braedonsaunders braedonsaunders merged commit 30fe145 into main Feb 2, 2026
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