Skip to main content

Construction

Struct Construction 

Source
pub struct Construction {
Show 52 fields pub commute: Commute, pub jobs: Jobs, pub professions: Professions, pub workforce: Workforce, pub templates: Vec<SiteTemplate>, pub sites: BTreeMap<usize, Site>, pub site_list: Vec<usize>, pub placed: Vec<usize>, pub commands: Vec<Command>, pub piles: BTreeMap<usize, Pile>, pub claimed_resources: BTreeSet<usize>, pub new_piles: Vec<usize>, pub models_dirty: bool, pub destroy: Vec<usize>, pub homes: BTreeMap<usize, Home>, pub attendance: BTreeMap<usize, Attendance>, pub attendance_list: Vec<usize>, pub healers: Vec<usize>, pub happiness: Vec<usize>, pub calendar: f32, pub year: u32, pub fruits: BTreeMap<usize, Fruit>, pub keep_piles: BTreeMap<usize, bool>, pub site_events: Vec<(i32, i32, usize)>, pub storage_changes: Vec<(usize, bool)>, pub cemeteries: Vec<usize>, pub tombstones: BTreeMap<usize, i64>, pub burials: Vec<(usize, i32)>, pub rebuilds: Vec<Rebuild>, pub water: Water, pub game_flags: u32, pub precipitation: bool, pub population: i32, pub visitors: (f32, i64), pub nomads_admitted: i32, pub trading_posts: Vec<usize>, pub trade_value: i32, pub pending_roads: BTreeMap<i32, i32>, pub terraform_requests: Vec<Terraform>, pub flatten_requests: Vec<[i32; 4]>, pub tornadoes: BTreeMap<usize, Tornado>, pub tornado_kills: Vec<usize>, pub trackers: BTreeMap<usize, Tracker>, pub decals: BTreeMap<usize, Decal>, pub counters: StockCounters, pub terraforms: BTreeMap<usize, TerraformState>, pub road_markers: Vec<(i32, usize)>, pub trade_goods: Vec<TradeGood>, pub river: Vec<[f32; 2]>, pub names: Option<Arc<(NameDatabase, NameDatabase)>>, pub known: Vec<usize>, pub known_materials: Vec<usize>,
}
Expand description

The job manager, professions, workforce and every construction site.

Fields§

§commute: Commute

The town’s commute optimisation (StockManager).

§jobs: Jobs

The job manager.

§professions: Professions

The professions.

§workforce: Workforce

The citizens’ workplaces and professions.

§templates: Vec<SiteTemplate>

The building templates, as construction reads them.

§sites: BTreeMap<usize, Site>

Entity → site.

§site_list: Vec<usize>

Game →: sites in their gathering and building states.

§placed: Vec<usize>

Sites placed since the last iteration (activated before the next one).

§commands: Vec<Command>

Player commands for the next iteration.

§piles: BTreeMap<usize, Pile>

Loose raw-material piles (RawMaterialComponent), by entity.

§claimed_resources: BTreeSet<usize>

NaturalResourceComponent flag 0x100000: a removal sequence holds the resource.

§new_piles: Vec<usize>

Piles created since the last iteration (registered with the entity manager and activated after the citizens’ update).

§models_dirty: bool

Entities were created or removed (the models need refreshing).

§destroy: Vec<usize>

Entities the player destroyed (RemovalTool cancel), before the next iteration.

§homes: BTreeMap<usize, Home>

Finished residences’ ResidenceComponents, by entity.

§attendance: BTreeMap<usize, Attendance>

AttendanceComponents, by entity, and the town manager’s registry.

§attendance_list: Vec<usize>

The town manager’s list of schools, chapels and doctors.

§healers: Vec<usize>

The town manager’s HealerComponents.

§happiness: Vec<usize>

The town manager’s registered HappinessComponents, by entity.

§calendar: f32

The calendar’s seconds into the year, set before each iteration.

§year: u32

The calendar’s year, set before each iteration.

§fruits: BTreeMap<usize, Fruit>

FruitComponents of orchard trees, by entity.

§keep_piles: BTreeMap<usize, bool>

NaturalResourceComponent set by a crop field: whether harvesting leaves a pile.

§site_events: Vec<(i32, i32, usize)>

Event-log entries the sites posted: type, severity, entity; the game formats them with the entity’s toolbar name.

Original: FUN_14009a2d0.

§storage_changes: Vec<(usize, bool)>

StorageLocationComponents joining (true) or leaving the town’s storages, in order; the town applies them after the iteration’s update.

§cemeteries: Vec<usize>

The town’s cemeteries, in order.

§tombstones: BTreeMap<usize, i64>

TombstoneComponents and the time each has left.

§burials: Vec<(usize, i32)>

Burials decided at a death (cemetery, grave cell), placed after the citizens’ update.

§rebuilds: Vec<Rebuild>

Entities a DestroyComponent puts in a torn-down building’s place, created by the town after the update.

Original: FUN_1400c9d70.

§water: Water

The town’s water sources (built with the map).

Original: FUN_1400a43f0.

§game_flags: u32

The game’s flags (for example, disasters off).

§precipitation: bool

The sky’s state is precipitation, set before each iteration.

§population: i32

Town manager: the population, set before each update.

§visitors: (f32, i64)

Town manager /: the visitors’ disease risk and how long it lasts.

§nomads_admitted: i32

Town manager: nomads taken in.

§trading_posts: Vec<usize>

Town manager: the trading posts.

§trade_value: i32

Town manager: the value traded away.

§pending_roads: BTreeMap<i32, i32>

Map: the cells with a planned road, and their BuildRoad works.

§terraform_requests: Vec<Terraform>

Tunnels to dig or fill back (TerraformComponent event 4 and removal), for the terrain’s owner, and each terraformed entity’s kept heights and cells.

§flatten_requests: Vec<[i32; 4]>

Requests to flatten the ground: cell rectangles (x0, y0, x1, y1, inclusive) whose cells’ low corners go to height 0. They are applied to the terrain after the iteration.

Original: FUN_1400a35b0.

§tornadoes: BTreeMap<usize, Tornado>

The tornadoes by entity, and the citizens they killed this iteration (death code 5; the citizens’ pass applies it).

§tornado_kills: Vec<usize>

The citizens killed by tornadoes this iteration.

§trackers: BTreeMap<usize, Tracker>

TrackerComponents by entity, and the stock manager’s made/used counters.

§decals: BTreeMap<usize, Decal>

DecalComponents that left their setup state, by entity (the others show at their description’s alpha with material 0).

§counters: StockCounters

What the town made and used since the last sample.

§terraforms: BTreeMap<usize, TerraformState>

The terraforming state of tunnels, by entity.

§road_markers: Vec<(i32, usize)>

Built road cells Remove Roads marked, for the town to place their markers (cell, marker template).

§trade_goods: Vec<TradeGood>

The goods with a ValueDescription, in the factory’s order (GameResources).

§river: Vec<[f32; 2]>

MapComponent ‘s first river centre line, the trader boats’ way.

§names: Option<Arc<(NameDatabase, NameDatabase)>>

Game/Names/Male and Female, for the merchants’ names.

§known: Vec<usize>

The town manager’s known crops, orchard trees and livestock, as placed-object templates.

Original: FUN_140096ef0.

§known_materials: Vec<usize>

The stock manager’s known raw materials: the start profile’s, then each as its first pile is set up or it is traded for.

Original: FUN_140097330.

Trait Implementations§

Source§

impl Clone for Construction

Source§

fn clone(&self) -> Construction

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 Construction

Source§

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

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

impl Default for Construction

Source§

fn default() -> Construction

Returns the “default value” for a type. Read more

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.