Ship production navigation authoring workflow

This commit is contained in:
Rbanh committed 2026-07-12 02:53:43 -04:00
1 parent 0798aa5d57
commit b4aa61e394
35 files changed
+3898 -602

No files matched your search

+32 -44
View File
@@ -147,23 +147,20 @@ pub fn flush_level_object_hydration(world: &mut World) {
Option<&InspectorOrder>,
), With<LevelObject>>()
.iter(world)
.filter_map(|(entity, brush, material, collider, states, order)| {
authoring_component_active(states, order, COMPONENT_BRUSH_DESC).then(|| {
(
entity,
brush.clone(),
material
.filter(|_| {
authoring_component_active(states, order, COMPONENT_MATERIAL_DESC)
})
.cloned(),
collider
.filter(|_| {
authoring_component_active(states, order, COMPONENT_COLLIDER_DESC)
})
.cloned(),
)
})
.filter(|(_, _, _, _, states, order)| {
authoring_component_active(*states, *order, COMPONENT_BRUSH_DESC)
})
.map(|(entity, brush, material, collider, states, order)| {
(
entity,
brush.clone(),
material
.filter(|_| authoring_component_active(states, order, COMPONENT_MATERIAL_DESC))
.cloned(),
collider
.filter(|_| authoring_component_active(states, order, COMPONENT_COLLIDER_DESC))
.cloned(),
)
})
.collect();
@@ -190,34 +187,25 @@ pub fn flush_level_object_hydration(world: &mut World) {
Option<&InspectorOrder>,
), With<LevelObject>>()
.iter(world)
.filter_map(
.filter(|(_, _, _, _, _, states, order)| {
authoring_component_active(*states, *order, COMPONENT_STATIC_MESH_RENDERER)
})
.map(
|(entity, renderer, material, material_override, collider, states, order)| {
authoring_component_active(states, order, COMPONENT_STATIC_MESH_RENDERER).then(
|| {
(
entity,
renderer.clone(),
material
.filter(|_| {
authoring_component_active(
states,
order,
COMPONENT_MATERIAL_DESC,
)
})
.cloned(),
material_override.cloned(),
collider
.filter(|_| {
authoring_component_active(
states,
order,
COMPONENT_COLLIDER_DESC,
)
})
.cloned(),
)
},
(
entity,
renderer.clone(),
material
.filter(|_| {
authoring_component_active(states, order, COMPONENT_MATERIAL_DESC)
})
.cloned(),
material_override.cloned(),
collider
.filter(|_| {
authoring_component_active(states, order, COMPONENT_COLLIDER_DESC)
})
.cloned(),
)
},
)