diff options
| author | Valentin Popov <valentin@popov.link> | 2026-12-03 18:00:18 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-12-03 18:00:18 +0300 |
| commit | 099e48fa775b849654d1102a6c1d9e84ded7e1f4 (patch) | |
| tree | 25864aa84bdb465d0ca52f5d28c5a1b20a23e041 /crates/fparkan-runtime/src/player_weapon.rs | |
| parent | 4b9277258224ab846b84cafe1d6a3b91e29a05c5 (diff) | |
| download | fparkan-099e48fa775b849654d1102a6c1d9e84ded7e1f4.tar.xz fparkan-099e48fa775b849654d1102a6c1d9e84ded7e1f4.zip | |
feat(game): cycle warbot cockpit control modes
Diffstat (limited to 'crates/fparkan-runtime/src/player_weapon.rs')
| -rw-r--r-- | crates/fparkan-runtime/src/player_weapon.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<Item = WeaponIndicator> + '_ { self.weapons.iter().enumerate().map(|(slot, weapon)| { |
