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

Public Member Functions

 square_x (integer x, integer y)
 
bool is_valid ()
 
halt_x get_halt ()
 
halt_x get_player_halt (player_x pl)
 
tile_x get_tile_at_height (integer z)
 
tile_x get_ground_tile ()
 
array< halt_xget_halt_list ()
 
climates get_climate ()
 

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 map squares, which holds all the tiles on one particular coordinate.

Definition at line 180 of file api_tiles.cc.

Constructor & Destructor Documentation

square_x::square_x ( integer  x,
integer  y 
)

Constructor. Returns map square at particular 2d coordinate. Raises error, if (x, y) coordinate are out-of-range.

Parameters
xx-coordinate
yz-coordinate

Member Function Documentation

climates square_x::get_climate ( )

Returns climate of ground tile.

tile_x square_x::get_ground_tile ( )

Access ground tile.

Returns
tile_x instance
halt_x square_x::get_halt ( )

Access some halt at this square.

Deprecated:
Use square_x::get_player_halt or tile_x::get_halt instead!
Returns
halt_x instance or null/false if no halt is present
array<halt_x> square_x::get_halt_list ( )

Returns list of stations that cover this tile.

halt_x square_x::get_player_halt ( player_x  pl)

Access halt of this player at this map position.

Parameters
plpotential owner of halt
Returns
halt_x instance or null/false if no halt is present
tile_x square_x::get_tile_at_height ( integer  z)

Access tile at specified height.

Parameters
zheight
Returns
tile_x or null/false if nothing found
bool square_x::is_valid ( )
Returns
if object is still valid.

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