diff options
author | yexo <yexo@openttd.org> | 2009-06-17 13:12:08 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-06-17 13:12:08 +0000 |
commit | d09d3566ddd86a559819354bad805dfc23622db8 (patch) | |
tree | 5ba4e0934a063e88cf58f4f2b34bd510aee08849 /src/ai/api/ai_buoylist.cpp | |
parent | 121a569125bd6cb986c8ca31e68e12685c7a281a (diff) | |
download | openttd-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.cpp | 14 |
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); + } +} |