summaryrefslogtreecommitdiff
path: root/src/ai/ai_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/ai_info.cpp')
-rw-r--r--src/ai/ai_info.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index 9e439cce2..c68972c45 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -295,6 +295,14 @@ const AIConfigItemList *AIInfo::GetConfigList()
return &this->config_list;
}
+const AIConfigItem *AIInfo::GetConfigItem(const char *name)
+{
+ for (AIConfigItemList::iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {
+ if (strcmp((*it).name, name) == 0) return &(*it);
+ }
+ return NULL;
+}
+
int AIInfo::GetSettingDefaultValue(const char *name)
{
for (AIConfigItemList::iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {