Simutrans-Squirrel-API
Public Member Functions | List of all members
settings Class Reference

Public Member Functions

bool avoid_overcrowding ()
 
bool get_drive_on_left ()
 
integer get_factory_worker_maximum_towns ()
 
integer get_factory_worker_minimum_towns ()
 
integer get_factory_worker_radius ()
 
integer get_industry_increase_every ()
 
integer get_max_air_convoi_length ()
 
integer get_max_rail_convoi_length ()
 
integer get_max_road_convoi_length ()
 
integer get_max_ship_convoi_length ()
 
integer get_passenger_factor ()
 
integer get_pay_for_total_distance_mode ()
 
time_x get_start_time ()
 
integer get_station_coverage ()
 
integer get_traffic_level ()
 
integer get_underground_view_level ()
 
bool no_routing_over_overcrowding ()
 
bool obsolete_vehicles_allowed ()
 
bool separate_halt_capacities ()
 
void set_industry_increase_every (integer count)
 
void set_traffic_level (integer rate)
 

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_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_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_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_traffic_level()

integer settings::get_traffic_level ( )

Get traffic level.

◆ get_underground_view_level()

integer settings::get_underground_view_level ( )

Returns current view mode and underground view level. Possible return values: -128 == full underground view +127 == normal view other values == sliced view at the given value

◆ 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_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_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

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