aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 17:13:49 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 17:13:49 +0300
commit18be5a8bf2249e2cff89038e8180e9db9581d71b (patch)
treed6506fe5c908e2f67e9396c7f94e23ecee54d301 /apps
parentf3299bc40b6ced7b654255c8391ef7b0ee24aeef (diff)
downloadfparkan-18be5a8bf2249e2cff89038e8180e9db9581d71b.tar.xz
fparkan-18be5a8bf2249e2cff89038e8180e9db9581d71b.zip
feat(audio): announce low cockpit weapon charge
Diffstat (limited to 'apps')
-rw-r--r--apps/fparkan-game/src/player_fire.rs13
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