src/ai/api/ai_company.hpp
branchnoai
changeset 9808 0b40f556e051
parent 9737 ee408edf3851
child 9829 80fbe02a4184
equal deleted inserted replaced
9807:5b3be41b3ce6 9808:0b40f556e051
   126 	 * @pre loan must be non-negative.
   126 	 * @pre loan must be non-negative.
   127 	 * @pre loan must be below GetMaxLoan().
   127 	 * @pre loan must be below GetMaxLoan().
   128 	 * @return true if we could allocate a minimum of "loan" loan.
   128 	 * @return true if we could allocate a minimum of "loan" loan.
   129 	 */
   129 	 */
   130 	static bool SetMinimumLoanAmount(int32 loan);
   130 	static bool SetMinimumLoanAmount(int32 loan);
       
   131 
       
   132 	/**
       
   133 	 * Build your company's HQ on the given tile.
       
   134 	 * @param tile the tile to build your HQ on, this tile is the most nothern tile of your HQ.
       
   135 	 * @pre AIMap::IsValidTile(tile).
       
   136 	 * @note An HQ can not be removed, only by water or rebuilding; If an HQ is build again, the old one is removed.
       
   137 	 * @return true if the HQ could be build.
       
   138 	 */
       
   139 	static bool BuildCompanyHQ(TileIndex tile);
       
   140 
       
   141 	/**
       
   142 	 * Return the location of a company's HQ.
       
   143 	 * @param company the company the get the HQ of.
       
   144 	 * @pre ResolveCompanyIndex(company) != INVALID_COMPANY.
       
   145 	 * @return The tile of the company's HQ, this tile is the most nothern tile of that HQ, or INVALID_TILE if there is no HQ yet.
       
   146 	 */
       
   147 	static TileIndex GetCompanyHQ(CompanyIndex company);
   131 };
   148 };
   132 
   149 
   133 DECLARE_POSTFIX_INCREMENT(AICompany::CompanyIndex);
   150 DECLARE_POSTFIX_INCREMENT(AICompany::CompanyIndex);
   134 
   151 
   135 #endif /* AI_COMPANY_HPP */
   152 #endif /* AI_COMPANY_HPP */