Skip to main content

CitizenRulesAi

Struct CitizenRulesAi 

Source
pub struct CitizenRulesAi {
Show 18 fields pub thresholds: Thresholds, pub health: f32, pub happiness: f32, pub loiter_range: i32, pub clothing_duration: f32, pub health_max: f32, pub hunger_limit: f32, pub cold_limit: f32, pub profession_allows_idle: bool, pub tool_grade: i32, pub work_near: i32, pub work_far: i32, pub work_minutes: i32, pub work_ok: i32, pub work_cold: f32, pub no_tool_factor: f32, pub education: i32, pub water_distance: i32,
}
Expand description

The CitizenDescription values the AI reads.

Fields§

§thresholds: Thresholds

The thresholds of the citizen’s needs.

§health: f32

The starting health.

§happiness: f32

The starting happiness.

§loiter_range: i32

Loiter search range.

§clothing_duration: f32

How long clothing lasts, in seconds (the citizen description’s value multiplied by 300).

Original: FUN_140117730.

§health_max: f32

The highest health.

§hunger_limit: f32

Midpoint for food, quarter-point for cold status warnings.

Original: FUN_140118340.

§cold_limit: f32

The cold level of the cold warning.

§profession_allows_idle: bool

Whether a citizen without a workplace shows no job warning, when no professions are loaded.

§tool_grade: i32

CitizenDescription: the tool type CitizenUI calls “Iron” (others are “Steel”).

§work_near: i32

The rank of work a citizen takes at once, before it has waited.

§work_far: i32

The rank of work a citizen takes after it has waited the longest.

§work_minutes: i32

The longest wait, in months (of 300 seconds).

§work_ok: i32

The rank of work a citizen always takes.

§work_cold: f32

The temperature at or above which a citizen takes any work in range.

§no_tool_factor: f32

CitizenDescription: work duration factor without a tool.

Original: FUN_1400cebf0.

§education: i32

The education a citizen counts as educated with.

§water_distance: i32

How far a firefighter looks for water.

Original: FUN_14008d6a0.

Trait Implementations§

Source§

impl Clone for CitizenRulesAi

Source§

fn clone(&self) -> CitizenRulesAi

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 Copy for CitizenRulesAi

Source§

impl Debug for CitizenRulesAi

Source§

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

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

impl Default for CitizenRulesAi

Source§

fn default() -> CitizenRulesAi

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.