From dcba82d1cdf4a70ab879d8af0a623a10deecb544 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 2 Dec 2026 08:00:08 +0400 Subject: feat(factory): build newly loaded projects without restarting the mission Transfer a saved design from the original designer panel, prepare it with the regular AniMesh scene builder, and queue the selected factory order. Appended world batches keep existing draw handles and gain the normal cockpit, walking animation, weapon and shield bindings. The Field Camp window witness adds a one-gun Unit DAT after mission start, uses the normal transfer and order controls, supplies the factory with a scripted test fixture, and captures the released unit with Vulkan validation clean. The two licensed factory tests also verify the assembled component records and weapon control. --- apps/fparkan-game/src/chassis_animation.rs | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'apps/fparkan-game/src/chassis_animation.rs') diff --git a/apps/fparkan-game/src/chassis_animation.rs b/apps/fparkan-game/src/chassis_animation.rs index 3691c181..d5ea3260 100644 --- a/apps/fparkan-game/src/chassis_animation.rs +++ b/apps/fparkan-game/src/chassis_animation.rs @@ -103,11 +103,28 @@ pub(super) fn update_treads( } pub(super) fn connect_walkers(engine: &Engine, scene: &mut StaticPreviewScene) { + connect_walking_objects( + engine, + 0, + &mut scene.control_animation_instances, + &mut scene.dynamic_component_geometry, + &mut scene.dynamic_shadow_casters, + ); +} + +pub(super) fn connect_walking_objects( + engine: &Engine, + start: usize, + instances: &mut [Vec>], + models: &mut [Vec>], + casters: &mut [super::DynamicShadowCaster], +) { let Some(assets) = loaded_mission_assets(engine) else { return; }; let mut clips = HashMap::new(); - for (index, components) in scene.control_animation_instances.iter_mut().enumerate() { + for (offset, components) in instances.iter_mut().enumerate() { + let index = start + offset; if !loaded_walk_chassis(engine, index) { continue; } @@ -131,11 +148,10 @@ pub(super) fn connect_walkers(engine: &Engine, scene: &mut StaticPreviewScene) { if root.walk.is_none() { continue; } - for geometry in scene.dynamic_component_geometry[index].iter_mut().flatten() { + for geometry in models[offset].iter_mut().flatten() { geometry.animated = true; } - for caster in scene - .dynamic_shadow_casters + for caster in casters .iter_mut() .filter(|caster| caster.object_index == index) { -- cgit v1.2.3