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/src/actions.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engine-ecs/src/actions.rs') diff --git a/engine-ecs/src/actions.rs b/engine-ecs/src/actions.rs index bbc19c6..f4967df 100644 --- a/engine-ecs/src/actions.rs +++ b/engine-ecs/src/actions.rs @@ -36,11 +36,11 @@ impl Actions<'_> let components_parts = bundle.iter_component_parts().collect::>(); - if let Some(ComponentParts { name: sole_name, .. }) = components_parts + if let Some(ComponentParts { id: sole_id, .. }) = components_parts .iter() .find(|comp_parts| comp_parts.is_sole) { - panic!("Cannot spawn entity with sole component '{sole_name}'"); + panic!("Cannot spawn entity with sole component {sole_id}"); } self.action_queue @@ -70,11 +70,11 @@ impl Actions<'_> .chain([EntityName { name: name.into() }.into_parts()]) .collect::>(); - if let Some(ComponentParts { name: sole_name, .. }) = components_parts + if let Some(ComponentParts { id: sole_id, .. }) = components_parts .iter() .find(|comp_parts| comp_parts.is_sole) { - panic!("Cannot spawn entity with sole component '{sole_name}'"); + panic!("Cannot spawn entity with sole component {sole_id}"); } self.action_queue @@ -131,11 +131,11 @@ impl Actions<'_> return; } - if let Some(ComponentParts { name: sole_name, .. }) = components_parts + if let Some(ComponentParts { id: sole_id, .. }) = components_parts .iter() .find(|comp_parts| comp_parts.is_sole) { - panic!("Cannot spawn entity with sole component '{sole_name}'"); + panic!("Cannot add sole component {sole_id} to a entity"); } self.action_queue -- cgit v1.2.3-18-g5258