[][src]Struct genie_dat::BaseUnitType

pub struct BaseUnitType {
    pub id: UnitTypeID,
    pub string_id: StringKey,
    pub unit_class: UnitClass,
    pub standing_sprite_1: Option<SpriteID>,
    pub standing_sprite_2: Option<SpriteID>,
    pub dying_sprite: Option<SpriteID>,
    pub undead_sprite: Option<SpriteID>,
    pub undead_flag: u8,
    pub hp: u16,
    pub los: f32,
    pub garrison_capacity: u8,
    pub radius: (f32, f32, f32),
    pub train_sound: Option<SoundID>,
    pub damage_sound: Option<SoundID>,
    pub death_spawn: Option<UnitTypeID>,
    pub sort_number: u8,
    pub can_be_built_on: bool,
    pub button_picture: Option<GraphicID>,
    pub hide_in_scenario_editor: bool,
    pub portrait_picture: Option<GraphicID>,
    pub enabled: bool,
    pub disabled: bool,
    pub tile_req: (i16, i16),
    pub center_tile_req: (i16, i16),
    pub construction_radius: (f32, f32),
    pub elevation_flag: bool,
    pub fog_flag: bool,
    pub terrain_restriction_id: u16,
    pub movement_type: u8,
    pub attribute_max_amount: u16,
    pub attribute_rot: f32,
    pub area_effect_level: u8,
    pub combat_level: u8,
    pub select_level: u8,
    pub map_draw_level: u8,
    pub unit_level: u8,
    pub multiple_attribute_mod: f32,
    pub map_color: u8,
    pub help_string_id: StringKey,
    pub help_page_id: u32,
    pub hotkey_id: u32,
    pub recyclable: bool,
    pub track_as_resource: bool,
    pub create_doppleganger: bool,
    pub resource_group: u8,
    pub occlusion_mask: u8,
    pub obstruction_type: u8,
    pub selection_shape: u8,
    pub object_flags: u32,
    pub civilization: u8,
    pub attribute_piece: u8,
    pub outline_radius: (f32, f32, f32),
    pub attributes: ArrayVec<[UnitAttribute; 3]>,
    pub damage_sprites: Vec<DamageSprite>,
    pub selected_sound: Option<SoundID>,
    pub death_sound: Option<SoundID>,
    pub attack_reaction: u8,
    pub convert_terrain_flag: u8,
    pub copy_id: u16,
    pub unit_group: u16,
    // some fields omitted
}

Fields

id: UnitTypeIDstring_id: StringKeyunit_class: UnitClassstanding_sprite_1: Option<SpriteID>standing_sprite_2: Option<SpriteID>dying_sprite: Option<SpriteID>undead_sprite: Option<SpriteID>undead_flag: u8hp: u16los: f32garrison_capacity: u8radius: (f32, f32, f32)train_sound: Option<SoundID>damage_sound: Option<SoundID>death_spawn: Option<UnitTypeID>sort_number: u8can_be_built_on: boolbutton_picture: Option<GraphicID>hide_in_scenario_editor: boolportrait_picture: Option<GraphicID>enabled: booldisabled: booltile_req: (i16, i16)center_tile_req: (i16, i16)construction_radius: (f32, f32)elevation_flag: boolfog_flag: boolterrain_restriction_id: u16movement_type: u8attribute_max_amount: u16attribute_rot: f32area_effect_level: u8combat_level: u8select_level: u8map_draw_level: u8unit_level: u8multiple_attribute_mod: f32map_color: u8help_string_id: StringKeyhelp_page_id: u32hotkey_id: u32recyclable: booltrack_as_resource: boolcreate_doppleganger: boolresource_group: u8occlusion_mask: u8obstruction_type: u8selection_shape: u8object_flags: u32civilization: u8attribute_piece: u8outline_radius: (f32, f32, f32)attributes: ArrayVec<[UnitAttribute; 3]>damage_sprites: Vec<DamageSprite>selected_sound: Option<SoundID>death_sound: Option<SoundID>attack_reaction: u8convert_terrain_flag: u8copy_id: u16unit_group: u16

Implementations

impl BaseUnitType[src]

pub fn read_from(input: impl Read, version: f32) -> Result<Self>[src]

pub fn write_to(&self, output: impl Write, _version: f32) -> Result<()>[src]

Write this unit type to an output stream.

Trait Implementations

impl Clone for BaseUnitType[src]

impl Debug for BaseUnitType[src]

impl Default for BaseUnitType[src]

impl From<BaseUnitType> for UnitType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.