diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 12:27:06 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 12:27:06 +0300 |
| commit | c846377ead77ef7184cdeddd25c3f2c9d76a6736 (patch) | |
| tree | 6980b05a3fa7ea41b26f64c40ad1fef91849af23 /crates/fparkan-runtime/src/clan_targeting.rs | |
| parent | 7dd027fd5130daf532cd2214a6d9689293bb2c86 (diff) | |
| download | fparkan-c846377ead77ef7184cdeddd25c3f2c9d76a6736.tar.xz fparkan-c846377ead77ef7184cdeddd25c3f2c9d76a6736.zip | |
feat(ui): send warbots to recharge from the strategic panel
Verify LTW-3 approaches the generator and clears its recharge status after leaving from the stock Two Fortresses start. Reuse authored building passages and shared Control replenishment, with a licensed test for refilling an empty magazine.
Diffstat (limited to 'crates/fparkan-runtime/src/clan_targeting.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/clan_targeting.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/fparkan-runtime/src/clan_targeting.rs b/crates/fparkan-runtime/src/clan_targeting.rs index 78967333..ca70a382 100644 --- a/crates/fparkan-runtime/src/clan_targeting.rs +++ b/crates/fparkan-runtime/src/clan_targeting.rs @@ -1,5 +1,5 @@ use crate::{ - building_passage::{capture_entrance, CapturePassage}, + building_passage::{building_entrance, BuildingPassage}, clan_combat_strength::unit_strength, projectile::unit_sphere, MissionControlDeviceTableState, MissionDocument, MissionObjectDraft, TerrainWorld, @@ -50,13 +50,14 @@ pub(super) fn send_capturer( let unit_id = identity_metadata(world, unit.handle).ok()?.original_id?; let clearance = unit_sphere(assets, unit_id.0 as usize, unit_pose).map_or(0.0, |(_, r)| r); let (destination, point, passage) = - if let Some(entrance) = capture_entrance(assets, terrain, index, pose, from, clearance) { - let passage = Some(CapturePassage { + // Behavior::GoInside selects the first Hallway point with flag 0x40. + if let Some(entrance) = building_entrance(assets, terrain, index, pose, from, clearance, 0x40) { + let passage = Some(BuildingPassage { building: unit.target, legs: entrance.legs, opening: None, }); - (entrance.staging, entrance.capture, passage) + (entrance.staging, entrance.goal, passage) } else { let point = nearest_platform_point( crate::mission_events::communicator_triangles(assets, index, class, pose)?, |
