pub struct Env<'a, 't> {Show 13 fields
pub wildlife: &'a mut Wildlife,
pub cells: &'a mut Cells,
pub placed: &'a mut Vec<Placed>,
pub templates: &'a [Template],
pub terrain: &'a HeightGrid<'t>,
pub materials: &'a [RawMaterial],
pub storages: &'a mut [Storage],
pub sites: &'a [StorageSite],
pub rng: &'a mut Random,
pub construction: &'a mut Construction,
pub stock: [(i32, i32); 21],
pub temperature: f32,
pub visits: &'a [(usize, i64)],
}Expand description
The world the citizens’ update borrows (everything but the citizens themselves).
Fields§
§wildlife: &'a mut WildlifeWild animals (hunting).
cells: &'a mut CellsThe gameplay map.
placed: &'a mut Vec<Placed>The placed objects.
templates: &'a [Template]The object templates.
terrain: &'a HeightGrid<'t>The ground’s heights.
materials: &'a [RawMaterial]The raw materials.
storages: &'a mut [Storage]The town’s storages.
sites: &'a [StorageSite]The storage sites.
rng: &'a mut RandomThe game’s random numbers.
construction: &'a mut ConstructionThe construction manager.
stock: [(i32, i32); 21]The stock manager’s (count, limit) per slot from the last recount.
temperature: f32The environment’s temperature.
visits: &'a [(usize, i64)]This iteration’s bucket visits (EntityScheduler::take_visits): placed entities by
index, citizens from scheduler::EXTRA, each with the time since its last visit.
Auto Trait Implementations§
impl<'a, 't> !UnwindSafe for Env<'a, 't>
impl<'a, 't> Freeze for Env<'a, 't>
impl<'a, 't> RefUnwindSafe for Env<'a, 't>
impl<'a, 't> Send for Env<'a, 't>
impl<'a, 't> Sync for Env<'a, 't>
impl<'a, 't> Unpin for Env<'a, 't>
impl<'a, 't> UnsafeUnpin for Env<'a, 't>
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