Struct sc2::UnitTypeData
[−]
[src]
pub struct UnitTypeData { pub unit_type: UnitType, pub name: String, pub available: bool, pub cargo_size: u32, pub mineral_cost: u32, pub vespene_cost: u32, pub attributes: Vec<Attribute>, pub movement_speed: f32, pub armor: f32, pub weapons: Vec<Weapon>, pub food_required: f32, pub food_provided: f32, pub ability: Ability, pub race: Option<Race>, pub build_time: f32, pub has_minerals: bool, pub has_vespene: bool, pub tech_alias: Vec<UnitType>, pub unit_alias: UnitType, pub tech_requirement: UnitType, pub require_attached: bool, }
data about a unit type
this data is derived from the catalog (xml) data of the game and upgrades
Fields
unit_type: UnitType
stable unit ID
name: String
unit type name (corresponds to the game's catalog)
available: bool
whether this unit is available to the current mods/map
cargo_size: u32
number of cargo slots this unit occupies in a transport
mineral_cost: u32
cost in minerals to build this unit
vespene_cost: u32
cost in vespene to build this unit
attributes: Vec<Attribute>
unit attributes (may change based on upgrades)
movement_speed: f32
movement speed of this unit
armor: f32
armor of this unit
weapons: Vec<Weapon>
weapons on this unit
food_required: f32
how much food this unit requires
food_provided: f32
how much food this unit provides
ability: Ability
which ability id creates this unit
race: Option<Race>
the race this unit belongs to
build_time: f32
how long a unit takes to build
has_minerals: bool
whether this unit can have minerals (mineral patches)
has_vespene: bool
whether this unit can have vespene (vespene geysers)
tech_alias: Vec<UnitType>
units this is equivalent to in terms of satisfying tech requirements
unit_alias: UnitType
units that are morphed variants of the same unit
tech_requirement: UnitType
structure required to build this unit (or any with same tech alias)
require_attached: bool
whether tech requirement is an addon
Trait Implementations
impl Debug for UnitTypeData
[src]
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