use crate::StaticVulkanApp; use fparkan_runtime::{at_research_laboratory, order_lab_research, toggle_self_repair}; impl StaticVulkanApp { pub(super) fn handle_player_service(&mut self, clock_ms: u32) { let (true, Some(cockpit), Some(engine)) = ( std::mem::take(&mut self.player_service_pressed), self.cockpit, self.mission_engine.as_mut(), ) else { return; }; if self.boarded_hero_index.is_none() && at_research_laboratory(engine, cockpit) { match order_lab_research(engine, cockpit, clock_ms) { Ok((component, duration)) => { eprintln!("laboratory_research_order component={component} duration_ms={duration} queue_time_ms={clock_ms}"); } Err(error) => eprintln!("laboratory_research_rejected {error}"), } return; } if let Some(enabled) = toggle_self_repair(engine, cockpit) { eprintln!("player_self_repair enabled={enabled} queue_time_ms={clock_ms}"); if let Some(audio) = &mut self.audio { let voice = if enabled { "VOICE_REPAIR_SYS_ON" } else { "VOICE_REPAIR_SYS_OFF" }; if let Err(error) = audio.queue_game_voice(voice) { eprintln!( "sim_coverage mission_voice_unavailable=1 notice={voice} reason={error}" ); } } } } }