diff -r 5b3be41b3ce6 -r 0b40f556e051 src/ai/api/ai_company.hpp --- a/src/ai/api/ai_company.hpp Fri Feb 29 00:17:59 2008 +0000 +++ b/src/ai/api/ai_company.hpp Fri Feb 29 08:51:47 2008 +0000 @@ -128,6 +128,23 @@ * @return true if we could allocate a minimum of "loan" loan. */ static bool SetMinimumLoanAmount(int32 loan); + + /** + * Build your company's HQ on the given tile. + * @param tile the tile to build your HQ on, this tile is the most nothern tile of your HQ. + * @pre AIMap::IsValidTile(tile). + * @note An HQ can not be removed, only by water or rebuilding; If an HQ is build again, the old one is removed. + * @return true if the HQ could be build. + */ + static bool BuildCompanyHQ(TileIndex tile); + + /** + * Return the location of a company's HQ. + * @param company the company the get the HQ of. + * @pre ResolveCompanyIndex(company) != INVALID_COMPANY. + * @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. + */ + static TileIndex GetCompanyHQ(CompanyIndex company); }; DECLARE_POSTFIX_INCREMENT(AICompany::CompanyIndex);