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

Public Member Functions

 city_x (integer x, integer y)
bool is_valid ()
string get_name ()
void set_name (string)
array< integer > get_citizens ()
array< integer > get_growth ()
array< integer > get_buildings ()
array< integer > get_citycars ()
array< integer > get_transported_pax ()
array< integer > get_generated_pax ()
array< integer > get_transported_mail ()
array< integer > get_generated_mail ()
array< integer > get_year_citizens ()
array< integer > get_year_growth ()
array< integer > get_year_buildings ()
array< integer > get_year_citycars ()
array< integer > get_year_transported_pax ()
array< integer > get_year_generated_pax ()
array< integer > get_year_transported_mail ()
array< integer > get_year_generated_mail ()
bool get_citygrowth_enabled ()
coord get_pos ()
coord get_pos_nw ()
coord get_pos_se ()
string change_size (integer delta)
void set_citygrowth_enabled (bool)

Additional Inherited Members

Private Member Functions inherited from coord
 coord (int x, int y)
coord operator+ (coord other)
coord operator- (coord other)
coord operator- ()
coord operator* (integer fac)
coord operator/ (integer fac)
string _tostring ()
string href (string text)
dir to_dir ()
Private 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: