diff options
author | truebrain <truebrain@openttd.org> | 2011-11-29 22:23:33 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-29 22:23:33 +0000 |
commit | bff7c33aa909d00428f81e6b5f89b236343fc13b (patch) | |
tree | 8a7617a800d443a19f871b7b7a0eb1382f08dfa5 /src/ai/api/ai_industrylist.hpp.sq | |
parent | b13fa6924b8bca7ec378d4daf87e18318670a44f (diff) | |
download | openttd-bff7c33aa909d00428f81e6b5f89b236343fc13b.tar.xz |
(svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium)
Diffstat (limited to 'src/ai/api/ai_industrylist.hpp.sq')
-rw-r--r-- | src/ai/api/ai_industrylist.hpp.sq | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ai/api/ai_industrylist.hpp.sq b/src/ai/api/ai_industrylist.hpp.sq index 43a557069..c5911c1ff 100644 --- a/src/ai/api/ai_industrylist.hpp.sq +++ b/src/ai/api/ai_industrylist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIIndustryList *>(HSQUIRRELVM vm, AIIndustryList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList", res, NULL, DefSQDestructorCallback<AIIndustryList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIIndustryList>() { return "AIIndustryList"; } +template <> const char *GetClassName<AIIndustryList, ST_AI>() { return "AIIndustryList"; } void SQAIIndustryList_Register(Squirrel *engine) { - DefSQClass <AIIndustryList> SQAIIndustryList("AIIndustryList"); + DefSQClass<AIIndustryList, ST_AI> SQAIIndustryList("AIIndustryList"); SQAIIndustryList.PreRegister(engine, "AIList"); SQAIIndustryList.AddConstructor<void (AIIndustryList::*)(), 1>(engine, "x"); @@ -40,11 +40,11 @@ namespace SQConvert { template <> inline int Return<AIIndustryList_CargoAccepting *>(HSQUIRRELVM vm, AIIndustryList_CargoAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_CargoAccepting", res, NULL, DefSQDestructorCallback<AIIndustryList_CargoAccepting>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIIndustryList_CargoAccepting>() { return "AIIndustryList_CargoAccepting"; } +template <> const char *GetClassName<AIIndustryList_CargoAccepting, ST_AI>() { return "AIIndustryList_CargoAccepting"; } void SQAIIndustryList_CargoAccepting_Register(Squirrel *engine) { - DefSQClass <AIIndustryList_CargoAccepting> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting"); + DefSQClass<AIIndustryList_CargoAccepting, ST_AI> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting"); SQAIIndustryList_CargoAccepting.PreRegister(engine, "AIList"); SQAIIndustryList_CargoAccepting.AddConstructor<void (AIIndustryList_CargoAccepting::*)(CargoID cargo_id), 2>(engine, "xi"); @@ -60,11 +60,11 @@ namespace SQConvert { template <> inline int Return<AIIndustryList_CargoProducing *>(HSQUIRRELVM vm, AIIndustryList_CargoProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryList_CargoProducing", res, NULL, DefSQDestructorCallback<AIIndustryList_CargoProducing>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIIndustryList_CargoProducing>() { return "AIIndustryList_CargoProducing"; } +template <> const char *GetClassName<AIIndustryList_CargoProducing, ST_AI>() { return "AIIndustryList_CargoProducing"; } void SQAIIndustryList_CargoProducing_Register(Squirrel *engine) { - DefSQClass <AIIndustryList_CargoProducing> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing"); + DefSQClass<AIIndustryList_CargoProducing, ST_AI> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing"); SQAIIndustryList_CargoProducing.PreRegister(engine, "AIList"); SQAIIndustryList_CargoProducing.AddConstructor<void (AIIndustryList_CargoProducing::*)(CargoID cargo_id), 2>(engine, "xi"); |