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_stationlist.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_stationlist.hpp.sq')
-rw-r--r-- | src/ai/api/ai_stationlist.hpp.sq | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/api/ai_stationlist.hpp.sq b/src/ai/api/ai_stationlist.hpp.sq index 4817f7613..1b8e0229b 100644 --- a/src/ai/api/ai_stationlist.hpp.sq +++ b/src/ai/api/ai_stationlist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIStationList *>(HSQUIRRELVM vm, AIStationList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList", res, NULL, DefSQDestructorCallback<AIStationList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIStationList>() { return "AIStationList"; } +template <> const char *GetClassName<AIStationList, ST_AI>() { return "AIStationList"; } void SQAIStationList_Register(Squirrel *engine) { - DefSQClass <AIStationList> SQAIStationList("AIStationList"); + DefSQClass<AIStationList, ST_AI> SQAIStationList("AIStationList"); SQAIStationList.PreRegister(engine, "AIList"); SQAIStationList.AddConstructor<void (AIStationList::*)(AIStation::StationType station_type), 2>(engine, "xi"); @@ -40,11 +40,11 @@ namespace SQConvert { template <> inline int Return<AIStationList_Vehicle *>(HSQUIRRELVM vm, AIStationList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationList_Vehicle", res, NULL, DefSQDestructorCallback<AIStationList_Vehicle>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIStationList_Vehicle>() { return "AIStationList_Vehicle"; } +template <> const char *GetClassName<AIStationList_Vehicle, ST_AI>() { return "AIStationList_Vehicle"; } void SQAIStationList_Vehicle_Register(Squirrel *engine) { - DefSQClass <AIStationList_Vehicle> SQAIStationList_Vehicle("AIStationList_Vehicle"); + DefSQClass<AIStationList_Vehicle, ST_AI> SQAIStationList_Vehicle("AIStationList_Vehicle"); SQAIStationList_Vehicle.PreRegister(engine, "AIList"); SQAIStationList_Vehicle.AddConstructor<void (AIStationList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi"); |