From 099e48fa775b849654d1102a6c1d9e84ded7e1f4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 3 Dec 2026 19:00:18 +0400 Subject: feat(game): cycle warbot cockpit control modes --- crates/fparkan-runtime/src/player_weapon.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/fparkan-runtime/src/player_weapon.rs') diff --git a/crates/fparkan-runtime/src/player_weapon.rs b/crates/fparkan-runtime/src/player_weapon.rs index 4cc35fcc..944ab574 100644 --- a/crates/fparkan-runtime/src/player_weapon.rs +++ b/crates/fparkan-runtime/src/player_weapon.rs @@ -110,6 +110,12 @@ enum FirePhase { } impl PlayerWeapons { + pub(super) fn adopt_cycle_from(&mut self, other: &Self) { + let selection = self.selection; + self.clone_from(other); + self.selection = selection; + } + /// Read the same slot, cycle and budget that drive manual firing. pub fn indicators(&self) -> impl Iterator + '_ { self.weapons.iter().enumerate().map(|(slot, weapon)| { -- cgit v1.2.3