Skip to main content

Site

Struct Site 

Source
pub struct Site {
Show 29 fields pub entity: usize, pub template: usize, pub machine: Machine, pub progress: i32, pub stages: i32, pub work_id: i32, pub work_priority: Option<i32>, pub storage: usize, pub complete: bool, pub clear_total: i32, pub destroyed: bool, pub produce: Option<ProduceState>, pub auto_pickup: Option<AutoPickup>, pub forester: Option<Forester>, pub happiness_registered: bool, pub fishing: Option<Fishing>, pub hunt_time: Option<i64>, pub crop_field: Option<CropField>, pub orchard: Option<Orchard>, pub parts: Vec<usize>, pub multi_stages: Option<i32>, pub disease: Option<Blight>, pub graves: Vec<i32>, pub destroy: Option<Destroy>, pub fire: Option<Fire>, pub immigration: Option<Immigration>, pub trade: Option<Trade>, pub home: Option<Home>, pub ui_settings: Vec<u8>,
}
Expand description

One building under construction (and, once built, its WorkComponent).

Fields§

§entity: usize

The building’s entity.

§template: usize§machine: Machine

The building’s state machine.

§progress: i32

BuildComponent progress, stages.

§stages: i32

The construction stages.

§work_id: i32

WorkComponent registered work id (−1) and kept priority.

§work_priority: Option<i32>

The priority to keep for its work, if any.

§storage: usize

The building’s StorageComponent (index into the town’s storages).

§complete: bool

State 2 reached.

§clear_total: i32

ClearAreaComponent: objects on the footprint when clearing began.

§destroyed: bool

The entity was destroyed during a state callback; the site goes once the machine has run.

Original: FUN_1400c8370.

§produce: Option<ProduceState>

ConsumeProduceComponent (ResourceProduceComponent’s for the others).

§auto_pickup: Option<AutoPickup>

AutoPickupComponent.

§forester: Option<Forester>

ForesterComponent’s toggles.

§happiness_registered: bool

HappinessComponent: registered.

§fishing: Option<Fishing>

FishingComponent.

§hunt_time: Option<i64>

HuntComponent: the hunting time gathered.

§crop_field: Option<CropField>

CropFieldComponent.

§orchard: Option<Orchard>

OrchardComponent.

§parts: Vec<usize>

MultiObjectComponent: the entities placed with this one (a pasture’s shelter and fences), in order.

§multi_stages: Option<i32>

MultiObjectComponent: the stages its construction counts (a bridge’s cells, a fenced area’s border cells); BuildComponent::EnterGather takes it for.

§disease: Option<Blight>

DiseaseComponent.

§graves: Vec<i32>

CemeteryComponent: the grave cells.

Original: FUN_140047b60.

§destroy: Option<Destroy>

DestroyComponent.

§fire: Option<Fire>

FireComponent.

§immigration: Option<Immigration>

ImmigrationComponent.

§trade: Option<Trade>

TradeComponent.

§home: Option<Home>

The ResidenceComponent while the residence is out of the town’s (its states 3 to 7).

§ui_settings: Vec<u8>

UIComponent (bytes, the UIDescription’s): the window’s remembered settings (DialogInstance::SaveSettings), empty until it is first closed.

Trait Implementations§

Source§

impl Clone for Site

Source§

fn clone(&self) -> Site

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 Debug for Site

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Site

§

impl RefUnwindSafe for Site

§

impl Send for Site

§

impl Sync for Site

§

impl Unpin for Site

§

impl UnsafeUnpin for Site

§

impl UnwindSafe for Site

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.