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 /apps/fparkan-game/src/player_collision.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 'apps/fparkan-game/src/player_collision.rs')
| -rw-r--r-- | apps/fparkan-game/src/player_collision.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/fparkan-game/src/player_collision.rs b/apps/fparkan-game/src/player_collision.rs index c34422da..4668abd6 100644 --- a/apps/fparkan-game/src/player_collision.rs +++ b/apps/fparkan-game/src/player_collision.rs @@ -250,8 +250,11 @@ mod tests { assert!(z < factory.position[2] - 4.0, "factory cabin at {z}"); assert_eq!(app.terrain.height_at([x, y]).unwrap(), None); assert_eq!( - fparkan_runtime::capture_building(&mut engine, cockpit).unwrap(), - Some(fparkan_world::OriginalObjectId(0)) + fparkan_runtime::capture_building_with_notice(&mut engine, cockpit).unwrap(), + Some(( + fparkan_world::OriginalObjectId(0), + fparkan_runtime::MissionNotice::BuildingCaptured { neutral: true } + )) ); } } |
