Table with methods to access game settings.
Definition at line 5 of file api_settings.cc.
◆ avoid_overcrowding()
| bool settings::avoid_overcrowding |
( |
| ) |
|
- Returns
- freight will not enter convoy if next transfer halt is overcrowded
◆ get_advance_to_end()
| bool settings::get_advance_to_end |
( |
| ) |
|
- Returns
- true if trains should advance to the end of platform
◆ get_allow_elevated_way_over_others_halt()
| void settings::get_allow_elevated_way_over_others_halt |
( |
| ) |
|
- Returns
- true if building elevated way over another player's halt is allowed
◆ get_drive_on_left()
| bool settings::get_drive_on_left |
( |
| ) |
|
- Returns
- true, if drive-on-left is on
◆ get_factory_worker_maximum_towns()
| integer settings::get_factory_worker_maximum_towns |
( |
| ) |
|
- Returns
- maximum number of cities to supply workers for a factory
◆ get_factory_worker_minimum_towns()
| integer settings::get_factory_worker_minimum_towns |
( |
| ) |
|
- Returns
- minimum number of cities to supply workers for a factory
◆ get_factory_worker_radius()
| integer settings::get_factory_worker_radius |
( |
| ) |
|
- Returns
- maximum distance of city to factory for supplying workers
◆ get_first_come_first_serve()
| bool settings::get_first_come_first_serve |
( |
| ) |
|
- Returns
- true if all goods categories are loaded first-come-first-served
◆ get_foot_path_time_ticks()
| integer settings::get_foot_path_time_ticks |
( |
| ) |
|
- Returns
- journey time in ticks per tile for a foot-path connection
◆ get_foot_path_weight()
| integer settings::get_foot_path_weight |
( |
| ) |
|
- Returns
- route cost per tile for a foot-path connection
◆ get_industry_increase_every()
| integer settings::get_industry_increase_every |
( |
| ) |
|
New industries will be spawned if cities grow to over 2^n times this setting.
- Returns
- number
◆ get_max_air_convoi_length()
| integer settings::get_max_air_convoi_length |
( |
| ) |
|
- Returns
- max number of vehicles of air convois
◆ get_max_no_of_trees_on_square()
| integer settings::get_max_no_of_trees_on_square |
( |
| ) |
|
- Returns
- max number of trees on a map square
◆ get_max_rail_convoi_length()
| integer settings::get_max_rail_convoi_length |
( |
| ) |
|
- Returns
- max number of vehicles of rail convois
◆ get_max_road_convoi_length()
| integer settings::get_max_road_convoi_length |
( |
| ) |
|
- Returns
- max number of vehicles of road convois
◆ get_max_ship_convoi_length()
| integer settings::get_max_ship_convoi_length |
( |
| ) |
|
- Returns
- max number of vehicles of ship convois
◆ get_passenger_factor()
| integer settings::get_passenger_factor |
( |
| ) |
|
- Returns
- passenger factors influences passenger generation in cities
◆ get_pay_for_total_distance_mode()
| integer settings::get_pay_for_total_distance_mode |
( |
| ) |
|
Three modes of transfer payment: 0 = pay for travelled Manhattan distance 1 = pay for distance difference to next transfer stop 2 = pay for distance to destination
◆ get_start_time()
| time_x settings::get_start_time |
( |
| ) |
|
Returns starting time of the game.
- Returns
- table { "year" = .., "month" = .. }
◆ get_station_coverage()
| integer settings::get_station_coverage |
( |
| ) |
|
◆ get_time_based_routing_enabled()
| bool settings::get_time_based_routing_enabled |
( |
good_desc_x | goods | ) |
|
Returns whether time based routing is enabled for the goods category.
- Parameters
-
| goods | goods descriptor whose category is checked |
◆ get_traffic_level()
| integer settings::get_traffic_level |
( |
| ) |
|
◆ get_transit_by_foot()
| bool settings::get_transit_by_foot |
( |
| ) |
|
- Returns
- true if passengers may transfer between nearby halts on foot
◆ get_walk_cost_to_halt()
| bool settings::get_walk_cost_to_halt |
( |
| ) |
|
- Returns
- true if walking to the first and from the last halt affects routing
◆ is_using_route_cache()
| void settings::is_using_route_cache |
( |
| ) |
|
- Returns
- true if route cache is enabled
◆ no_routing_over_overcrowding()
| bool settings::no_routing_over_overcrowding |
( |
| ) |
|
- Returns
- freight will not start when best route goes through overcrowded halt
◆ obsolete_vehicles_allowed()
| bool settings::obsolete_vehicles_allowed |
( |
| ) |
|
- Returns
- true if it is allowed to buy obsolete vehicles
◆ separate_halt_capacities()
| bool settings::separate_halt_capacities |
( |
| ) |
|
- Returns
- true if halt capacity is separated between passengers, mail, freight
◆ set_advance_to_end()
| void settings::set_advance_to_end |
( |
bool | b | ) |
|
Sets advance_to_end setting. When false, trains stop at the near end of platform.
- Parameters
-
| b | true if trains should advance to the end of platform |
◆ set_allow_elevated_way_over_others_halt()
| void settings::set_allow_elevated_way_over_others_halt |
( |
any_x | b | ) |
|
Enables or disables building elevated ways over another player's halt.
- Parameters
-
| b | true to allow building elevated way over other players' halts |
◆ set_first_come_first_serve()
| void settings::set_first_come_first_serve |
( |
bool | b | ) |
|
Sets first_come_first_serve setting.
- Parameters
-
| b | true if all goods categories should be loaded first-come-first-served |
◆ set_foot_path_time_ticks()
| bool settings::set_foot_path_time_ticks |
( |
integer | | ) |
|
Sets the journey time in ticks per tile for a foot-path connection. Rebuilds halt connections when the value changes.
◆ set_foot_path_weight()
| bool settings::set_foot_path_weight |
( |
integer | | ) |
|
Sets the route cost per tile for a foot-path connection. Rebuilds halt connections when the value changes.
◆ set_industry_increase_every()
| void settings::set_industry_increase_every |
( |
integer | count | ) |
|
New industries will be spawned if cities grow to over 2^n times count. Set to zero to prevent new industries to be spawned.
- Parameters
-
- Warning
- cannot be used in network games.
◆ set_time_based_routing_enabled()
| bool settings::set_time_based_routing_enabled |
( |
good_desc_x | goods, |
|
|
bool | enabled ) |
Sets whether time based routing is enabled for the goods category.
- Parameters
-
| goods | goods descriptor whose category is changed |
| enabled | true if the category should use time based routing |
◆ set_traffic_level()
| void settings::set_traffic_level |
( |
integer | rate | ) |
|
Set traffic level. The higher the level the more city cars will be created.
- Parameters
-
| rate | new traffic level, must be between 0 and 16 |
◆ set_transit_by_foot()
| bool settings::set_transit_by_foot |
( |
bool | | ) |
|
Enables or disables passenger transfers on foot between nearby halts. Rebuilds halt connections when the value changes.
◆ set_use_route_cache()
| void settings::set_use_route_cache |
( |
any_x | b | ) |
|
Enables or disables the route cache for line convoys.
- Parameters
-
| b | true to enable route caching |
The documentation for this class was generated from the following file: