Skip to main content
Verticopolis engine

verticopolis_engine/catalog/
rules.rs

1//! The catalog's `rules` block: the mode rules a frontend shows.
2
3use serde::Serialize;
4
5/// Mode rules a frontend shows the player, each stated from the engine's own
6/// rule method, so a frontend reads them here instead of deciding them from
7/// the mode's name.
8#[derive(Clone, Debug, PartialEq, Serialize)]
9#[serde(rename_all = "camelCase")]
10pub struct Rules {
11    /// Whether a sold condo carries its own household of 2 to 5 that prices
12    /// the sale and counts its residents. When false every condo houses the
13    /// flat family and stores no household.
14    pub variant_households: bool,
15    /// Whether the build preview names the engine's refusal before the
16    /// click. When false the refusal shows only once a click is refused.
17    pub preview_names_refusal: bool,
18    /// Whether the elevator schedule's assisted tools answer: the intent
19    /// presets, auto-tune and the staffing advice. When false the schedule
20    /// is the manual grid only and each assisted query is refused.
21    pub schedule_assist: bool,
22    /// Whether the player may place new construction while the game is
23    /// paused. When false the frontend refuses a placement at speed 0 and
24    /// says to unpause; the engine itself has no paused state.
25    pub builds_while_paused: bool,
26    /// Whether the tower can be exported for SimTower (1994) as a `.TDT`.
27    /// When false the frontend disables that export with the reason, and the
28    /// engine's `.TDT` export refuses the tower.
29    pub exports_to_1994: bool,
30    /// Whether the tenant card's lobby warning quotes the floors to the
31    /// nearest lobby. When false it names the problem without the number.
32    pub quotes_lobby_distance: bool,
33    /// Whether a sky lobby may rise more than one story (#308). The ground
34    /// lobby always may, up to `max_lobby_height`; when false it is the only
35    /// one that can.
36    pub tall_sky_lobbies: bool,
37    /// Whether a frontend may draw decorative passers-by, figures that pace
38    /// the corridors but are not people the engine knows about (#2091).
39    /// When false it draws only the engine's own people.
40    pub decorative_passers_by: bool,
41    /// Whether a frontend draws the lit look (#2097): people lit from the
42    /// upper left with a four-frame walk, and rooms shaded to match. When
43    /// false it keeps the flat 1994 look, with a two-frame walk.
44    pub shaded_look: bool,
45    /// Whether a frontend draws a one-story stair or escalator beside a
46    /// venue as a spiral staircase or a switchback escalator. Drawing only;
47    /// when false every one-story flight is drawn straight, as in 1994.
48    pub venue_flights: bool,
49    /// Whether an express elevator keeps the 1994 game's stops (#1527): the
50    /// ground floor, every 15th floor and every basement, each of which can
51    /// be turned off, with an end off those floors passed. When false an
52    /// express stops at its lobbies, every basement and both ends.
53    pub express_stops_on_15th_floors: bool,
54    /// How long, in seconds, a person waits before the wait counts as stress
55    /// and the frontend shows them fed up (red). The same in both modes.
56    pub fed_up_wait: f64,
57    /// The most stories a lobby can rise (#308). A floor's first lobby
58    /// placement sets its height, and it never changes after.
59    pub max_lobby_height: i64,
60}