pub struct AreMiniGameGunBank {
pub bank_id: u32,
pub gun_model: ResRef,
pub bullet: Option<AreMiniGameBullet>,
pub fire_sound: ResRef,
pub targeting: Option<AreMiniGameTargeting>,
}Expand description
One entry in a vehicle’s Gun_Banks list.
Fields§
§bank_id: u32Which hardpoint this bank occupies (BankID).
BANK_ID_NONE means the engine skips the bank entirely.
gun_model: ResRefGun model resref (Gun_Model).
An invalid or absent resref aborts the bank, so an empty value here describes a bank that will not be created.
bullet: Option<AreMiniGameBullet>Ballistics (Bullet), absent when the bank carries no such struct.
Option because absence is not the same as a zeroed struct. The
engine skips a bank with no Bullet; a view that materialised an
all-zero one and wrote it back would turn a bank the engine drops into
one it creates and fires at zero speed. That is a silent change of
meaning on write, which is the failure this type exists to avoid.
fire_sound: ResRefSound played when the bank fires (Fire_Sound).
A sibling of Bullet, not a field inside it, despite reading like one.
targeting: Option<AreMiniGameTargeting>AI aiming parameters, present on enemy banks and absent on the player’s.
Trait Implementations§
Source§impl Clone for AreMiniGameGunBank
impl Clone for AreMiniGameGunBank
Source§fn clone(&self) -> AreMiniGameGunBank
fn clone(&self) -> AreMiniGameGunBank
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AreMiniGameGunBank
impl Debug for AreMiniGameGunBank
Source§impl Default for AreMiniGameGunBank
impl Default for AreMiniGameGunBank
Source§impl PartialEq for AreMiniGameGunBank
impl PartialEq for AreMiniGameGunBank
Source§fn eq(&self, other: &AreMiniGameGunBank) -> bool
fn eq(&self, other: &AreMiniGameGunBank) -> bool
self and other values to be equal, and is used by ==.