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 UnitTypeDatapub fn get_id(&self) -> UnitType[src]
pub fn get_id(&self) -> UnitTypeStable unit ID.
pub fn get_name(&self) -> &str[src]
pub fn get_name(&self) -> &strUnit type name (corresponds to the game's catalog).
pub fn is_available(&self) -> bool[src]
pub fn is_available(&self) -> boolWhether this unit is available to the current mods/map.
pub fn get_cargo_size(&self) -> u32[src]
pub fn get_cargo_size(&self) -> u32Number of cargo slots this unit occupies in a transport.
pub fn get_mineral_cost(&self) -> u32[src]
pub fn get_mineral_cost(&self) -> u32Cost in minerals to build this unit.
pub fn get_vespene_cost(&self) -> u32[src]
pub fn get_vespene_cost(&self) -> u32Cost 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) -> f32Movement speed of this unit.
pub fn get_armor(&self) -> f32[src]
pub fn get_armor(&self) -> f32Armor 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) -> f32How much food this unit requires.
pub fn get_food_provided(&self) -> f32[src]
pub fn get_food_provided(&self) -> f32How much food this unit provides.
pub fn get_ability(&self) -> Ability[src]
pub fn get_ability(&self) -> AbilityWhich 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) -> f32How long a unit takes to build.
pub fn has_minerals(&self) -> bool[src]
pub fn has_minerals(&self) -> boolWhether this unit can have minerals (mineral patches).
pub fn has_vespene(&self) -> bool[src]
pub fn has_vespene(&self) -> boolWhether 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) -> UnitTypeUnits that are morphed variants of the same unit.
pub fn get_tech_requirement(&self) -> UnitType[src]
pub fn get_tech_requirement(&self) -> UnitTypeStructure 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) -> boolWhether tech requirement is an addon.
Trait Implementations
impl Debug for UnitTypeData[src]
impl Debug for UnitTypeDatafn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
fn fmt(&self, __arg_0: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for UnitTypeData[src]
impl Clone for UnitTypeDatafn clone(&self) -> UnitTypeData[src]
fn clone(&self) -> UnitTypeDataReturns 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 UnitTypeDataimpl Sync for UnitTypeData
impl Sync for UnitTypeData