Simutrans-Squirrel-API
Static Public Member Functions | List of all members
world Class Reference
Inheritance diagram for world:
extend_get

Static Public Member Functions

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

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

static 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()

static attraction_list_x world::get_attraction_list ( )
static

Returns iterator through the list of attractions on the map.

Returns
iterator class.

◆ get_citizens()

static array<integer> world::get_citizens ( )
static

Get monthly statistics of total number of citizens.

Returns
array, index [0] corresponds to current month

◆ get_citycars()

static 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()

static convoy_list_x world::get_convoy_list ( )
static

Returns list of convoys on the map.

Returns
convoy list

◆ get_convoys()

static array<integer> world::get_convoys ( )
static

Get monthly statistics of total number of convoys.

Returns
array, index [0] corresponds to current month

◆ get_factories()

static 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()

static 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()

static 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()

static array<integer> world::get_growth ( )
static

Get monthly statistics of total city growth.

Returns
array, index [0] corresponds to current month

◆ get_label_list()

static label_list_x world::get_label_list ( )
static

Returns iterator through the list of labels on the map.

Returns
iterator class.

◆ get_player()

static player_x world::get_player ( integer  pl)
static

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

Parameters
plplayer number

◆ get_ratio_goods()

static 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()

static 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()

static 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()

static integer world::get_season ( )
static

Current season.

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

◆ get_size()

static coord world::get_size ( )
static

Returns size of the map.

◆ get_time()

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

◆ get_towns()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static bool world::is_coord_valid ( coord  k)
static

Checks whether given coordinate is valid.

Parameters
kcoordinate
Returns
true if coordinate is valid

◆ use_timeline()

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

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