summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_airport.hpp
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-02-05 01:15:54 +0000
committerYexo <yexo@openttd.org>2009-02-05 01:15:54 +0000
commitf2907d816f800fe4c6cbdcf586d8e15a07fc19ff (patch)
tree85c9d8cf146efb0bffe7348bcf6ccd390e05a9f3 /src/ai/api/ai_airport.hpp
parent62a11eb5a93a12994bdf84475930d0d4b7fb4315 (diff)
downloadopenttd-f2907d816f800fe4c6cbdcf586d8e15a07fc19ff.tar.xz
(svn r15346) -Add [NoAI]: Add AIAirport::GetNearestTown() so AIs can known in which town the noise level will increase.
Diffstat (limited to 'src/ai/api/ai_airport.hpp')
-rw-r--r--src/ai/api/ai_airport.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ai/api/ai_airport.hpp b/src/ai/api/ai_airport.hpp
index d1d18714b..7693774e6 100644
--- a/src/ai/api/ai_airport.hpp
+++ b/src/ai/api/ai_airport.hpp
@@ -155,10 +155,19 @@ public:
* built at this tile.
* @param tile The tile to check.
* @param type The AirportType to check.
- * @return The TownID of the town closest to the tile.
- * @note The noise will be added to the town with TownID AITile.GetClosestTown(tile).
+ * @return The amount of noise added to the nearest town.
+ * @note The noise will be added to the town with TownID GetNearestTown(itle, type).
*/
static int GetNoiseLevelIncrease(TileIndex tile, AirportType type);
+
+ /**
+ * Get the TownID of the town whose local authority will influence
+ * an airport at some tile.
+ * @param tile The tile to check.
+ * @param type The AirportType to check.
+ * @return The TownID of the town closest to the tile.
+ */
+ static TownID GetNearestTown(TileIndex tile, AirportType type);
};
#endif /* AI_AIRPORT_HPP */