diff options
author | truebrain <truebrain@openttd.org> | 2009-01-15 15:56:10 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-15 15:56:10 +0000 |
commit | 103cd2a5ed5df7f166c2024e0e4e85d4790e3529 (patch) | |
tree | 336201bee848644fdb9096a06f1ffec998951171 /src/ai/ai_info.hpp | |
parent | d62a85f2ce2dd7f366b8d3a6610ee70046ee928a (diff) | |
download | openttd-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.hpp | 12 |
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 */ |