Struct sc2::data::UnitTypeData [−][src]
pub struct UnitTypeData { /* fields omitted */ }
Data about a unit type.
This data is derived from the catalog (xml) data of the game and upgrades.
Methods
impl UnitTypeData
[src]
impl UnitTypeData
pub fn get_id(&self) -> UnitType
[src]
pub fn get_id(&self) -> UnitType
Stable unit ID.
pub fn get_name(&self) -> &str
[src]
pub fn get_name(&self) -> &str
Unit type name (corresponds to the game's catalog).
pub fn is_available(&self) -> bool
[src]
pub fn is_available(&self) -> bool
Whether this unit is available to the current mods/map.
pub fn get_cargo_size(&self) -> u32
[src]
pub fn get_cargo_size(&self) -> u32
Number of cargo slots this unit occupies in a transport.
pub fn get_mineral_cost(&self) -> u32
[src]
pub fn get_mineral_cost(&self) -> u32
Cost in minerals to build this unit.
pub fn get_vespene_cost(&self) -> u32
[src]
pub fn get_vespene_cost(&self) -> u32
Cost in vespene to build this unit.
pub fn get_attributes(&self) -> &[Attribute]
[src]
pub fn get_attributes(&self) -> &[Attribute]
Unit attributes (may change based on upgrades).
pub fn get_movement_speed(&self) -> f32
[src]
pub fn get_movement_speed(&self) -> f32
Movement speed of this unit.
pub fn get_armor(&self) -> f32
[src]
pub fn get_armor(&self) -> f32
Armor of this unit.
pub fn get_weapons(&self) -> &[Weapon]
[src]
pub fn get_weapons(&self) -> &[Weapon]
Weapons on this unit.
pub fn get_food_required(&self) -> f32
[src]
pub fn get_food_required(&self) -> f32
How much food this unit requires.
pub fn get_food_provided(&self) -> f32
[src]
pub fn get_food_provided(&self) -> f32
How much food this unit provides.
pub fn get_ability(&self) -> Ability
[src]
pub fn get_ability(&self) -> Ability
Which ability id creates this unit.
pub fn get_race(&self) -> Option<Race>
[src]
pub fn get_race(&self) -> Option<Race>
The race this unit belongs to.
pub fn get_build_time(&self) -> f32
[src]
pub fn get_build_time(&self) -> f32
How long a unit takes to build.
pub fn has_minerals(&self) -> bool
[src]
pub fn has_minerals(&self) -> bool
Whether this unit can have minerals (mineral patches).
pub fn has_vespene(&self) -> bool
[src]
pub fn has_vespene(&self) -> bool
Whether this unit can have vespene (vespene geysers).
pub fn get_tech_alias(&self) -> &[UnitType]
[src]
pub fn get_tech_alias(&self) -> &[UnitType]
Units this is equivalent to in terms of satisfying tech requirements.
pub fn get_unit_alias(&self) -> UnitType
[src]
pub fn get_unit_alias(&self) -> UnitType
Units that are morphed variants of the same unit.
pub fn get_tech_requirement(&self) -> UnitType
[src]
pub fn get_tech_requirement(&self) -> UnitType
Structure required to build this unit (or any with same tech alias).
pub fn get_require_attached(&self) -> bool
[src]
pub fn get_require_attached(&self) -> bool
Whether tech requirement is an addon.
Trait Implementations
impl Debug for UnitTypeData
[src]
impl Debug for UnitTypeData
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for UnitTypeData
[src]
impl Clone for UnitTypeData
fn clone(&self) -> UnitTypeData
[src]
fn clone(&self) -> UnitTypeData
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for UnitTypeData
impl Send for UnitTypeData
impl Sync for UnitTypeData
impl Sync for UnitTypeData