summaryrefslogtreecommitdiff
path: root/src/ai/ai_scanner.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-01-03 14:52:30 +0000
committeryexo <yexo@openttd.org>2011-01-03 14:52:30 +0000
commit8e3e93b96ff0e575c798ed443825c39ff192aa58 (patch)
treea905c62e1fe00581214ec95247ff4578052bd7d0 /src/ai/ai_scanner.cpp
parent37b9c311184c21dda3da165c18933b707d2a227b (diff)
downloadopenttd-8e3e93b96ff0e575c798ed443825c39ff192aa58.tar.xz
(svn r21703) -Feature [FS#4372]: list_ai_libs console command to get a list of recognized AI libraries (dihedral)
Diffstat (limited to 'src/ai/ai_scanner.cpp')
-rw-r--r--src/ai/ai_scanner.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 36607c217..90bdd99c7 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -343,6 +343,19 @@ char *AIScanner::GetAIConsoleList(char *p, const char *last) const
return p;
}
+char *AIScanner::GetAIConsoleLibraryList(char *p, const char *last) const
+{
+ p += seprintf(p, last, "List of AI Libraries:\n");
+ AILibraryList::const_iterator it = this->library_list.begin();
+ for (; it != this->library_list.end(); it++) {
+ AILibrary *i = (*it).second;
+ p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
+ }
+ p += seprintf(p, last, "\n");
+
+ return p;
+}
+
#if defined(ENABLE_NETWORK)
#include "../network/network_content.h"
#include "../3rdparty/md5/md5.h"