From 1d2ded384e2669d8f48a6b138b232d0eecd214d0 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 1 Dec 2026 16:45:58 +0100 Subject: refactor(engine-ecs): store component::Info in component::Parts --- engine-ecs-macros/src/lib.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'engine-ecs-macros/src') diff --git a/engine-ecs-macros/src/lib.rs b/engine-ecs-macros/src/lib.rs index 4ae83ce..a061165 100644 --- a/engine-ecs-macros/src/lib.rs +++ b/engine-ecs-macros/src/lib.rs @@ -135,9 +135,14 @@ pub fn component_derive(input: TokenStream) -> TokenStream fn into_parts(self) -> #ecs_path::component::Parts { #ecs_path::component::Parts::builder() - .name(::name()) - .type_name(std::any::type_name::()) - .type_reflection(::type_reflection()) + .component_info( + #ecs_path::component::Info::default() + .with_name(::name()) + .with_type_name(std::any::type_name::()) + .with_type_reflection( + ::type_reflection() + ) + ) .build( ::id(), self @@ -257,10 +262,14 @@ pub fn sole_derive(input: TokenStream) -> TokenStream fn into_parts(self) -> #ecs_path::component::Parts { #ecs_path::component::Parts::builder() - .name(::name()) - .type_name(std::any::type_name::()) + .component_info( + #ecs_path::component::Info::default() + .with_name(::name()) + .with_type_name(std::any::type_name::()) + .with_is_sole(true) + .with_type_reflection(::type_reflection()) + ) .is_sole(true) - .type_reflection(::type_reflection()) .build( ::id(), self -- cgit v1.2.3-18-g5258