diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-01 17:13:49 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-01 17:13:49 +0300 |
| commit | 18be5a8bf2249e2cff89038e8180e9db9581d71b (patch) | |
| tree | d6506fe5c908e2f67e9396c7f94e23ecee54d301 /apps/fparkan-game/src | |
| parent | f3299bc40b6ced7b654255c8391ef7b0ee24aeef (diff) | |
| download | fparkan-18be5a8bf2249e2cff89038e8180e9db9581d71b.tar.xz fparkan-18be5a8bf2249e2cff89038e8180e9db9581d71b.zip | |
feat(audio): announce low cockpit weapon charge
Diffstat (limited to 'apps/fparkan-game/src')
| -rw-r--r-- | apps/fparkan-game/src/player_fire.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/player_fire.rs b/apps/fparkan-game/src/player_fire.rs index da48d9ec..cf24da35 100644 --- a/apps/fparkan-game/src/player_fire.rs +++ b/apps/fparkan-game/src/player_fire.rs @@ -40,6 +40,19 @@ impl StaticVulkanApp { if let Some(engine) = &mut self.mission_engine { weapons.publish_control_energy(engine, cockpit.handle); } + for slot in weapons.take_low_charge_warnings() { + if let Some(audio) = &mut self.audio { + match audio.queue_game_voice("VOICE_WEAP_ENERGY_OUT") { + Ok(resource) => eprintln!( + "player_weapon_voice slot={} resource={resource} queue_time_ms={clock_ms}", + slot + 1 + ), + Err(error) => eprintln!( + "sim_coverage mission_voice_unavailable=1 notice=VOICE_WEAP_ENERGY_OUT reason={error}" + ), + } + } + } ( shots, weapons |
