diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-02 14:12:28 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-02 14:12:28 +0300 |
| commit | e2887b0d24a751632cc6e9cc7cc77b50b8a35149 (patch) | |
| tree | 82690c136dee0dea0e26bc5e27f45305de52a8ac /apps/fparkan-game/src/mission_overlay.rs | |
| parent | 98569dc5e8ee01b19ee82852a807f6a2b911dae4 (diff) | |
| download | fparkan-e2887b0d24a751632cc6e9cc7cc77b50b8a35149.tar.xz fparkan-e2887b0d24a751632cc6e9cc7cc77b50b8a35149.zip | |
feat(ui): arm warbot self-destruction from the strategic card
Diffstat (limited to 'apps/fparkan-game/src/mission_overlay.rs')
| -rw-r--r-- | apps/fparkan-game/src/mission_overlay.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/fparkan-game/src/mission_overlay.rs b/apps/fparkan-game/src/mission_overlay.rs index 1e3a7d6b..a9f1a828 100644 --- a/apps/fparkan-game/src/mission_overlay.rs +++ b/apps/fparkan-game/src/mission_overlay.rs @@ -281,17 +281,24 @@ impl StaticVulkanApp { .command_view .as_ref() .and_then(|view| view.order_panel(&warbot_rows)); - let manual_control_enabled = selected_warbot + let controls = selected_warbot .zip(self.mission_engine.as_ref().zip(self.cockpit)) - .is_some_and(|(target, (engine, hero))| { - fparkan_runtime::can_control_warbot_remotely(engine, hero, target) + .map_or_else(Default::default, |(target, (engine, hero))| { + fparkan_assets::strategic_roster::CardControls { + cockpit_enabled: fparkan_runtime::can_control_warbot_remotely( + engine, hero, target, + ), + self_destruct_armed: fparkan_runtime::warbot_self_destruct_armed( + engine, target, + ), + } }); roster.draw( renderer, warbot_rows, selected_warbot, card, - manual_control_enabled, + controls, orders, )?; } |
