Skip to main content

Controller

Enum Controller 

Source
pub enum Controller {
Show 21 variants ClearArea, WorkPlace, Build, Residence, ClearResource, ResourceProduce, Attendance, Healer, Happiness, CropField, Orchard, Pasture, AbsorbResource, StorageLocation, Cemetery, MarketLocation, Destroy, Well, Immigration, Trade, MultiObject,
}
Expand description

The ControllerComponents the port has state tables for.

Variants§

§

ClearArea

Clears the building’s area before construction.

Original: FUN_14011d4e0.

§

WorkPlace

The workplace: workers and the work while the building works.

Original: FUN_140134870.

§

Build

Construction: materials, building work and the stages.

Original: FUN_14010e560.

§

Residence

A home.

Original: FUN_14012f820.

§

ClearResource

ClearResourceComponent: the removal marker.

Original: FUN_140032150, FUN_140032270.

§

ResourceProduce

ResourceProduceComponent, here ConsumeProduceComponent.

Original: FUN_140130700.

§

Attendance

AttendanceComponent: school, chapel, doctor.

Original: FUN_140044f90.

§

Healer

HealerComponent: the herbalist.

Original: FUN_14004b980.

§

Happiness

HappinessComponent.

Original: FUN_14004b570.

§

CropField

CropFieldComponent.

Original: FUN_140120620.

§

Orchard

OrchardComponent.

Original: FUN_140052a40.

§

Pasture

PastureComponent.

Original: FUN_14012d660.

§

AbsorbResource

AbsorbResourceComponent: a storage yard takes in the piles on its footprint.

Original: FUN_14002f5d0.

§

StorageLocation

StorageLocationComponent: a town storage.

Original: FUN_1401328e0.

§

Cemetery

CemeteryComponent.

Original: FUN_140048100.

§

MarketLocation

MarketLocationComponent: a town market.

Original: FUN_14004fa70.

§

Destroy

DestroyComponent: demolition, damage and rubble.

Original: FUN_1401231d0.

§

Well

WellComponent: a water source for firefighters.

Original: FUN_14005da70.

§

Immigration

ImmigrationComponent: the town hall’s nomads.

Original: FUN_14004f020.

§

Trade

TradeComponent: the trading post’s merchants.

Original: FUN_14005cfb0.

§

MultiObject

MultiObjectComponent: a bridge’s or a pasture’s parts.

Original: FUN_14012b000.

Implementations§

Source§

impl Controller

Source

pub fn table(self) -> &'static [StateDef]

The states of a controller.

Source

pub fn initial(self) -> i8

The initial state the first controller gives (ClearArea 0, Build 1).

Original: FUN_140003730, FUN_14002fc50.

Source

pub fn find(self, state: i8) -> Option<usize>

Interface slot +0: the state’s index.

Trait Implementations§

Source§

impl Clone for Controller

Source§

fn clone(&self) -> Controller

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 Controller

Source§

impl Debug for Controller

Source§

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

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

impl Eq for Controller

Source§

impl PartialEq for Controller

Source§

fn eq(&self, other: &Controller) -> 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 Controller

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.