(svn r15366) -Add [NoAI]: Add AddLabels() where you can define labels for the values of the settings in info.nut

This commit is contained in:
Yexo
2009-02-06 00:25:37 +00:00
parent 87f34012ba
commit 72643f2090
4 changed files with 65 additions and 3 deletions

View File

@@ -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;
@@ -140,6 +144,11 @@ public:
*/
SQInteger AddSetting(HSQUIRRELVM vm);
/**
* Add labels for a setting.
*/
SQInteger AddLabels(HSQUIRRELVM vm);
/**
* Get the default value for a setting.
*/