summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_buoylist.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-06-17 13:12:08 +0000
committeryexo <yexo@openttd.org>2009-06-17 13:12:08 +0000
commitd09d3566ddd86a559819354bad805dfc23622db8 (patch)
tree5ba4e0934a063e88cf58f4f2b34bd510aee08849 /src/ai/api/ai_buoylist.cpp
parent121a569125bd6cb986c8ca31e68e12685c7a281a (diff)
downloadopenttd-d09d3566ddd86a559819354bad805dfc23622db8.tar.xz
(svn r16585) -Add [NoAI]: AIBuoyList to get a list of all buoys
Diffstat (limited to 'src/ai/api/ai_buoylist.cpp')
-rw-r--r--src/ai/api/ai_buoylist.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ai/api/ai_buoylist.cpp b/src/ai/api/ai_buoylist.cpp
new file mode 100644
index 000000000..0ba66fb39
--- /dev/null
+++ b/src/ai/api/ai_buoylist.cpp
@@ -0,0 +1,14 @@
+/* $Id$ */
+
+/** @file ai_buoylist.cpp Implementation of AIBuoyList and friends. */
+
+#include "ai_buoylist.hpp"
+#include "../../station_base.h"
+
+AIBuoyList::AIBuoyList()
+{
+ Station *st;
+ FOR_ALL_STATIONS(st) {
+ if (st->IsBuoy()) this->AddItem(st->xy);
+ }
+}