Skip to content

Conversation

@przystuj
Copy link
Contributor

@przystuj przystuj commented Nov 15, 2025

Fix

Recent tweak to this widget made it always target allies (so you could very easily reclaim allied buildings by accident).
I refactored it so that:

Always filter units by target teamId. For enemies use ENEMY_UNITS (so all enemy teams).
alt - filter by unitDefId and teamId
ctrl - filter by teamId. When targeting wreck, filter by techLevel

New feature

Holding Ctrl when targeting wrecks will filter by tech level. So now you can resurrect/reclaim only t2 units, etc

Test steps

  • Check if modifiers work as expected for various commands
  • Check if tech level filtering works as expected

@github-actions
Copy link
Contributor

github-actions bot commented Nov 15, 2025

Test Results

14 tests  ±0   7 ✅ ±0   9s ⏱️ ±0s
 1 suites ±0   7 💤 ±0 
 1 files   ±0   0 ❌ ±0 

Results for commit 11fdb65. ± Comparison against base commit dd9cd09.

♻️ This comment has been updated with latest results.

@przystuj przystuj force-pushed the fix-team-filtering-in-area-command-filter branch from f7048cf to e2b2699 Compare November 15, 2025 23:27
@przystuj
Copy link
Contributor Author

przystuj commented Nov 15, 2025

Reclaim will no longer target allies, regardless of modifiers.
I also disabled loading allied units when Ctrl is held. You already can load them with regular area load command.

Apparently we don't want this behaviour. Now it's:

Always filter units by target teamId. For enemies use ENEMY_UNITS (so all enemy teams).
alt - filter by unitDefId and teamId
ctrl - filter by teamId. When targeting wreck, filter by techLevel

@przystuj przystuj force-pushed the fix-team-filtering-in-area-command-filter branch from e2b2699 to 042f71f Compare November 17, 2025 15:27
@przystuj przystuj force-pushed the fix-team-filtering-in-area-command-filter branch from 042f71f to ffb7b9c Compare November 18, 2025 15:56
@przystuj
Copy link
Contributor Author

Handled the comments + added a command limit, like in smart area reclaim

@przystuj przystuj requested a review from sprunk November 18, 2025 15:58
alt - filter by unitDefId and teamId
ctrl - filter by teamId. When targeting wreck, filter by techLevel instead
@przystuj przystuj force-pushed the fix-team-filtering-in-area-command-filter branch from 7e03452 to 11fdb65 Compare November 19, 2025 13:55
Copy link
Collaborator

@sprunk sprunk left a comment

Choose a reason for hiding this comment

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

Code looks good, modifier design is for somebody else to decide.

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.

3 participants