Skip to main content
Verticopolis engine

GameMode

Enum GameMode 

Source
pub enum GameMode {
    Classic,
    Modern,
}
Expand description

The two ways to play, chosen when a game starts.

Variants§

§

Classic

The 1994 original’s rules, prices and limits.

§

Modern

The original with quality-of-life changes and the calendar and bridging options. crate::catalog::catalog lists every difference a frontend shows.

Implementations§

Source§

impl GameMode

Source

pub fn as_str(self) -> &'static str

The mode’s saved spelling: classic or modern.

Source

pub fn parse(s: &str) -> Option<GameMode>

The mode a scenario or a host names, by its saved spelling.

Source§

impl GameMode

Source

pub fn ticket_prices(self) -> &'static [TicketPrice]

The ticket price steps a theater can charge, cheapest first, or an empty list where the mode has no ticket price (Classic).

Source

pub fn ticket_price_default(self) -> Option<&'static str>

The step a theater with none set charges, or None where the mode has no ticket price.

Source

pub fn ticket_price(self, key: &str) -> Option<&'static TicketPrice>

The listed step named key, or None where the mode lists none by that name.

Source§

impl GameMode

Source

pub fn cinema_screens(self) -> usize

How many screens a movie theater runs, each with its own film (#1950). SimTower’s theater shows one film; a Modern theater’s two floors are two screens with half the seats each.

Source§

impl GameMode

Source

pub fn halos(self) -> &'static [Halo]

Every venue halo in this mode: the six Modern ones, none in Classic.

Source

pub fn halo_of(self, kind: Kind) -> Option<&'static Halo>

The halo a venue of kind casts in this mode, if any.

Source

pub fn halo_strength(self, halo: &Halo, d: f64, family_size: f64) -> f64

The hourly bonus or drain halo gives a room d floors from its venue whose household is family_size (read only by a family-scaled halo): the same values the hourly step applies, faded over the halo’s own floors from its own max.

Trait Implementations§

Source§

impl Clone for GameMode

Source§

fn clone(&self) -> GameMode

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 GameMode

Source§

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

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

impl PartialEq for GameMode

Source§

fn eq(&self, other: &GameMode) -> 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 Copy for GameMode

Source§

impl Eq for GameMode

Source§

impl StructuralPartialEq for GameMode

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.