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

Public Member Functions

climates get_climate ()
 
tile_x get_ground_tile ()
 
halt_x get_halt ()
 
array< halt_xget_halt_list ()
 
halt_x get_player_halt (player_x pl)
 
tile_x get_tile_at_height (integer z)
 
bool is_valid ()
 
 square_x (integer x, integer y)
 
- 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 map squares, which holds all the tiles on one particular coordinate.

Definition at line 198 of file api_tiles.cc.

Constructor & Destructor Documentation

◆ square_x()

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

◆ get_climate()

climates square_x::get_climate ( )

Returns climate of ground tile.

◆ get_ground_tile()

tile_x square_x::get_ground_tile ( )

Access ground tile.

Returns
tile_x instance

◆ get_halt()

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

◆ get_halt_list()

array<halt_x> square_x::get_halt_list ( )

Returns list of stations that cover this tile.

◆ get_player_halt()

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

◆ get_tile_at_height()

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

◆ is_valid()

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

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