src/ai/api/ai_tile.hpp
branchnoai
changeset 10853 87f2238f47d4
parent 10848 7816f447a0ed
child 10855 90904faa1890
equal deleted inserted replaced
10852:f02afc46afa8 10853:87f2238f47d4
    68 	 * Check if this tile is buildable, i.e. no things on it that needs
    68 	 * Check if this tile is buildable, i.e. no things on it that needs
    69 	 *  demolishing.
    69 	 *  demolishing.
    70 	 * @param tile The tile to check on.
    70 	 * @param tile The tile to check on.
    71 	 * @pre AIMap::IsValidTile(tile).
    71 	 * @pre AIMap::IsValidTile(tile).
    72 	 * @return True if it is buildable, false if not.
    72 	 * @return True if it is buildable, false if not.
    73 	 * @note Road and rail are considered buildable.
    73 	 * @note For trams you also might want to check for AIRoad::IsRoad(),
       
    74 	 *   as you can build tram-rails on road-tiles.
       
    75 	 * @note For rail you also might want to check for AIRoad::IsRoad(),
       
    76 	 *   as in some cases you can build rails on road-tiles.
    74 	 */
    77 	 */
    75 	static bool IsBuildable(TileIndex tile);
    78 	static bool IsBuildable(TileIndex tile);
    76 
    79 
    77 	/**
    80 	/**
    78 	 * Check if this tile is buildable in a rectangle around a tile, with the
    81 	 * Check if this tile is buildable in a rectangle around a tile, with the
    80 	 * @param tile The tile to check on.
    83 	 * @param tile The tile to check on.
    81 	 * @param width The width of the rectangle.
    84 	 * @param width The width of the rectangle.
    82 	 * @param height The height of the rectangle.
    85 	 * @param height The height of the rectangle.
    83 	 * @pre AIMap::IsValidTile(tile).
    86 	 * @pre AIMap::IsValidTile(tile).
    84 	 * @return True if it is buildable, false if not.
    87 	 * @return True if it is buildable, false if not.
    85 	 * @note Road and rail are considered buildable.
       
    86 	 */
    88 	 */
    87 	static bool IsBuildableRectangle(TileIndex tile, uint width, uint height);
    89 	static bool IsBuildableRectangle(TileIndex tile, uint width, uint height);
    88 
    90 
    89 	/**
    91 	/**
    90 	 * Check if a tile is water.
    92 	 * Check if a tile is water.