pub struct WorkPlace {
pub profession: Option<usize>,
pub description_profession: Option<usize>,
pub enabled: bool,
pub workers: Vec<usize>,
pub max_workers: i32,
pub default_max: i32,
pub status: u32,
}Expand description
WorkPlaceComponent plus the entity’s WorkComponent most-workers value.
Original: FUN_1401347b0.
Fields§
§profession: Option<usize>The profession its workers take (builder while under construction).
description_profession: Option<usize>WorkPlaceDescription: the profession once built (none for houses and barns).
enabled: boolAccepting workers (the constructor sets it).
workers: Vec<usize>Citizen indices, in assignment order.
max_workers: i32WorkComponent: most workers; 0 until first read, and every reader recomputes it from the
description while it is 0 (see WorkPlace::max).
default_max: i32The default number of workers, from the work description; scaled by the footprint’s area when the description says so.
Original: WorkComponent::MaxWorkers, FUN_140133a90.
status: u32The building’s StatusIconComponent bits (icon).
Implementations§
Source§impl WorkPlace
impl WorkPlace
Sourcepub fn new(description_profession: Option<usize>, default_max: i32) -> WorkPlace
pub fn new(description_profession: Option<usize>, default_max: i32) -> WorkPlace
A workplace with its profession and its default number of workers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkPlace
impl RefUnwindSafe for WorkPlace
impl Send for WorkPlace
impl Sync for WorkPlace
impl Unpin for WorkPlace
impl UnsafeUnpin for WorkPlace
impl UnwindSafe for WorkPlace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more