--- 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.