diff options
author | rubidium <rubidium@openttd.org> | 2011-11-13 20:52:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-13 20:52:39 +0000 |
commit | 3f7eb71b17da7840678c68953729aff156cc500b (patch) | |
tree | 5d71bc9aae9a9bc39ae15c1794f85d7e14987628 /src/ai/api/ai_grouplist.hpp.sq | |
parent | b7a655bf4cafc68e14cade593e8b1aca7f04f7dd (diff) | |
download | openttd-3f7eb71b17da7840678c68953729aff156cc500b.tar.xz |
(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically
Diffstat (limited to 'src/ai/api/ai_grouplist.hpp.sq')
-rw-r--r-- | src/ai/api/ai_grouplist.hpp.sq | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ai/api/ai_grouplist.hpp.sq b/src/ai/api/ai_grouplist.hpp.sq index dea8b5a34..6c9f283af 100644 --- a/src/ai/api/ai_grouplist.hpp.sq +++ b/src/ai/api/ai_grouplist.hpp.sq @@ -20,6 +20,8 @@ namespace SQConvert { template <> int Return<AIGroupList *>(HSQUIRRELVM vm, AIGroupList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroupList", res, NULL, DefSQDestructorCallback<AIGroupList>); return 1; } } // namespace SQConvert +template <> const char *GetClassName<AIGroupList>() { return "AIGroupList"; } + void SQAIGroupList_Register(Squirrel *engine) { DefSQClass <AIGroupList> SQAIGroupList("AIGroupList"); |