From 8ba11038a22e78d6c2aeedbc47f5ce3198b5624a Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 3 Nov 2024 21:14:29 +0100 Subject: chore(ecs-macros): add Ref type to Component impls --- ecs-macros/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ecs-macros') diff --git a/ecs-macros/src/lib.rs b/ecs-macros/src/lib.rs index 21e8053..3d0de6d 100644 --- a/ecs-macros/src/lib.rs +++ b/ecs-macros/src/lib.rs @@ -56,9 +56,13 @@ pub fn component_derive(input: TokenStream) -> TokenStream #where_clause { type Component = Self; + type RefMut<'component> = #ecs_path::system::ComponentRefMut<'component, Self>; + type Ref<'component> = + #ecs_path::system::ComponentRef<'component, Self>; + fn id(&self) -> #ecs_path::component::Id { #ecs_path::component::Id::of::() -- cgit v1.2.3-18-g5258