diff options
| author | HampusM <hampus@hampusmat.com> | 2026-12-01 16:45:58 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-12-01 16:45:58 +0100 |
| commit | 1d2ded384e2669d8f48a6b138b232d0eecd214d0 (patch) | |
| tree | 024901d141e990dc059a8f30a89e6a9663477149 /engine-ecs/src/actions.rs | |
| parent | 607de6051f62652ac2799ec73ef0052436be5d62 (diff) | |
refactor(engine-ecs): store component::Info in component::Parts
Diffstat (limited to 'engine-ecs/src/actions.rs')
| -rw-r--r-- | engine-ecs/src/actions.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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::<Vec<_>>(); - 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::<Vec<_>>(); - 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 |
