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 a Includes query filter for working with disabling components #17803

Open
alice-i-cecile opened this issue Feb 11, 2025 · 0 comments
Open
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@alice-i-cecile
Copy link
Member

IMO this should include an example of a Query that matches entities that are both enabled and disabled. The ones shown match only entities that are disabled.

Has matches both!

Ah right. It still feels kinda hacky though.

Originally posted by @SkiFire13 in #17768 (comment)

When working with default query filters, it's reasonably common to want to be agnostic to the presence of a given disabling component.

Currently, users can stick a Has or Option query data term in there, and get the desired behavior, but they often don't want the information contained in that term.

We should provide them with a query filter equivalent, which I think should be called Includes<C>. This filter would be absolutely useless for normal components, as it includes entities with or without C. But if we set the access up correctly, this should trick DQF into showing us the entities we want, regardless of whether or not they have C.

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-ECS Entities, components, systems, and events D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Feb 11, 2025
@alice-i-cecile alice-i-cecile changed the title Add a Include query filter for working with disabling components Add a Includes query filter for working with disabling components Feb 11, 2025
@alice-i-cecile alice-i-cecile added the S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

No branches or pull requests

1 participant