#[repr(C, packed(1))]pub struct UnitInfo {
pub id: u32,
pub name: PaddedString<MAX_NAME_LENGTH>,
pub owner_id: u32,
pub current_amount: u32,
pub total_amount: u32,
pub button_art: PaddedString<MAX_BUTTON_ART_LENGTH>,
pub is_peon: bool,
pub is_functional_peon: bool,
pub damage_dealt: u32,
pub damage_received: u32,
pub healing_done: u32,
}Expand description
Aggregate state for one unit kind owned by a player.
Fields§
§id: u32Game-internal unit ID.
name: PaddedString<MAX_NAME_LENGTH>Display name.
owner_id: u32ID of the owning player.
current_amount: u32Number currently alive.
total_amount: u32Number ever trained / spawned.
Path to the unit’s button icon.
is_peon: boolWhether the unit is classified as a worker.
Not sure how this differs from is_function_peopSelf::is_functional_peon.
is_functional_peon: boolWhether the unit is classified as a worker.
Not sure how this differs from is_peonSelf::is_peon.
damage_dealt: u32Total damage dealt by units of this kind.
damage_received: u32Total damage received by units of this kind.
healing_done: u32Total healing done by units of this kind.
Auto Trait Implementations§
impl Freeze for UnitInfo
impl RefUnwindSafe for UnitInfo
impl Send for UnitInfo
impl Sync for UnitInfo
impl Unpin for UnitInfo
impl UnsafeUnpin for UnitInfo
impl UnwindSafe for UnitInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more