From 47504e744398d16c013b976aade043fe5372e31e Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 31 Aug 2026 06:26:07 +0200 Subject: fix(engine): make soles not addable to entities in world ui view --- engine/src/ui/view/world.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/engine/src/ui/view/world.rs b/engine/src/ui/view/world.rs index ff4c13a..143ff84 100644 --- a/engine/src/ui/view/world.rs +++ b/engine/src/ui/view/world.rs @@ -608,7 +608,9 @@ fn enter_add_component_popup_state( .query::<(&ComponentInfo,)>() .iter_with_euids() .map(|(id, (component_info,))| { - let user_creatable = if component_info.type_reflection.is_none() { + let user_creatable = if component_info.is_sole { + ComponentUserCreatable::No { reason: "is a sole" } + } else if component_info.type_reflection.is_none() { ComponentUserCreatable::No { reason: "no type reflection" } } else if component_info .type_reflection @@ -796,10 +798,11 @@ fn show_add_component_popup( { actions.add_components( add_component_popup_state.target_entity_id, - [ComponentParts::builder() - .name(new_component_info.name) - .type_reflection(new_component_info.type_reflection) - .build_with_any_data(new_component_id, new_component_data)], + [ComponentParts::from_component_info( + &new_component_info, + new_component_id, + new_component_data, + )], ); return true; -- cgit v1.2.3-18-g5258