Skip to main content

Component

Enum Component 

Source
pub enum Component {
Show 19 variants CitizenAi, Citizen, Happiness, Build, Destroy, Fire, Road, Jobs, NaturalResource, Pile, CreateRawMaterial, CreateNaturalResource, Animal, CropField, Orchard, Pasture, DropPile, Quarry, Fishing,
}
Expand description

Which component a SendMessage targets (CitizenAI, Citizen).

Variants§

§

CitizenAi

The citizen’s AI.

§

Citizen

The citizen component (needs, family).

§

Happiness

Not identified yet.

§

Build

BuildComponent message 0 adds one unit of construction work.

§

Destroy

DestroyComponent message 0 adds one unit of deconstruction work.

§

Fire

FireComponent message 0, a bucket of water.

Original: FUN_1400499f0.

§

Road

CompleteRoad’s start: a the cell, b the cell type, message the byte.

Original: FUN_1400cad20, FUN_1400a1b10.

§

Jobs

The job manager: message 0 is CompleteTask’s start, 1 its abort; a is the work id, b the task parameter.

Original: FUN_1400fdc30, FUN_1400fdcd0.

§

NaturalResource

A NaturalResourceComponent: 0 remove (RemoveNaturalResource start, a its flag), 1 release the removal claim (its abort), 2 play animation a (AnimateNaturalResource start).

Original: FUN_14012b910.

§

Pile

A RawMaterialComponent pile: 0 picked up (PickupRawMaterial start).

§

CreateRawMaterial

CreateRawMaterial’s start: a the output template, b the cell, entity the workplace, message the yield factor as f32 bits.

Original: FUN_1400cc010.

§

CreateNaturalResource

CreateNaturalResource’s start once the cell is free: a the template, b the cell.

Original: FUN_1400cbb20.

§

Animal

RemoveAnimal’s start: the animal entity is removed.

Original: FUN_1400cfcc0.

§

CropField

CropFieldComponent’s message slot: message 0 planted / 1 tended, a the cell index, entity the field.

Original: FUN_140120020.

§

Orchard

OrchardComponent’s message slot: 0 planted, 1 picked, 2 tended; a the tree slot.

Original: FUN_1400522f0.

§

Pasture

PastureComponent’s message slot: 0 a rancher’s visit.

Original: FUN_14012cbf0.

§

DropPile

A loose pile of a (material), b units, left on the ground near the citizen (the units already left its storage).

Original: FUN_1400ccd90.

§

Quarry

QuarryComponent’s message slot: the quarry entity digs deeper.

Original: FUN_1400554e0.

§

Fishing

FishingComponent: the fishing sequence’s report (a the catch’s cell). It reaches the component’s default message handler, which does nothing.

Trait Implementations§

Source§

impl Clone for Component

Source§

fn clone(&self) -> Component

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Component

Source§

impl Debug for Component

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Component

Source§

impl PartialEq for Component

Source§

fn eq(&self, other: &Component) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Component

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.