summaryrefslogtreecommitdiff
path: root/src/ai/ai_info.hpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2009-01-15 15:56:10 +0000
committertruebrain <truebrain@openttd.org>2009-01-15 15:56:10 +0000
commit103cd2a5ed5df7f166c2024e0e4e85d4790e3529 (patch)
tree336201bee848644fdb9096a06f1ffec998951171 /src/ai/ai_info.hpp
parentd62a85f2ce2dd7f366b8d3a6610ee70046ee928a (diff)
downloadopenttd-103cd2a5ed5df7f166c2024e0e4e85d4790e3529.tar.xz
(svn r15091) -Add [NoAI] [API CHANGE]: introduce GetCategory() as a requirement for every library.nut, to indicate in which category it belongs. Currently the directory indicates the category, but this doesn't allow planned future additions
Diffstat (limited to 'src/ai/ai_info.hpp')
-rw-r--r--src/ai/ai_info.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ai/ai_info.hpp b/src/ai/ai_info.hpp
index 223fbeaf3..9708eb545 100644
--- a/src/ai/ai_info.hpp
+++ b/src/ai/ai_info.hpp
@@ -101,7 +101,7 @@ public:
/**
* Process the creation of a FileInfo object.
*/
- static SQInteger Constructor(HSQUIRRELVM vm, AIFileInfo *info);
+ static SQInteger Constructor(HSQUIRRELVM vm, AIFileInfo *info, bool library);
private:
class Squirrel *engine;
@@ -155,12 +155,22 @@ private:
class AILibrary : public AIFileInfo {
public:
+ AILibrary() : AIFileInfo(), category(NULL) {};
+
/**
* Create an AI, using this AIInfo as start-template.
*/
static SQInteger Constructor(HSQUIRRELVM vm);
static SQInteger Import(HSQUIRRELVM vm);
+
+ /**
+ * Get the category this library is in.
+ */
+ const char *GetCategory();
+
+private:
+ const char *category;
};
#endif /* AI_INFO */