pub struct PlayerSettings<'a> {
pub race: Race,
pub name: Option<&'a str>,
pub raw_affects_selection: bool,
pub raw_crop_to_playable_area: bool,
}
Expand description
Settings that must be provided by a player when joining a game.
if name is None
, it’ll be shown as “foo(whatever)” in game.
if raw_affects_selection
is true
, bot will select units to which it gives orders.
if raw_crop_to_playable_area
is true
, maps will be crooped to the size of
self.game_info.playable_area
.
Defaults:
name
: None
raw_affects_selection
: false
raw_crop_to_playable_area
: false
Fields§
§race: Race
§name: Option<&'a str>
§raw_affects_selection: bool
§raw_crop_to_playable_area: bool
Implementations§
Source§impl<'a> PlayerSettings<'a>
impl<'a> PlayerSettings<'a>
Sourcepub fn raw_affects_selection(self, val: bool) -> Self
pub fn raw_affects_selection(self, val: bool) -> Self
Sets raw_affects_selection
to a given value.
Sourcepub fn raw_crop_to_playable_area(self, val: bool) -> Self
pub fn raw_crop_to_playable_area(self, val: bool) -> Self
Sets raw_crop_to_playable_area
to a given value.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PlayerSettings<'a>
impl<'a> RefUnwindSafe for PlayerSettings<'a>
impl<'a> Send for PlayerSettings<'a>
impl<'a> Sync for PlayerSettings<'a>
impl<'a> Unpin for PlayerSettings<'a>
impl<'a> UnwindSafe for PlayerSettings<'a>
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