Skip to main content
Verticopolis engineGitHub

Economy

Struct Economy 

Source
pub struct Economy {
Show 15 fields pub starting_money: f64, pub add_car_cost: f64, pub car_resale_refund: f64, pub transport_floor_cost: f64, pub calendars: Vec<CalendarEntry>, pub maintenance_per_car_monthly: f64, pub overhead_per_unit_monthly: f64, pub condo_hold_tax_rate: f64, pub nightclub_dj_monthly: f64, pub garbage_collect_hour: f64, pub exterminator: Option<ExterminatorFees>, pub films: &'static [FilmOffer], pub film_rebooks: &'static [FilmRebook], pub film_rebook_default: Option<&'static str>, pub auto_bridge_toggleable: bool,
}
Expand description

The mode’s economy constants a UI shows, in dollars.

Fields§

§starting_money: f64

The treasury a new tower starts with.

§add_car_cost: f64

The price of one more elevator car on a shaft (add_car charges it).

§car_resale_refund: f64

What remove_car refunds for one car.

§transport_floor_cost: f64

The price of each floor an elevator spans past its first. The build charges it, and extend_transport charges it for each floor an extend adds. Stairs and escalators pay none.

§calendars: Vec<CalendarEntry>

The calendars a tower of this mode can run, its default first. Every ...Monthly figure here and each facility’s upkeepMonthly is quoted per 30-day real-world month: the engine charges it once per maintenance period, multiplied by that calendar’s maintenanceScale.

§maintenance_per_car_monthly: f64

Monthly upkeep per elevator car.

§overhead_per_unit_monthly: f64

Monthly operating overhead per leasable or trading unit (0 where the mode charges none).

§condo_hold_tax_rate: f64

Monthly tax on an unsold condo, as a fraction of its asking price (0 where the mode charges none). Each period the engine charges ceil(price * rate), multiplied by maintenanceScale and rounded.

§nightclub_dj_monthly: f64

A nightclub’s monthly DJ booking.

§garbage_collect_hour: f64

Hour of the daily garbage-truck collection that empties recycling bins.

§exterminator: Option<ExterminatorFees>

The paid exterminator’s fees, or null where the mode has none.

§films: &'static [FilmOffer]

The films a theater can show, with their prices, in the order the card lists them (#1932, #1950). No theater pays anything each period.

§film_rebooks: &'static [FilmRebook]

The Auto-rebook choices, in the order the card’s button cycles through them: each policy and the film a theater with it books again once its film is spent (#1950). Empty where no theater rebooks.

§film_rebook_default: Option<&'static str>

The policy a theater with none, or an old save’s “auto”, rebooks by, or null where no theater rebooks.

§auto_bridge_toggleable: bool

Whether the player can switch automatic bridging off. When false, bridging is always on. When true, a tower starts bridged unless it was founded unbridged, and the live setting is per tower (the engine’s autoBridge(), the save’s autoBridge).

Trait Implementations§

Source§

impl Clone for Economy

Source§

fn clone(&self) -> Economy

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 Economy

Source§

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

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

impl PartialEq for Economy

Source§

fn eq(&self, other: &Economy) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Economy

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Economy

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> Same for T

Source§

type Output = T

Should always be Self
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.