Simutrans-Squirrel-API
Public Member Functions | List of all members
city_x Class Reference
Inheritance diagram for city_x:
coord extend_get ingame_object

Public Member Functions

string change_size (integer delta)
 
 city_x (integer x, integer y)
 
array< integer > get_buildings ()
 
array< integer > get_citizens ()
 
array< integer > get_citycars ()
 
bool get_citygrowth_enabled ()
 
array< integer > get_generated_mail ()
 
array< integer > get_generated_pax ()
 
array< integer > get_growth ()
 
string get_name ()
 
coord get_pos ()
 
coord get_pos_nw ()
 
coord get_pos_se ()
 
array< integer > get_transported_mail ()
 
array< integer > get_transported_pax ()
 
array< integer > get_year_buildings ()
 
array< integer > get_year_citizens ()
 
array< integer > get_year_citycars ()
 
array< integer > get_year_generated_mail ()
 
array< integer > get_year_generated_pax ()
 
array< integer > get_year_growth ()
 
array< integer > get_year_transported_mail ()
 
array< integer > get_year_transported_pax ()
 
bool is_valid ()
 
void set_citygrowth_enabled (bool)
 
void set_name (string)
 
- Public Member Functions inherited from coord
string _tostring ()
 
 coord (int x, int y)
 
string href (string text)
 
coord operator* (integer fac)
 
coord operator+ (coord other)
 
coord operator- (coord other)
 
coord operator- ()
 
coord operator/ (integer fac)
 
dir to_dir ()
 

Additional Inherited Members

- Public Attributes inherited from coord
integer x
 x-coordinate
 
integer y
 y-coordinate
 

Detailed Description

Class to access cities.

Definition at line 31 of file api_city.cc.

Constructor & Destructor Documentation

◆ city_x()

city_x::city_x ( integer  x,
integer  y 
)

Constructor.

Parameters
xx-coordinate
yy-coordinate

Member Function Documentation

◆ get_buildings()

array<integer> city_x::get_buildings ( )

Get monthly statistics of number of buildings.

Returns
array, index [0] corresponds to current month

◆ get_citizens()

array<integer> city_x::get_citizens ( )

Get monthly statistics of number of citizens.

Returns
array, index [0] corresponds to current month

◆ get_citycars()

array<integer> city_x::get_citycars ( )

Get monthly statistics of number of citycars started.

Returns
array, index [0] corresponds to current month

◆ get_citygrowth_enabled()

bool city_x::get_citygrowth_enabled ( )

Check city growth allowance.

Returns
whether city growth is enabled for this city

◆ get_generated_mail()

array<integer> city_x::get_generated_mail ( )

Get monthly statistics of number of generated mail.

Returns
array, index [0] corresponds to current month

◆ get_generated_pax()

array<integer> city_x::get_generated_pax ( )

Get monthly statistics of number of generated passengers.

Returns
array, index [0] corresponds to current month

◆ get_growth()

array<integer> city_x::get_growth ( )

Get monthly statistics of number of city growth.

Returns
array, index [0] corresponds to current month

◆ get_name()

string city_x::get_name ( )

Return name of city

Returns
name

◆ get_pos()

coord city_x::get_pos ( )

Position of town-hall.

Returns
town-hall position

◆ get_pos_nw()

coord city_x::get_pos_nw ( )

City limits.

City area is between get_pos_nw().x and get_pos_se().x, and get_pos_nw().y and get_pos_se().y.

It is not guaranteed that get_pos_nw().x <= get_pos_se().x or get_pos_nw().y <= get_pos_se().y holds!

Returns
coordinate of one corner of city limit

◆ get_pos_se()

coord city_x::get_pos_se ( )

City limits.

City area is between get_pos_nw().x and get_pos_se().x, and get_pos_nw().y and get_pos_se().y.

It is not guaranteed that get_pos_nw().x <= get_pos_se().x or get_pos_nw().y <= get_pos_se().y holds!

Returns
coordinate of another corner of city limit

◆ get_transported_mail()

array<integer> city_x::get_transported_mail ( )

Get monthly statistics of number of transported mail.

Returns
array, index [0] corresponds to current month

◆ get_transported_pax()

array<integer> city_x::get_transported_pax ( )

Get monthly statistics of number of transported passengers.

Returns
array, index [0] corresponds to current month

◆ get_year_buildings()

array<integer> city_x::get_year_buildings ( )

Get per year statistics of number of buildings.

Returns
array, index [0] corresponds to current year

◆ get_year_citizens()

array<integer> city_x::get_year_citizens ( )

Get per year statistics of number of citizens.

Returns
array, index [0] corresponds to current year

◆ get_year_citycars()

array<integer> city_x::get_year_citycars ( )

Get per year statistics of number of citycars started.

Returns
array, index [0] corresponds to current year

◆ get_year_generated_mail()

array<integer> city_x::get_year_generated_mail ( )

Get per year statistics of number of generated mail.

Returns
array, index [0] corresponds to current year

◆ get_year_generated_pax()

array<integer> city_x::get_year_generated_pax ( )

Get per year statistics of number of generated passengers.

Returns
array, index [0] corresponds to current year

◆ get_year_growth()

array<integer> city_x::get_year_growth ( )

Get per year statistics of number of city growth.

Returns
array, index [0] corresponds to current year

◆ get_year_transported_mail()

array<integer> city_x::get_year_transported_mail ( )

Get per year statistics of number of transported mail.

Returns
array, index [0] corresponds to current year

◆ get_year_transported_pax()

array<integer> city_x::get_year_transported_pax ( )

Get per year statistics of number of transported passengers.

Returns
array, index [0] corresponds to current year

◆ is_valid()

bool city_x::is_valid ( )
Returns
if object is still valid.

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