Simutrans-Squirrel-API OTRP v63_4
Loading...
Searching...
No Matches
world Class Reference
Inheritance diagram for world:
Collaboration diagram for world:

Static Public Member Functions

static bool is_coord_valid (coord k)
static city_x find_nearest_city (coord k)
static integer get_season ()
static bool create_player (integer player_nr, integer player_type)
static bool remove_player (player_x pl)
static integer generate_goods (coord from, coord to, good_desc_x desc, integer count)
static void get_player (any_x pl)
static time_ticks_x get_time ()
static array< integer > get_citizens ()
static array< integer > get_growth ()
static array< integer > get_towns ()
static array< integer > get_factories ()
static array< integer > get_convoys ()
static array< integer > get_citycars ()
static array< integer > get_ratio_pax ()
static array< integer > get_generated_pax ()
static array< integer > get_ratio_mail ()
static array< integer > get_generated_mail ()
static array< integer > get_ratio_goods ()
static array< integer > get_transported_goods ()
static array< integer > get_year_citizens ()
static array< integer > get_year_growth ()
static array< integer > get_year_towns ()
static array< integer > get_year_factories ()
static array< integer > get_year_convoys ()
static array< integer > get_year_citycars ()
static array< integer > get_year_ratio_pax ()
static array< integer > get_year_generated_pax ()
static array< integer > get_year_ratio_mail ()
static array< integer > get_year_generated_mail ()
static array< integer > get_year_ratio_goods ()
static array< integer > get_year_transported_goods ()
static bool use_timeline ()
static attraction_list_x get_attraction_list ()
static convoy_list_x get_convoy_list ()
static label_list_x get_label_list ()
static coord get_size ()
static void get_bits_per_month ()

Detailed Description

Table with methods to access the world, the universe, and everything.

Definition at line 5 of file api_world.cc.

Member Function Documentation

◆ find_nearest_city()

city_x world::find_nearest_city ( coord k)
static

Searches city next to the given coordinate.

Parameters
kcoordinate
Returns
city if there is any

◆ get_attraction_list()

attraction_list_x world::get_attraction_list ( )
static

Returns iterator through the list of attractions on the map.

Returns
iterator class.

◆ get_bits_per_month()

void world::get_bits_per_month ( )
static

Returns bits_per_month

◆ get_citizens()

array< integer > world::get_citizens ( )
static

Get monthly statistics of total number of citizens.

Returns
array, index [0] corresponds to current month

◆ get_citycars()

array< integer > world::get_citycars ( )
static

Get monthly statistics of total number of citycars.

Returns
array, index [0] corresponds to current month

◆ get_convoy_list()

convoy_list_x world::get_convoy_list ( )
static

Returns list of convoys on the map.

Returns
convoy list

◆ get_convoys()

array< integer > world::get_convoys ( )
static

Get monthly statistics of total number of convoys.

Returns
array, index [0] corresponds to current month

◆ get_factories()

array< integer > world::get_factories ( )
static

Get monthly statistics of total number of factories.

Returns
array, index [0] corresponds to current month

◆ get_generated_mail()

array< integer > world::get_generated_mail ( )
static

Get monthly statistics of total number of generated mail.

Returns
array, index [0] corresponds to current month
See also
city_x::get_generated_mail city_x::get_transported_mail

◆ get_generated_pax()

array< integer > world::get_generated_pax ( )
static

Get monthly statistics of total number of generated passengers.

Returns
array, index [0] corresponds to current month
See also
city_x::get_generated_pax city_x::get_transported_pax

◆ get_growth()

array< integer > world::get_growth ( )
static

Get monthly statistics of total city growth.

Returns
array, index [0] corresponds to current month

◆ get_label_list()

label_list_x world::get_label_list ( )
static

Returns iterator through the list of labels on the map.

Returns
iterator class.

◆ get_player()

void world::get_player ( any_x pl)
static

Returns player number pl. If player does not exist, returns null.

Parameters
plplayer number

◆ get_ratio_goods()

array< integer > world::get_ratio_goods ( )
static

Get monthly statistics of ratio of factories that got supplied.

Returns
array, index [0] corresponds to current month
See also
city_x::get_generated_mail city_x::get_transported_mail

◆ get_ratio_mail()

array< integer > world::get_ratio_mail ( )
static

Get monthly statistics of ratio transported to generated mail.

Returns
array, index [0] corresponds to current month

◆ get_ratio_pax()

array< integer > world::get_ratio_pax ( )
static

Get monthly statistics of ratio transported to generated passengers.

Returns
array, index [0] corresponds to current month

◆ get_season()

integer world::get_season ( )
static

Current season.

Returns
season (0=winter, 1=spring, 2=summer, 3=autumn)

◆ get_size()

coord world::get_size ( )
static

Returns size of the map.

◆ get_time()

time_ticks_x world::get_time ( )
static
Returns
current in-game time.

◆ get_towns()

array< integer > world::get_towns ( )
static

Get monthly statistics of total number of towns.

Returns
array, index [0] corresponds to current month

◆ get_transported_goods()

array< integer > world::get_transported_goods ( )
static

Get monthly statistics of total number of transported goods.

Returns
array, index [0] corresponds to current month
See also
city_x::get_generated_mail city_x::get_transported_mail

◆ get_year_citizens()

array< integer > world::get_year_citizens ( )
static

Get per year statistics of total number of citizens.

Returns
array, index [0] corresponds to current year

◆ get_year_citycars()

array< integer > world::get_year_citycars ( )
static

Get per year statistics of total number of citycars.

Returns
array, index [0] corresponds to current year

◆ get_year_convoys()

array< integer > world::get_year_convoys ( )
static

Get per year statistics of total number of convoys.

Returns
array, index [0] corresponds to current year

◆ get_year_factories()

array< integer > world::get_year_factories ( )
static

Get per year statistics of total number of factories.

Returns
array, index [0] corresponds to current year

◆ get_year_generated_mail()

array< integer > world::get_year_generated_mail ( )
static

Get per year statistics of total number of generated mail.

Returns
array, index [0] corresponds to current year
See also
city_x::get_generated_mail city_x::get_transported_mail

◆ get_year_generated_pax()

array< integer > world::get_year_generated_pax ( )
static

Get per year statistics of total number of generated passengers.

Returns
array, index [0] corresponds to current year
See also
city_x::get_generated_pax city_x::get_transported_pax

◆ get_year_growth()

array< integer > world::get_year_growth ( )
static

Get per year statistics of total city growth.

Returns
array, index [0] corresponds to current year

◆ get_year_ratio_goods()

array< integer > world::get_year_ratio_goods ( )
static

Get per year statistics of ratio of factories that got supplied.

Returns
array, index [0] corresponds to current year
See also
city_x::get_generated_mail city_x::get_transported_mail

◆ get_year_ratio_mail()

array< integer > world::get_year_ratio_mail ( )
static

Get per year statistics of ratio transported to generated mail.

Returns
array, index [0] corresponds to current year

◆ get_year_ratio_pax()

array< integer > world::get_year_ratio_pax ( )
static

Get per year statistics of ratio transported to generated passengers.

Returns
array, index [0] corresponds to current year

◆ get_year_towns()

array< integer > world::get_year_towns ( )
static

Get per year statistics of total number of towns.

Returns
array, index [0] corresponds to current year

◆ get_year_transported_goods()

array< integer > world::get_year_transported_goods ( )
static

Get per year statistics of total number of transported goods.

Returns
array, index [0] corresponds to current year
See also
city_x::get_generated_mail city_x::get_transported_mail

◆ is_coord_valid()

bool world::is_coord_valid ( coord k)
static

Checks whether given coordinate is valid.

Parameters
kcoordinate
Returns
true if coordinate is valid

◆ use_timeline()

bool world::use_timeline ( )
static
Returns
true if timeline play is active

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