Simutrans-Squirrel-API
|
Public Member Functions | |
string | can_remove_all_objects (player_x pl) |
map_object_x | find_object (map_objects) |
dir | get_canal_ribi () |
array< convoy_x > | get_convoys () |
depot_x | get_depot () |
halt_x | get_halt () |
tile_x | get_neighbour (way_types wt, dir d) |
tile_object_list_x | get_objects () |
slope | get_slope () |
string | get_text () |
way_x | get_way (way_types wt) |
dir | get_way_dirs (waytypes wt) |
dir | get_way_dirs_masked (waytypes wt) |
bool | has_two_ways () |
bool | has_way (way_types wt) |
bool | has_ways () |
bool | is_bridge () |
bool | is_empty () |
bool | is_ground () |
bool | is_tunnel () |
bool | is_valid () |
bool | is_water () |
string | remove_object (player_x pl, map_objects type) |
tile_x (integer x, integer y, integer z) | |
Functions to mark tiles. | |
Methods to mark, unmark, and check mark-status of tiles. Mark flag can be reset by cursor movement.
| |
bool | is_marked () |
Check if tile is marked. | |
void | unmark () |
Unmark tile. | |
void | mark () |
Mark tile. | |
Public Member Functions inherited from coord3d | |
string | _tostring () |
coord (int x, int y, int z) | |
string | href (string text) |
coord3d | operator* (integer fac) |
coord3d | operator+ (coord3d other) |
coord3d | operator+ (coord3d other) |
coord3d | operator- (coord other) |
coord3d | operator- (coord other) |
coord3d | operator- () |
coord3d | operator/ (integer fac) |
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 coord3d | |
integer | x |
x-coordinate | |
integer | y |
y-coordinate | |
integer | z |
z-coordinate - height | |
Public Attributes inherited from coord | |
integer | x |
x-coordinate | |
integer | y |
y-coordinate | |
Class to access tiles on the map.
There is the possibility to iterate through all objects on the tile:
Definition at line 13 of file api_tiles.cc.
tile_x::tile_x | ( | integer | x, |
integer | y, | ||
integer | z | ||
) |
Constructor. Returns tile at particular 3d coordinate. If not tile is found, it returns the ground tile. Raises error, if (x
, y
) coordinates are out-of-range.
x | x-coordinate |
y | y-coordinate |
z | z-coordinate |
string tile_x::can_remove_all_objects | ( | player_x | pl | ) |
Checks whether player can delete all objects on the tile.
pl | player |
map_object_x tile_x::find_object | ( | map_objects | ) |
Search for a given object type on the tile.
dir tile_x::get_canal_ribi | ( | ) |
Return directions in which canals branch off from water tiles. Used for jps pathfinding on water tiles.
array<convoy_x> tile_x::get_convoys | ( | ) |
depot_x tile_x::get_depot | ( | ) |
Returns depot_x object on this tile if any depot is present.
halt_x tile_x::get_halt | ( | ) |
Access halt at this tile.
Returns neighbour if one follows way in the given direction.
wt | waytype, if equal to wt_all then ways are ignored. |
d | direction |
tile_object_list_x tile_x::get_objects | ( | ) |
List to iterate through all objects on this tile.
slope tile_x::get_slope | ( | ) |
Returns encoded slope of tile, zero means flat tile.
string tile_x::get_text | ( | ) |
Returns text of a sign on this tile (station sign, city name, label).
Returns way_x object on this tile of way type wt
if present
wt | waytype |
dir tile_x::get_way_dirs | ( | waytypes | wt | ) |
Return directions in which ways on this tile go. One-way signs are ignored here.
wt | waytype |
dir tile_x::get_way_dirs_masked | ( | waytypes | wt | ) |
Return directions in which ways on this tile go. Some signs restrict available directions.
wt | waytype |
bool tile_x::has_two_ways | ( | ) |
Queries ways on the tile.
bool tile_x::has_way | ( | way_types | wt | ) |
Queries ways on the tile.
wt | waytype |
bool tile_x::has_ways | ( | ) |
Queries ways on the tile.
bool tile_x::is_bridge | ( | ) |
Queries tile type.
bool tile_x::is_empty | ( | ) |
Queries tile type.
bool tile_x::is_ground | ( | ) |
Queries tile type.
bool tile_x::is_tunnel | ( | ) |
Queries tile type.
bool tile_x::is_valid | ( | ) |
bool tile_x::is_water | ( | ) |
Queries tile type.