summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-04-27 15:54:19 +0200
committerHampusM <hampus@hampusmat.com>2025-04-27 15:54:19 +0200
commita140deb288c4682dddbc269696327ae8e4d28a97 (patch)
tree883a83007111896e14df2ac27b63e3e35f8973fa
parentf4670bd8b3b476f8557092e2118a00ff06cbed71 (diff)
fix(ecs): exclude wildcard pair UIDs from imaginary archetype IDsHEADmaster
-rw-r--r--ecs/src/component/storage.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs
index 7361caf..b27b552 100644
--- a/ecs/src/component/storage.rs
+++ b/ecs/src/component/storage.rs
@@ -105,7 +105,12 @@ impl Storage
self.imaginary_archetypes
.borrow_mut()
.push(ImaginaryArchetype {
- id: archetype_id,
+ id: ArchetypeId::new(search_terms.required_components.iter().filter(
+ |required_comp_id| {
+ required_comp_id.kind() != UidKind::Pair
+ || required_comp_id.target_component() != Uid::wildcard()
+ },
+ )),
component_ids: search_terms
.required_components
.iter()