pub struct BaseUnitType {Show 60 fields
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,
/* private fields */
}
Fields§
§id: UnitTypeID
§string_id: StringKey
§unit_class: UnitClass
§standing_sprite_1: Option<SpriteID>
§standing_sprite_2: Option<SpriteID>
§dying_sprite: Option<SpriteID>
§undead_sprite: Option<SpriteID>
§undead_flag: u8
§hp: u16
§los: f32
§garrison_capacity: u8
§radius: (f32, f32, f32)
§train_sound: Option<SoundID>
§damage_sound: Option<SoundID>
§death_spawn: Option<UnitTypeID>
§sort_number: u8
§can_be_built_on: bool
§hide_in_scenario_editor: bool
§portrait_picture: Option<GraphicID>
§enabled: bool
§disabled: bool
§tile_req: (i16, i16)
§center_tile_req: (i16, i16)
§construction_radius: (f32, f32)
§elevation_flag: bool
§fog_flag: bool
§terrain_restriction_id: u16
§movement_type: u8
§attribute_max_amount: u16
§attribute_rot: f32
§area_effect_level: u8
§combat_level: u8
§select_level: u8
§map_draw_level: u8
§unit_level: u8
§multiple_attribute_mod: f32
§map_color: u8
§help_string_id: StringKey
§help_page_id: u32
§hotkey_id: u32
§recyclable: bool
§track_as_resource: bool
§create_doppleganger: bool
§resource_group: u8
§occlusion_mask: u8
§obstruction_type: u8
§selection_shape: u8
§object_flags: u32
§civilization: u8
§attribute_piece: u8
§outline_radius: (f32, f32, f32)
§attributes: ArrayVec<[UnitAttribute; 3]>
§damage_sprites: Vec<DamageSprite>
§selected_sound: Option<SoundID>
§death_sound: Option<SoundID>
§attack_reaction: u8
§convert_terrain_flag: u8
§copy_id: u16
§unit_group: u16
Implementations§
Trait Implementations§
Source§impl Clone for BaseUnitType
impl Clone for BaseUnitType
Source§fn clone(&self) -> BaseUnitType
fn clone(&self) -> BaseUnitType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BaseUnitType
impl Debug for BaseUnitType
Source§impl Default for BaseUnitType
impl Default for BaseUnitType
Source§fn default() -> BaseUnitType
fn default() -> BaseUnitType
Returns the “default value” for a type. Read more
Source§impl From<BaseUnitType> for UnitType
impl From<BaseUnitType> for UnitType
Source§fn from(v: BaseUnitType) -> Self
fn from(v: BaseUnitType) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BaseUnitType
impl RefUnwindSafe for BaseUnitType
impl Send for BaseUnitType
impl Sync for BaseUnitType
impl Unpin for BaseUnitType
impl UnwindSafe for BaseUnitType
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