pub struct Group {
pub ai_id: i32,
pub group_id: i32,
}
Fields§
§ai_id: i32
§group_id: i32
Implementations§
Source§impl Group
impl Group
pub fn add_unit( &mut self, unit: Unit, options: Vec<UnitCommandOptions>, timeout: Option<i32>, ) -> Result<(), Box<dyn Error>>
pub fn select( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn attack( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn attack_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn build<P: Position>( &self, options: &[UnitCommandOptions], timeout: Option<i32>, to_build_unit_def_id: UnitDef, position: P, facing: Facing, ) -> Result<(), Box<dyn Error>>
pub fn capture( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn capture_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn cloak( &self, options: &[UnitCommandOptions], timeout: Option<i32>, cloak: bool, ) -> Result<(), &'static str>
pub fn custom_command( &self, options: &[UnitCommandOptions], timeout: Option<i32>, command_id: i32, parameters: Vec<f32>, ) -> Result<(), &'static str>
pub fn dgun_unit( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn fight( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], ) -> Result<(), &'static str>
pub fn guard( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn load_onto( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn load_units( &self, options: &[UnitCommandOptions], timeout: Option<i32>, targets: &[Unit], ) -> Result<(), &'static str>
pub fn load_units_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn move_unit( &self, options: &[UnitCommandOptions], timeout: Option<i32>, to_pos: [f32; 3], ) -> Result<(), &'static str>
pub fn patrol( &self, options: &[UnitCommandOptions], timeout: Option<i32>, to_pos: [f32; 3], ) -> Result<(), &'static str>
pub fn reclaim_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn reclaim_feature( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Feature, ) -> Result<(), &'static str>
pub fn reclaim_unit( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn repair_unit( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn restore_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn resurrect_unit( &self, options: &[UnitCommandOptions], timeout: Option<i32>, target: Unit, ) -> Result<(), &'static str>
pub fn resurrect_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn self_destruct( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn set_auto_repair_level( &self, options: &[UnitCommandOptions], timeout: Option<i32>, auto_repair_level: i32, ) -> Result<(), &'static str>
pub fn set_base_command( &self, options: &[UnitCommandOptions], timeout: Option<i32>, base_position: [f32; 3], ) -> Result<(), &'static str>
pub fn set_fire_state( &self, options: &[UnitCommandOptions], timeout: Option<i32>, fire_state: FireState, ) -> Result<(), &'static str>
pub fn set_idle_mode( &self, options: &[UnitCommandOptions], timeout: Option<i32>, idle_mode: IdleMode, ) -> Result<(), &'static str>
pub fn set_move_state( &self, options: &[UnitCommandOptions], timeout: Option<i32>, move_state: MoveState, ) -> Result<(), &'static str>
pub fn set_on_off( &self, options: &[UnitCommandOptions], timeout: Option<i32>, on: bool, ) -> Result<(), &'static str>
pub fn set_repeat( &self, options: &[UnitCommandOptions], timeout: Option<i32>, repeat: bool, ) -> Result<(), &'static str>
pub fn set_trajectory( &self, options: &[UnitCommandOptions], timeout: Option<i32>, trajectory: Trajectory, ) -> Result<(), &'static str>
pub fn stockpile( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn stop( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn unload( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], to_unload_unit: Unit, ) -> Result<(), &'static str>
pub fn unload_area( &self, options: &[UnitCommandOptions], timeout: Option<i32>, position: [f32; 3], radius: f32, ) -> Result<(), &'static str>
pub fn wait( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn wait_death( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn wait_gather( &self, options: &[UnitCommandOptions], timeout: Option<i32>, ) -> Result<(), &'static str>
pub fn wait_squad( &self, options: &[UnitCommandOptions], timeout: Option<i32>, num_units: i32, ) -> Result<(), &'static str>
pub fn wait_time( &self, options: &[UnitCommandOptions], timeout: Option<i32>, time: i32, ) -> Result<(), &'static str>
Source§impl Group
impl Group
pub fn supported_commands( &self, ) -> Result<Vec<GroupSupportedCommand>, Box<dyn Error>>
pub fn unit_defs(&self) -> Result<Vec<UnitDef>, Box<dyn Error>>
pub fn units(&self) -> Result<Vec<Unit>, Box<dyn Error>>
pub fn order_preview(&self) -> Result<GroupOrderPreview, Box<dyn Error>>
pub fn is_selected(&self) -> Result<bool, Box<dyn Error>>
pub fn all(&self) -> Result<GroupAll, Box<dyn Error>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Group
impl<'de> Deserialize<'de> for Group
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Group
impl Eq for Group
impl StructuralPartialEq for Group
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnwindSafe for Group
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.