Ship production navigation authoring workflow
This commit is contained in:
1 parent
0798aa5d57
commit
b4aa61e394
35 files changed
+3898
-602
No files matched your search
@@ -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(),
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
@@ -361,6 +361,7 @@ pub fn despawn_static_mesh_parts(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn material_for_entry(
|
||||
asset_server: &AssetServer,
|
||||
materials: &mut Assets<StandardMaterial>,
|
||||
|
||||
Reference in new issue
Block a user