Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit::noGroup and Get/SetUnitNoGroup #1853

Merged
merged 3 commits into from
Jan 11, 2025

Conversation

saurtron
Copy link
Collaborator

@saurtron saurtron commented Dec 26, 2024

Work done

  • Add noGroup flag for units
  • Add lua Get/SetUnitNoGroup

Remarks

  • Implemented this so blocking units being added to groups can be controlled in the same way as to selection
  • Units in a group, even if they could be unselectable due to noSelect will affect the group centroid.

@saurtron saurtron added the status: candidate PRs that should be good to go or important for next release label Dec 27, 2024
@lhog
Copy link
Collaborator

lhog commented Jan 11, 2025

Looking ok to merge, though I struggle with the use case a little bit.
In what cases you'll want units to be selectable by not group-able. Wouldn't it look like a bug?

@saurtron
Copy link
Collaborator Author

saurtron commented Jan 11, 2025

Looking ok to merge, though I struggle with the use case a little bit. In what cases you'll want units to be selectable by not group-able. Wouldn't it look like a bug?

you can try #1824 if you want xd, personally got tired of fighting for that so I went for the other possible path which is this + #1850

@lhog
Copy link
Collaborator

lhog commented Jan 11, 2025

Looking ok to merge, though I struggle with the use case a little bit. In what cases you'll want units to be selectable by not group-able. Wouldn't it look like a bug?

you can try #1824 if you want xd, personally got tired of fighting for that so I went for the other possible path which is this + #1850

This ones are better than #1824
So the only reason to have this is to precisely control behavior of groups membership, for the use cases we're yet to see?

@sprunk
Copy link
Collaborator

sprunk commented Jan 11, 2025

Use case for selectable but ungroupable would be something like goblin shops from wc3. But more importantly there's use cases for groupable but unselectable which means groupability and selectability are separate states which warrant atomic calls.

@lhog lhog merged commit 7ef475c into beyond-all-reason:master Jan 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: candidate PRs that should be good to go or important for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants