pub struct Wildlife {Show 17 fields
pub tree: CharacterTree,
pub populations: Vec<Population>,
pub herds: Vec<Herd>,
pub animals: BTreeMap<usize, Animal>,
pub population_kinds: BTreeMap<usize, PopulationKind>,
pub herd_kinds: BTreeMap<usize, HerdKind>,
pub animal_kinds: BTreeMap<usize, AnimalKind>,
pub groups: BTreeMap<(usize, usize), Arc<AnimationGroup>>,
pub dying: Vec<usize>,
pub livestock_kinds: BTreeMap<usize, LivestockKind>,
pub unassigned: Vec<usize>,
pub pastures: BTreeMap<usize, Pasture>,
pub pasture_list: Vec<usize>,
pub nomads: BTreeMap<usize, Nomad>,
pub nomad_kinds: BTreeMap<usize, NomadKind>,
pub boats: BTreeMap<usize, Boat>,
pub boat_kinds: BTreeMap<usize, BoatKind>,
/* private fields */
}Expand description
The wildlife of a town.
Fields§
§tree: CharacterTreeThe characters’ spatial tree (Game): citizens, animals, boats and nomads.
populations: Vec<Population>The animal populations.
herds: Vec<Herd>The herds.
animals: BTreeMap<usize, Animal>Animals by entity.
population_kinds: BTreeMap<usize, PopulationKind>Templates by placed-object template index.
herd_kinds: BTreeMap<usize, HerdKind>The herd templates, by placed-object template index.
animal_kinds: BTreeMap<usize, AnimalKind>The animal templates, by placed-object template index.
groups: BTreeMap<(usize, usize), Arc<AnimationGroup>>Animation groups by animal template and model variant.
dying: Vec<usize>Entities queued for removal, in order.
livestock_kinds: BTreeMap<usize, LivestockKind>LivestockDescriptions by animal template.
unassigned: Vec<usize>The town’s livestock without a pasture, in order.
pastures: BTreeMap<usize, Pasture>The pastures, by entity.
pasture_list: Vec<usize>The town’s list of pastures.
nomads: BTreeMap<usize, Nomad>The nomads, by entity.
nomad_kinds: BTreeMap<usize, NomadKind>The nomad templates, by template.
boats: BTreeMap<usize, Boat>The trader boats, by entity.
boat_kinds: BTreeMap<usize, BoatKind>The boat templates, by template.
Implementations§
Source§impl Wildlife
impl Wildlife
Sourcepub fn restore_population(&mut self, p: Population) -> usize
pub fn restore_population(&mut self, p: Population) -> usize
A saved PopulationComponent; returns its index.
Original: FUN_140054e00.
Sourcepub fn restore_herd(&mut self, h: Herd) -> usize
pub fn restore_herd(&mut self, h: Herd) -> usize
A saved HerdComponent; returns its index.
Original: FUN_140127460.
Sourcepub fn restore_animal(&mut self, entity: usize, a: Animal)
pub fn restore_animal(&mut self, entity: usize, a: Animal)
Restore an animal from a save: its animal component, its wild animal component, its character and its livestock component.
Original: FUN_14010c310 (the animal component).
Sourcepub fn kill(&mut self, a: usize)
pub fn kill(&mut self, a: usize)
An animal dies (killed by a hunter, of old age, or in a herd without a habitat): it is queued for removal and leaves its herd.
Original: FUN_1400c8370 on the animal.