pub struct ContainerAbsolute { /* private fields */ }Expand description
A container block positioned at absolute coordinates on the battlefield.
Defines how units should be arranged at a specific location, including their spacing, arrangement pattern, and which types of units should occupy this position.
Implementations§
Source§impl ContainerAbsolute
impl ContainerAbsolute
Sourcepub fn block_priority(&self) -> &f32
pub fn block_priority(&self) -> &f32
Priority for filling this block (higher priority blocks are filled first).
Sourcepub fn entity_arrangement(&self) -> &EntityArrangement
pub fn entity_arrangement(&self) -> &EntityArrangement
How units should be arranged (line, column, crescent, etc.).
Sourcepub fn inter_entity_spacing(&self) -> &f32
pub fn inter_entity_spacing(&self) -> &f32
Spacing between units in this block.
Sourcepub fn crescent_y_offset(&self) -> &f32
pub fn crescent_y_offset(&self) -> &f32
Y-axis offset for crescent formations.
Sourcepub fn position_x(&self) -> &f32
pub fn position_x(&self) -> &f32
X coordinate of this block’s position.
Sourcepub fn position_y(&self) -> &f32
pub fn position_y(&self) -> &f32
Y coordinate of this block’s position.
Sourcepub fn minimum_entity_threshold(&self) -> &i32
pub fn minimum_entity_threshold(&self) -> &i32
Minimum number of units required to use this block.
Sourcepub fn maximum_entity_threshold(&self) -> &i32
pub fn maximum_entity_threshold(&self) -> &i32
Maximum number of units that can be placed in this block.
Sourcepub fn entity_preferences(&self) -> &Vec<EntityPreference>
pub fn entity_preferences(&self) -> &Vec<EntityPreference>
Ordered list of preferred unit types for this block.
Source§impl ContainerAbsolute
impl ContainerAbsolute
Sourcepub fn block_priority_mut(&mut self) -> &mut f32
pub fn block_priority_mut(&mut self) -> &mut f32
Priority for filling this block (higher priority blocks are filled first).
Sourcepub fn entity_arrangement_mut(&mut self) -> &mut EntityArrangement
pub fn entity_arrangement_mut(&mut self) -> &mut EntityArrangement
How units should be arranged (line, column, crescent, etc.).
Sourcepub fn inter_entity_spacing_mut(&mut self) -> &mut f32
pub fn inter_entity_spacing_mut(&mut self) -> &mut f32
Spacing between units in this block.
Sourcepub fn crescent_y_offset_mut(&mut self) -> &mut f32
pub fn crescent_y_offset_mut(&mut self) -> &mut f32
Y-axis offset for crescent formations.
Sourcepub fn position_x_mut(&mut self) -> &mut f32
pub fn position_x_mut(&mut self) -> &mut f32
X coordinate of this block’s position.
Sourcepub fn position_y_mut(&mut self) -> &mut f32
pub fn position_y_mut(&mut self) -> &mut f32
Y coordinate of this block’s position.
Sourcepub fn minimum_entity_threshold_mut(&mut self) -> &mut i32
pub fn minimum_entity_threshold_mut(&mut self) -> &mut i32
Minimum number of units required to use this block.
Sourcepub fn maximum_entity_threshold_mut(&mut self) -> &mut i32
pub fn maximum_entity_threshold_mut(&mut self) -> &mut i32
Maximum number of units that can be placed in this block.
Sourcepub fn entity_preferences_mut(&mut self) -> &mut Vec<EntityPreference>
pub fn entity_preferences_mut(&mut self) -> &mut Vec<EntityPreference>
Ordered list of preferred unit types for this block.
Source§impl ContainerAbsolute
impl ContainerAbsolute
Sourcepub fn set_block_priority(&mut self, val: f32) -> &mut Self
pub fn set_block_priority(&mut self, val: f32) -> &mut Self
Priority for filling this block (higher priority blocks are filled first).
Sourcepub fn set_entity_arrangement(&mut self, val: EntityArrangement) -> &mut Self
pub fn set_entity_arrangement(&mut self, val: EntityArrangement) -> &mut Self
How units should be arranged (line, column, crescent, etc.).
Sourcepub fn set_inter_entity_spacing(&mut self, val: f32) -> &mut Self
pub fn set_inter_entity_spacing(&mut self, val: f32) -> &mut Self
Spacing between units in this block.
Sourcepub fn set_crescent_y_offset(&mut self, val: f32) -> &mut Self
pub fn set_crescent_y_offset(&mut self, val: f32) -> &mut Self
Y-axis offset for crescent formations.
Sourcepub fn set_position_x(&mut self, val: f32) -> &mut Self
pub fn set_position_x(&mut self, val: f32) -> &mut Self
X coordinate of this block’s position.
Sourcepub fn set_position_y(&mut self, val: f32) -> &mut Self
pub fn set_position_y(&mut self, val: f32) -> &mut Self
Y coordinate of this block’s position.
Sourcepub fn set_minimum_entity_threshold(&mut self, val: i32) -> &mut Self
pub fn set_minimum_entity_threshold(&mut self, val: i32) -> &mut Self
Minimum number of units required to use this block.
Sourcepub fn set_maximum_entity_threshold(&mut self, val: i32) -> &mut Self
pub fn set_maximum_entity_threshold(&mut self, val: i32) -> &mut Self
Maximum number of units that can be placed in this block.
Sourcepub fn set_entity_preferences(
&mut self,
val: Vec<EntityPreference>,
) -> &mut Self
pub fn set_entity_preferences( &mut self, val: Vec<EntityPreference>, ) -> &mut Self
Ordered list of preferred unit types for this block.
Trait Implementations§
Source§impl Clone for ContainerAbsolute
impl Clone for ContainerAbsolute
Source§fn clone(&self) -> ContainerAbsolute
fn clone(&self) -> ContainerAbsolute
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContainerAbsolute
impl Debug for ContainerAbsolute
Source§impl Default for ContainerAbsolute
impl Default for ContainerAbsolute
Source§fn default() -> ContainerAbsolute
fn default() -> ContainerAbsolute
Source§impl<'de> Deserialize<'de> for ContainerAbsolute
impl<'de> Deserialize<'de> for ContainerAbsolute
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>,
Source§impl PartialEq for ContainerAbsolute
impl PartialEq for ContainerAbsolute
Source§impl Serialize for ContainerAbsolute
impl Serialize for ContainerAbsolute
impl StructuralPartialEq for ContainerAbsolute
Auto Trait Implementations§
impl Freeze for ContainerAbsolute
impl RefUnwindSafe for ContainerAbsolute
impl Send for ContainerAbsolute
impl Sync for ContainerAbsolute
impl Unpin for ContainerAbsolute
impl UnsafeUnpin for ContainerAbsolute
impl UnwindSafe for ContainerAbsolute
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
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>
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>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.