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_vehiclelist.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_vehiclelist.hpp.sq')
-rw-r--r-- | src/ai/api/ai_vehiclelist.hpp.sq | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ai/api/ai_vehiclelist.hpp.sq b/src/ai/api/ai_vehiclelist.hpp.sq index 417724556..741c1bee4 100644 --- a/src/ai/api/ai_vehiclelist.hpp.sq +++ b/src/ai/api/ai_vehiclelist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIVehicleList *>(HSQUIRRELVM vm, AIVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList", res, NULL, DefSQDestructorCallback<AIVehicleList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicleList>() { return "AIVehicleList"; } +template <> const char *GetClassName<AIVehicleList, ST_AI>() { return "AIVehicleList"; } void SQAIVehicleList_Register(Squirrel *engine) { - DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList"); + DefSQClass<AIVehicleList, ST_AI> SQAIVehicleList("AIVehicleList"); SQAIVehicleList.PreRegister(engine, "AIList"); SQAIVehicleList.AddConstructor<void (AIVehicleList::*)(), 1>(engine, "x"); @@ -40,11 +40,11 @@ namespace SQConvert { template <> inline int Return<AIVehicleList_Station *>(HSQUIRRELVM vm, AIVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Station", res, NULL, DefSQDestructorCallback<AIVehicleList_Station>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicleList_Station>() { return "AIVehicleList_Station"; } +template <> const char *GetClassName<AIVehicleList_Station, ST_AI>() { return "AIVehicleList_Station"; } void SQAIVehicleList_Station_Register(Squirrel *engine) { - DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station"); + DefSQClass<AIVehicleList_Station, ST_AI> SQAIVehicleList_Station("AIVehicleList_Station"); SQAIVehicleList_Station.PreRegister(engine, "AIList"); SQAIVehicleList_Station.AddConstructor<void (AIVehicleList_Station::*)(StationID station_id), 2>(engine, "xi"); @@ -60,11 +60,11 @@ namespace SQConvert { template <> inline int Return<AIVehicleList_Depot *>(HSQUIRRELVM vm, AIVehicleList_Depot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Depot", res, NULL, DefSQDestructorCallback<AIVehicleList_Depot>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicleList_Depot>() { return "AIVehicleList_Depot"; } +template <> const char *GetClassName<AIVehicleList_Depot, ST_AI>() { return "AIVehicleList_Depot"; } void SQAIVehicleList_Depot_Register(Squirrel *engine) { - DefSQClass <AIVehicleList_Depot> SQAIVehicleList_Depot("AIVehicleList_Depot"); + DefSQClass<AIVehicleList_Depot, ST_AI> SQAIVehicleList_Depot("AIVehicleList_Depot"); SQAIVehicleList_Depot.PreRegister(engine, "AIList"); SQAIVehicleList_Depot.AddConstructor<void (AIVehicleList_Depot::*)(TileIndex tile), 2>(engine, "xi"); @@ -80,11 +80,11 @@ namespace SQConvert { template <> inline int Return<AIVehicleList_SharedOrders *>(HSQUIRRELVM vm, AIVehicleList_SharedOrders *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_SharedOrders", res, NULL, DefSQDestructorCallback<AIVehicleList_SharedOrders>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicleList_SharedOrders>() { return "AIVehicleList_SharedOrders"; } +template <> const char *GetClassName<AIVehicleList_SharedOrders, ST_AI>() { return "AIVehicleList_SharedOrders"; } void SQAIVehicleList_SharedOrders_Register(Squirrel *engine) { - DefSQClass <AIVehicleList_SharedOrders> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders"); + DefSQClass<AIVehicleList_SharedOrders, ST_AI> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders"); SQAIVehicleList_SharedOrders.PreRegister(engine, "AIList"); SQAIVehicleList_SharedOrders.AddConstructor<void (AIVehicleList_SharedOrders::*)(VehicleID vehicle_id), 2>(engine, "xi"); @@ -100,11 +100,11 @@ namespace SQConvert { template <> inline int Return<AIVehicleList_Group *>(HSQUIRRELVM vm, AIVehicleList_Group *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Group", res, NULL, DefSQDestructorCallback<AIVehicleList_Group>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicleList_Group>() { return "AIVehicleList_Group"; } +template <> const char *GetClassName<AIVehicleList_Group, ST_AI>() { return "AIVehicleList_Group"; } void SQAIVehicleList_Group_Register(Squirrel *engine) { - DefSQClass <AIVehicleList_Group> SQAIVehicleList_Group("AIVehicleList_Group"); + DefSQClass<AIVehicleList_Group, ST_AI> SQAIVehicleList_Group("AIVehicleList_Group"); SQAIVehicleList_Group.PreRegister(engine, "AIList"); SQAIVehicleList_Group.AddConstructor<void (AIVehicleList_Group::*)(GroupID group_id), 2>(engine, "xi"); @@ -120,11 +120,11 @@ namespace SQConvert { template <> inline int Return<AIVehicleList_DefaultGroup *>(HSQUIRRELVM vm, AIVehicleList_DefaultGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_DefaultGroup", res, NULL, DefSQDestructorCallback<AIVehicleList_DefaultGroup>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicleList_DefaultGroup>() { return "AIVehicleList_DefaultGroup"; } +template <> const char *GetClassName<AIVehicleList_DefaultGroup, ST_AI>() { return "AIVehicleList_DefaultGroup"; } void SQAIVehicleList_DefaultGroup_Register(Squirrel *engine) { - DefSQClass <AIVehicleList_DefaultGroup> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup"); + DefSQClass<AIVehicleList_DefaultGroup, ST_AI> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup"); SQAIVehicleList_DefaultGroup.PreRegister(engine, "AIList"); SQAIVehicleList_DefaultGroup.AddConstructor<void (AIVehicleList_DefaultGroup::*)(AIVehicle::VehicleType vehicle_type), 2>(engine, "xi"); |