Simutrans-Squirrel-API OTRP v63_4
Loading...
Searching...
No Matches
settings Class Reference

Public Member Functions

integer get_industry_increase_every ()
void set_industry_increase_every (integer count)
integer get_traffic_level ()
void set_traffic_level (integer rate)
time_x get_start_time ()
integer get_station_coverage ()
integer get_passenger_factor ()
void get_passenger_factor_float ()
integer get_factory_worker_radius ()
integer get_factory_worker_minimum_towns ()
integer get_factory_worker_maximum_towns ()
bool avoid_overcrowding ()
bool no_routing_over_overcrowding ()
bool separate_halt_capacities ()
bool obsolete_vehicles_allowed ()
integer get_max_road_convoi_length ()
integer get_max_rail_convoi_length ()
integer get_max_ship_convoi_length ()
integer get_max_air_convoi_length ()
bool get_drive_on_left ()
integer get_pay_for_total_distance_mode ()
integer get_max_no_of_trees_on_square ()
bool get_advance_to_end ()
void set_advance_to_end (bool b)
bool get_first_come_first_serve ()
void set_first_come_first_serve (bool b)
bool get_time_based_routing_enabled (good_desc_x goods)
bool set_time_based_routing_enabled (good_desc_x goods, bool enabled)
bool get_transit_by_foot ()
bool set_transit_by_foot (bool)
integer get_foot_path_weight ()
bool set_foot_path_weight (integer)
integer get_foot_path_time_ticks ()
bool set_foot_path_time_ticks (integer)
bool get_walk_cost_to_halt ()
bool set_walk_cost_to_halt (bool)
 Enables or disables walking costs between origins/destinations and their halts.
void is_using_route_cache ()
void set_use_route_cache (any_x b)
void get_allow_elevated_way_over_others_halt ()
void set_allow_elevated_way_over_others_halt (any_x b)

Detailed Description

Table with methods to access game settings.

Definition at line 5 of file api_settings.cc.

Member Function Documentation

◆ 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 ( )
Returns
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
goodsgoods descriptor whose category is checked

◆ get_traffic_level()

integer settings::get_traffic_level ( )

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
btrue 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
btrue 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
btrue 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
count
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
goodsgoods descriptor whose category is changed
enabledtrue 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
ratenew 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
btrue to enable route caching

The documentation for this class was generated from the following file: