src/ai/api/ai_tile.hpp
branchnoai
changeset 10360 3234cb59de55
parent 10191 da75d1460a4b
child 10848 7816f447a0ed
equal deleted inserted replaced
10359:18b4de3c2074 10360:3234cb59de55
     5 #ifndef AI_TILE_HPP
     5 #ifndef AI_TILE_HPP
     6 #define AI_TILE_HPP
     6 #define AI_TILE_HPP
     7 
     7 
     8 #include "ai_abstractlist.hpp"
     8 #include "ai_abstractlist.hpp"
     9 #include "ai_error.hpp"
     9 #include "ai_error.hpp"
       
    10 #include "ai_company.hpp"
    10 
    11 
    11 /**
    12 /**
    12  * Class that handles all tile related functions.
    13  * Class that handles all tile related functions.
    13  */
    14  */
    14 class AITile : public AIObject {
    15 class AITile : public AIObject {
   135 	 * @return The height of the tile, ranging from 0 to 15.
   136 	 * @return The height of the tile, ranging from 0 to 15.
   136 	 */
   137 	 */
   137 	static int32 GetHeight(TileIndex tile);
   138 	static int32 GetHeight(TileIndex tile);
   138 
   139 
   139 	/**
   140 	/**
       
   141 	 * Get the owner of the tile.
       
   142 	 * @param tile The tile to get the owner from.
       
   143 	 * @pre AIMap::IsValidTile(tile).
       
   144 	 * @return The CompanyIndex of the owner of the tile, or INVALID_COMPANY if
       
   145 	 *  there is no owner (grass/industry/water tiles, etc.).
       
   146 	 */
       
   147 	static AICompany::CompanyIndex GetOwner(TileIndex tile);
       
   148 
       
   149 	/**
   140 	 * Check how much cargo this tile accepts.
   150 	 * Check how much cargo this tile accepts.
   141 	 *  It creates a radius around the tile, and adds up all acceptance of this
   151 	 *  It creates a radius around the tile, and adds up all acceptance of this
   142 	 *   cargo.
   152 	 *   cargo.
   143 	 * @param tile The tile to check on.
   153 	 * @param tile The tile to check on.
   144 	 * @param cargo_type The cargo to check the acceptance of.
   154 	 * @param cargo_type The cargo to check the acceptance of.