diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 12:45:03 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 12:45:03 +0300 |
| commit | 16d25bd46e16d38e22cab7972ae6ac65196b3e0f (patch) | |
| tree | 17892302deededa0217e2448c6eddd93a8dceae2 /crates/fparkan-runtime/src/lib.rs | |
| parent | 2bf70f8b1eca48ba40215a4e58aaf6b133d84b18 (diff) | |
| download | fparkan-16d25bd46e16d38e22cab7972ae6ac65196b3e0f.tar.xz fparkan-16d25bd46e16d38e22cab7972ae6ac65196b3e0f.zip | |
feat(player): announce a successful building capture
Resolve the neutral or enemy cue through the original voice table. In a stock Constructor window replay the factory capture queues vc_nb_capt.wav before the objective notice.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/lib.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index a67276a3..701a4a2e 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -149,8 +149,8 @@ pub use mesh_collision::{query_building_segment_world, BuildingMeshHit, Building pub use mining::deploy_mine; use mission_events::MissionEvents; pub use mission_events::{ - capture_building, capture_neutral_building, capture_neutral_warbot, MissionEventStop, - MissionEventTick, MissionNotice, + capture_building, capture_building_with_notice, capture_neutral_building, + capture_neutral_warbot, MissionEventStop, MissionEventTick, MissionNotice, }; pub use player_motion::{ plan_player_motion, plan_player_motion_with_collision, PlayerMotion, PlayerMotionStep, @@ -18228,8 +18228,11 @@ mod tests { }; let initial_count = count(&engine); assert_eq!( - capture_building(&mut engine, hero).unwrap(), - Some(factory_id) + capture_building_with_notice(&mut engine, hero).unwrap(), + Some(( + factory_id, + MissionNotice::BuildingCaptured { neutral: false } + )) ); assert_eq!( identity_metadata(&engine.world, factory).unwrap().owner_id, |
