src/ai/api/ai_tile.hpp
branchnoai
changeset 10360 3234cb59de55
parent 10191 da75d1460a4b
child 10848 7816f447a0ed
--- a/src/ai/api/ai_tile.hpp	Fri Apr 25 15:34:04 2008 +0000
+++ b/src/ai/api/ai_tile.hpp	Fri Apr 25 15:51:12 2008 +0000
@@ -7,6 +7,7 @@
 
 #include "ai_abstractlist.hpp"
 #include "ai_error.hpp"
+#include "ai_company.hpp"
 
 /**
  * Class that handles all tile related functions.
@@ -137,6 +138,15 @@
 	static int32 GetHeight(TileIndex tile);
 
 	/**
+	 * Get the owner of the tile.
+	 * @param tile The tile to get the owner from.
+	 * @pre AIMap::IsValidTile(tile).
+	 * @return The CompanyIndex of the owner of the tile, or INVALID_COMPANY if
+	 *  there is no owner (grass/industry/water tiles, etc.).
+	 */
+	static AICompany::CompanyIndex GetOwner(TileIndex tile);
+
+	/**
 	 * Check how much cargo this tile accepts.
 	 *  It creates a radius around the tile, and adds up all acceptance of this
 	 *   cargo.