From 09c2d0778d5ecffb1c575883232f57aeeb5ac3f0 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 2 Dec 2026 20:59:56 +0400 Subject: feat(ui): show the selected target in the left cockpit instrument --- crates/fparkan-runtime/src/strategic_map_readout.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/fparkan-runtime/src/strategic_map_readout.rs') diff --git a/crates/fparkan-runtime/src/strategic_map_readout.rs b/crates/fparkan-runtime/src/strategic_map_readout.rs index 00eae097..6b633433 100644 --- a/crates/fparkan-runtime/src/strategic_map_readout.rs +++ b/crates/fparkan-runtime/src/strategic_map_readout.rs @@ -29,6 +29,7 @@ pub fn contact_at( ) -> Option { let handle = satellite_contacts::pick_contact(engine, cockpit, point)?; contact_readout(engine, cockpit, handle) + .filter(|contact| contact.class != crate::projectile::ANIMAL_UNIT_CLASS) } pub(super) fn contact_readout( @@ -53,7 +54,9 @@ pub(super) fn contact_readout( .get(&original) .and_then(|flags| flags.chassis_type) .unwrap_or(0); - let (name_label, callsign, order_label) = if building { + let (name_label, callsign, order_label) = if class == crate::projectile::ANIMAL_UNIT_CLASS { + (0x186d, None, None) + } else if building { (building_label(class, size), None, None) } else { let (role, label) = match class { @@ -62,7 +65,6 @@ pub(super) fn contact_readout( 0x0100_8000 => ('W', 0x183a), 0x0101_0000 => ('C', 0x183b), HERO_UNIT_CLASS => ('?', 0x1856), - // Animals have map marks but no footer. _ => return None, }; let callsign = (class != HERO_UNIT_CLASS) -- cgit v1.2.3