summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_info.cpp8
-rw-r--r--src/ai/ai_info.hpp1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp
index c67059f20..b2c653826 100644
--- a/src/ai/ai_info.cpp
+++ b/src/ai/ai_info.cpp
@@ -153,7 +153,7 @@ void AIFileInfo::CheckMethods(SQInteger *res, const char *name)
AIConfigItem config;
config.name = strdup("start_date");
- config.description = strdup("The amount of months after the start of the last AI, this AI will start (give or take).");
+ config.description = strdup("The amount of days after the start of the last AI, this AI will start (give or take).");
config.min_value = AI::START_NEXT_MIN;
config.max_value = AI::START_NEXT_MAX;
config.easy_value = AI::START_NEXT_EASY;
@@ -161,6 +161,7 @@ void AIFileInfo::CheckMethods(SQInteger *res, const char *name)
config.hard_value = AI::START_NEXT_HARD;
config.custom_value = AI::START_NEXT_MEDIUM;
config.random_deviation = AI::START_NEXT_DEVIATION;
+ config.step_size = 30;
config.flags = AICONFIG_NONE;
info->config_list.push_back(config);
@@ -208,6 +209,7 @@ SQInteger AIInfo::AddSetting(HSQUIRRELVM vm)
AIConfigItem config;
memset(&config, 0, sizeof(config));
config.max_value = 1;
+ config.step_size = 1;
uint items = 0;
/* Read the table, and find all properties we care about */
@@ -267,6 +269,10 @@ SQInteger AIInfo::AddSetting(HSQUIRRELVM vm)
sq_getinteger(vm, -1, &res);
config.custom_value = res;
items |= 0x080;
+ } else if (strcmp(key, "step_size") == 0) {
+ SQInteger res;
+ sq_getinteger(vm, -1, &res);
+ config.step_size = res;
} else if (strcmp(key, "flags") == 0) {
SQInteger res;
sq_getinteger(vm, -1, &res);
diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp
index ce48a6f35..71691ae3a 100644
--- a/src/ai/ai_info.hpp
+++ b/src/ai/ai_info.hpp
@@ -24,6 +24,7 @@ struct AIConfigItem {
int medium_value; //!< The default value on medium difficulty setting.
int hard_value; //!< The default value on hard difficulty setting.
int random_deviation; //!< The maximum random deviation from the default value.
+ int step_size; //!< The step size in the gui.
AIConfigFlags flags; //!< Flags for the configuration setting.
};