From 8e3e93b96ff0e575c798ed443825c39ff192aa58 Mon Sep 17 00:00:00 2001 From: yexo Date: Mon, 3 Jan 2011 14:52:30 +0000 Subject: (svn r21703) -Feature [FS#4372]: list_ai_libs console command to get a list of recognized AI libraries (dihedral) --- src/ai/ai_scanner.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ai/ai_scanner.cpp') 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" -- cgit v1.2.3-54-g00ecf