summaryrefslogtreecommitdiff
path: root/src/ai/ai_info.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/ai_info.hpp')
-rw-r--r--src/ai/ai_info.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp
index fc04d6180..57317d3f0 100644
--- a/src/ai/ai_info.hpp
+++ b/src/ai/ai_info.hpp
@@ -6,6 +6,7 @@
#define AI_INFO
#include <list>
+#include "../core/smallmap_type.hpp"
#include "api/ai_object.hpp"
enum AIConfigFlags {
@@ -14,6 +15,8 @@ enum AIConfigFlags {
AICONFIG_BOOLEAN = 0x2, //!< This value is a boolean (either 0 (false) or 1 (true) ).
};
+typedef SmallMap<int, char *> LabelMapping;
+
struct AIConfigItem {
const char *name; //!< The name of the configuration setting.
const char *description; //!< The description of the configuration setting.
@@ -26,6 +29,7 @@ struct AIConfigItem {
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.
+ LabelMapping *labels; //!< Text labels for the integer values.
};
extern AIConfigItem _start_date_config;
@@ -141,6 +145,11 @@ public:
SQInteger AddSetting(HSQUIRRELVM vm);
/**
+ * Add labels for a setting.
+ */
+ SQInteger AddLabels(HSQUIRRELVM vm);
+
+ /**
* Get the default value for a setting.
*/
int GetSettingDefaultValue(const char *name);