Struct game_features::Faction[][src]

pub struct Faction {
    pub users: UserGroup,
    pub power: f32,
    pub claims: Vec<(i32, i32, i32)>,
    pub power_boost: f32,
}
Expand description

A team with the ability to claim ownership over terrain. WIP

Fields

users: UserGroup

The group of users that this faction is composed of.

power: f32

The claiming power of this faction. Limits the number of claims it can have and maintain.

claims: Vec<(i32, i32, i32)>

All the claims owned by this faction.

power_boost: f32

A value added to the calculated power value.

Implementations

impl Faction[src]

pub fn claim_from(
    &mut self,
    _other: &mut Faction,
    _settings: &FactionSettings
) -> FactionResult
[src]

Claim terrain from another faction.

Auto Trait Implementations

impl RefUnwindSafe for Faction

impl Send for Faction

impl Sync for Faction

impl Unpin for Faction

impl UnwindSafe for Faction

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.