--- a/src/ai/api/ai_station.cpp Fri Apr 25 15:34:04 2008 +0000
+++ b/src/ai/api/ai_station.cpp Fri Apr 25 15:51:12 2008 +0000
@@ -5,6 +5,7 @@
#include "ai_station.hpp"
#include "ai_cargo.hpp"
#include "ai_map.hpp"
+#include "ai_town.hpp"
#include "../../openttd.h"
#include "../../debug.h"
#include "../../station_map.h"
@@ -87,3 +88,8 @@
{
return AIMap::DistanceSquare(tile, GetLocation(station_id));
}
+
+/* static */ bool AIStation::IsWithinTownRadius(StationID station_id, TownID town_id)
+{
+ return AITown::IsWithinTownRadius(town_id, GetLocation(station_id));
+}