Skip to main content

Animal

Struct Animal 

Source
pub struct Animal {
Show 16 fields pub template: usize, pub character: Character, pub herd: Option<usize>, pub flags: u32, pub home: i32, pub timer: i64, pub area: [i16; 4], pub male: bool, pub age: f32, pub life: f32, pub breed: i64, pub livestock: Option<Livestock>, pub variant: usize, pub mesh: usize, pub scale: f32, pub dying: bool,
}
Expand description

AnimalComponent and WildAnimalComponent, with the animal’s CharacterComponent.

Fields§

§template: usize

The template.

§character: Character

The character: position and movement.

§herd: Option<usize>

WildAnimalComponent: the herd (index into Wildlife::herds).

§flags: u32

Component flags (HUNTED, WILD).

§home: i32

The home cell.

§timer: i64

Until the next decision.

§area: [i16; 4]

The area it keeps to (x, y, width, height).

§male: bool

Male (the second mesh, antlers).

§age: f32

The age in years.

§life: f32

The lifespan in years.

§breed: i64

Until a breeding male’s young (livestock only).

§livestock: Option<Livestock>

LivestockComponent.

§variant: usize

The model variant.

§mesh: usize

The mesh.

§scale: f32

Model scale.

Original: FUN_14010c7f0.

§dying: bool

Queued for removal (entity flag 0x400).

Original: FUN_1400c8370.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.