diff options
| author | HampusM <hampus@hampusmat.com> | 2026-06-06 18:55:07 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-06-06 19:22:04 +0200 |
| commit | 7fe8e9ea15fac647fe8655ee096a9aa5703a97c6 (patch) | |
| tree | d67f60d3275580d3963409bdc34afe8bc811453d /engine-ecs/src/pair.rs | |
| parent | e5d67bf7e36671d290b19064f58bc11616c05b8b (diff) | |
feat(engine-ecs): remove Uid kinds
Diffstat (limited to 'engine-ecs/src/pair.rs')
| -rw-r--r-- | engine-ecs/src/pair.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engine-ecs/src/pair.rs b/engine-ecs/src/pair.rs index 0d353e3..eff0332 100644 --- a/engine-ecs/src/pair.rs +++ b/engine-ecs/src/pair.rs @@ -18,7 +18,7 @@ use crate::query::{ TermsBuilder as QueryTermsBuilder, TermsBuilderInterface, }; -use crate::uid::{Kind as UidKind, PairParams as UidPairParams, Uid, With as WithUid}; +use crate::uid::{PairParams as UidPairParams, Uid, With as WithUid}; use crate::util::impl_multiple; use crate::{Component, EntityComponentRef, World}; @@ -374,16 +374,15 @@ impl<'world, Relation, Target> WithWildcard<'world, Relation, Target> { let component_id = component_ref.id(); - assert!(component_id.kind() == UidKind::Pair); + assert!(component_id.is_pair()); assert!( Relation::uid() == Wildcard::uid() - || component_id.relation_component() == Relation::uid() + || component_id.relation() == Relation::uid() ); assert!( - Target::uid() == Wildcard::uid() - || component_id.target_component() == Target::uid() + Target::uid() == Wildcard::uid() || component_id.target() == Target::uid() ); assert!(Relation::uid() == Wildcard::uid() || Target::uid() == Wildcard::uid()); @@ -472,10 +471,10 @@ where .world .data .component_storage - .get_entity_archetype(self.component_ref.id().target_entity())?; + .get_entity_archetype(self.component_ref.id().target())?; let Some(archetype_entity) = - archetype.get_entity_by_id(self.component_ref.id().target_entity()) + archetype.get_entity_by_id(self.component_ref.id().target()) else { unreachable!(); }; |
