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]
pub fn get_id(&self) -> UnitType
[src]
stable unit ID
pub fn get_name(&self) -> &str
[src]
unit type name (corresponds to the game's catalog)
pub fn is_available(&self) -> bool
[src]
whether this unit is available to the current mods/map
pub fn get_cargo_size(&self) -> u32
[src]
number of cargo slots this unit occupies in a transport
pub fn get_mineral_cost(&self) -> u32
[src]
cost in minerals to build this unit
pub fn get_vespene_cost(&self) -> u32
[src]
cost in vespene to build this unit
pub fn get_attributes(&self) -> &[Attribute]
[src]
unit attributes (may change based on upgrades)
pub fn get_movement_speed(&self) -> f32
[src]
movement speed of this unit
pub fn get_armor(&self) -> f32
[src]
armor of this unit
pub fn get_weapons(&self) -> &[Weapon]
[src]
weapons on this unit
pub fn get_food_required(&self) -> f32
[src]
how much food this unit requires
pub fn get_food_provided(&self) -> f32
[src]
how much food this unit provides
pub fn get_ability(&self) -> Ability
[src]
which ability id creates this unit
pub fn get_race(&self) -> Option<Race>
[src]
the race this unit belongs to
pub fn get_build_time(&self) -> f32
[src]
how long a unit takes to build
pub fn has_minerals(&self) -> bool
[src]
whether this unit can have minerals (mineral patches)
pub fn has_vespene(&self) -> bool
[src]
whether this unit can have vespene (vespene geysers)
pub fn get_tech_alias(&self) -> &[UnitType]
[src]
units this is equivalent to in terms of satisfying tech requirements
pub fn get_unit_alias(&self) -> UnitType
[src]
units that are morphed variants of the same unit
pub fn get_tech_requirement(&self) -> UnitType
[src]
structure required to build this unit (or any with same tech alias)
pub fn get_require_attached(&self) -> bool
[src]
whether tech requirement is an addon
Trait Implementations
impl Debug for UnitTypeData
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for UnitTypeData
[src]
fn clone(&self) -> UnitTypeData
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more