diff options
54 files changed, 190 insertions, 185 deletions
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 6e78d1c19..0062ffa87 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -28,14 +28,14 @@ void AIScanner::RescanAIDir() this->Scan(PATHSEP "library.nut", AI_LIBRARY_DIR); } -template <> const char *GetClassName<AIInfo>() { return "AIInfo"; } +template <> const char *GetClassName<AIInfo, ST_AI>() { return "AIInfo"; } AIScanner::AIScanner() : ScriptScanner(), info_dummy(NULL) { /* Create the AIInfo class, and add the RegisterAI function */ - DefSQClass <AIInfo> SQAIInfo("AIInfo"); + DefSQClass<AIInfo, ST_AI> SQAIInfo("AIInfo"); SQAIInfo.PreRegister(engine); SQAIInfo.AddConstructor<void (AIInfo::*)(), 1>(engine, "x"); SQAIInfo.DefSQAdvancedMethod(this->engine, &AIInfo::AddSetting, "AddSetting"); diff --git a/src/ai/api/ai_accounting.hpp.sq b/src/ai/api/ai_accounting.hpp.sq index 182561e9b..36aaa4528 100644 --- a/src/ai/api/ai_accounting.hpp.sq +++ b/src/ai/api/ai_accounting.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIAccounting *>(HSQUIRRELVM vm, AIAccounting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAccounting", res, NULL, DefSQDestructorCallback<AIAccounting>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIAccounting>() { return "AIAccounting"; } +template <> const char *GetClassName<AIAccounting, ST_AI>() { return "AIAccounting"; } void SQAIAccounting_Register(Squirrel *engine) { - DefSQClass <AIAccounting> SQAIAccounting("AIAccounting"); + DefSQClass<AIAccounting, ST_AI> SQAIAccounting("AIAccounting"); SQAIAccounting.PreRegister(engine); SQAIAccounting.AddConstructor<void (AIAccounting::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_airport.hpp.sq b/src/ai/api/ai_airport.hpp.sq index 930675d67..55cdce199 100644 --- a/src/ai/api/ai_airport.hpp.sq +++ b/src/ai/api/ai_airport.hpp.sq @@ -26,11 +26,11 @@ namespace SQConvert { template <> inline int Return<AIAirport *>(HSQUIRRELVM vm, AIAirport *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAirport", res, NULL, DefSQDestructorCallback<AIAirport>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIAirport>() { return "AIAirport"; } +template <> const char *GetClassName<AIAirport, ST_AI>() { return "AIAirport"; } void SQAIAirport_Register(Squirrel *engine) { - DefSQClass <AIAirport> SQAIAirport("AIAirport"); + DefSQClass<AIAirport, ST_AI> SQAIAirport("AIAirport"); SQAIAirport.PreRegister(engine); SQAIAirport.AddConstructor<void (AIAirport::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_base.hpp.sq b/src/ai/api/ai_base.hpp.sq index 0d0e013a8..2514b5f27 100644 --- a/src/ai/api/ai_base.hpp.sq +++ b/src/ai/api/ai_base.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIBase *>(HSQUIRRELVM vm, AIBase *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBase", res, NULL, DefSQDestructorCallback<AIBase>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIBase>() { return "AIBase"; } +template <> const char *GetClassName<AIBase, ST_AI>() { return "AIBase"; } void SQAIBase_Register(Squirrel *engine) { - DefSQClass <AIBase> SQAIBase("AIBase"); + DefSQClass<AIBase, ST_AI> SQAIBase("AIBase"); SQAIBase.PreRegister(engine); SQAIBase.AddConstructor<void (AIBase::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_basestation.hpp.sq b/src/ai/api/ai_basestation.hpp.sq index 20c3618ef..02c615ba4 100644 --- a/src/ai/api/ai_basestation.hpp.sq +++ b/src/ai/api/ai_basestation.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIBaseStation *>(HSQUIRRELVM vm, AIBaseStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBaseStation", res, NULL, DefSQDestructorCallback<AIBaseStation>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIBaseStation>() { return "AIBaseStation"; } +template <> const char *GetClassName<AIBaseStation, ST_AI>() { return "AIBaseStation"; } void SQAIBaseStation_Register(Squirrel *engine) { - DefSQClass <AIBaseStation> SQAIBaseStation("AIBaseStation"); + DefSQClass<AIBaseStation, ST_AI> SQAIBaseStation("AIBaseStation"); SQAIBaseStation.PreRegister(engine); SQAIBaseStation.AddConstructor<void (AIBaseStation::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_bridge.hpp.sq b/src/ai/api/ai_bridge.hpp.sq index f21651dfa..aea4893d0 100644 --- a/src/ai/api/ai_bridge.hpp.sq +++ b/src/ai/api/ai_bridge.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIBridge *>(HSQUIRRELVM vm, AIBridge *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridge", res, NULL, DefSQDestructorCallback<AIBridge>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIBridge>() { return "AIBridge"; } +template <> const char *GetClassName<AIBridge, ST_AI>() { return "AIBridge"; } void SQAIBridge_Register(Squirrel *engine) { - DefSQClass <AIBridge> SQAIBridge("AIBridge"); + DefSQClass<AIBridge, ST_AI> SQAIBridge("AIBridge"); SQAIBridge.PreRegister(engine); SQAIBridge.AddConstructor<void (AIBridge::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_bridgelist.hpp.sq b/src/ai/api/ai_bridgelist.hpp.sq index 94e1013b5..1b86e832e 100644 --- a/src/ai/api/ai_bridgelist.hpp.sq +++ b/src/ai/api/ai_bridgelist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIBridgeList *>(HSQUIRRELVM vm, AIBridgeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridgeList", res, NULL, DefSQDestructorCallback<AIBridgeList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIBridgeList>() { return "AIBridgeList"; } +template <> const char *GetClassName<AIBridgeList, ST_AI>() { return "AIBridgeList"; } void SQAIBridgeList_Register(Squirrel *engine) { - DefSQClass <AIBridgeList> SQAIBridgeList("AIBridgeList"); + DefSQClass<AIBridgeList, ST_AI> SQAIBridgeList("AIBridgeList"); SQAIBridgeList.PreRegister(engine, "AIList"); SQAIBridgeList.AddConstructor<void (AIBridgeList::*)(), 1>(engine, "x"); @@ -40,11 +40,11 @@ namespace SQConvert { template <> inline int Return<AIBridgeList_Length *>(HSQUIRRELVM vm, AIBridgeList_Length *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIBridgeList_Length", res, NULL, DefSQDestructorCallback<AIBridgeList_Length>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIBridgeList_Length>() { return "AIBridgeList_Length"; } +template <> const char *GetClassName<AIBridgeList_Length, ST_AI>() { return "AIBridgeList_Length"; } void SQAIBridgeList_Length_Register(Squirrel *engine) { - DefSQClass <AIBridgeList_Length> SQAIBridgeList_Length("AIBridgeList_Length"); + DefSQClass<AIBridgeList_Length, ST_AI> SQAIBridgeList_Length("AIBridgeList_Length"); SQAIBridgeList_Length.PreRegister(engine, "AIList"); SQAIBridgeList_Length.AddConstructor<void (AIBridgeList_Length::*)(uint length), 2>(engine, "xi"); diff --git a/src/ai/api/ai_cargo.hpp.sq b/src/ai/api/ai_cargo.hpp.sq index a39e3b114..b0c83f497 100644 --- a/src/ai/api/ai_cargo.hpp.sq +++ b/src/ai/api/ai_cargo.hpp.sq @@ -28,11 +28,11 @@ namespace SQConvert { template <> inline int Return<AICargo *>(HSQUIRRELVM vm, AICargo *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargo", res, NULL, DefSQDestructorCallback<AICargo>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AICargo>() { return "AICargo"; } +template <> const char *GetClassName<AICargo, ST_AI>() { return "AICargo"; } void SQAICargo_Register(Squirrel *engine) { - DefSQClass <AICargo> SQAICargo("AICargo"); + DefSQClass<AICargo, ST_AI> SQAICargo("AICargo"); SQAICargo.PreRegister(engine); SQAICargo.AddConstructor<void (AICargo::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_cargolist.hpp.sq b/src/ai/api/ai_cargolist.hpp.sq index 0d8edb626..e757dcdd1 100644 --- a/src/ai/api/ai_cargolist.hpp.sq +++ b/src/ai/api/ai_cargolist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AICargoList *>(HSQUIRRELVM vm, AICargoList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList", res, NULL, DefSQDestructorCallback<AICargoList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AICargoList>() { return "AICargoList"; } +template <> const char *GetClassName<AICargoList, ST_AI>() { return "AICargoList"; } void SQAICargoList_Register(Squirrel *engine) { - DefSQClass <AICargoList> SQAICargoList("AICargoList"); + DefSQClass<AICargoList, ST_AI> SQAICargoList("AICargoList"); SQAICargoList.PreRegister(engine, "AIList"); SQAICargoList.AddConstructor<void (AICargoList::*)(), 1>(engine, "x"); @@ -40,11 +40,11 @@ namespace SQConvert { template <> inline int Return<AICargoList_IndustryAccepting *>(HSQUIRRELVM vm, AICargoList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AICargoList_IndustryAccepting>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AICargoList_IndustryAccepting>() { return "AICargoList_IndustryAccepting"; } +template <> const char *GetClassName<AICargoList_IndustryAccepting, ST_AI>() { return "AICargoList_IndustryAccepting"; } void SQAICargoList_IndustryAccepting_Register(Squirrel *engine) { - DefSQClass <AICargoList_IndustryAccepting> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting"); + DefSQClass<AICargoList_IndustryAccepting, ST_AI> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting"); SQAICargoList_IndustryAccepting.PreRegister(engine, "AIList"); SQAICargoList_IndustryAccepting.AddConstructor<void (AICargoList_IndustryAccepting::*)(IndustryID industry_id), 2>(engine, "xi"); @@ -60,11 +60,11 @@ namespace SQConvert { template <> inline int Return<AICargoList_IndustryProducing *>(HSQUIRRELVM vm, AICargoList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_IndustryProducing", res, NULL, DefSQDestructorCallback<AICargoList_IndustryProducing>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AICargoList_IndustryProducing>() { return "AICargoList_IndustryProducing"; } +template <> const char *GetClassName<AICargoList_IndustryProducing, ST_AI>() { return "AICargoList_IndustryProducing"; } void SQAICargoList_IndustryProducing_Register(Squirrel *engine) { - DefSQClass <AICargoList_IndustryProducing> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing"); + DefSQClass<AICargoList_IndustryProducing, ST_AI> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing"); SQAICargoList_IndustryProducing.PreRegister(engine, "AIList"); SQAICargoList_IndustryProducing.AddConstructor<void (AICargoList_IndustryProducing::*)(IndustryID industry_id), 2>(engine, "xi"); @@ -80,11 +80,11 @@ namespace SQConvert { template <> inline int Return<AICargoList_StationAccepting *>(HSQUIRRELVM vm, AICargoList_StationAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICargoList_StationAccepting", res, NULL, DefSQDestructorCallback<AICargoList_StationAccepting>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AICargoList_StationAccepting>() { return "AICargoList_StationAccepting"; } +template <> const char *GetClassName<AICargoList_StationAccepting, ST_AI>() { return "AICargoList_StationAccepting"; } void SQAICargoList_StationAccepting_Register(Squirrel *engine) { - DefSQClass <AICargoList_StationAccepting> SQAICargoList_StationAccepting("AICargoList_StationAccepting"); + DefSQClass<AICargoList_StationAccepting, ST_AI> SQAICargoList_StationAccepting("AICargoList_StationAccepting"); SQAICargoList_StationAccepting.PreRegister(engine, "AIList"); SQAICargoList_StationAccepting.AddConstructor<void (AICargoList_StationAccepting::*)(StationID station_id), 2>(engine, "xi"); diff --git a/src/ai/api/ai_company.hpp.sq b/src/ai/api/ai_company.hpp.sq index d317dbc19..8dcc137f3 100644 --- a/src/ai/api/ai_company.hpp.sq +++ b/src/ai/api/ai_company.hpp.sq @@ -28,11 +28,11 @@ namespace SQConvert { template <> inline int Return<AICompany *>(HSQUIRRELVM vm, AICompany *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AICompany", res, NULL, DefSQDestructorCallback<AICompany>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AICompany>() { return "AICompany"; } +template <> const char *GetClassName<AICompany, ST_AI>() { return "AICompany"; } void SQAICompany_Register(Squirrel *engine) { - DefSQClass <AICompany> SQAICompany("AICompany"); + DefSQClass<AICompany, ST_AI> SQAICompany("AICompany"); SQAICompany.PreRegister(engine); SQAICompany.AddConstructor<void (AICompany::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_controller.hpp.sq b/src/ai/api/ai_controller.hpp.sq index 26b627c7b..f66c23481 100644 --- a/src/ai/api/ai_controller.hpp.sq +++ b/src/ai/api/ai_controller.hpp.sq @@ -9,11 +9,11 @@ #include "ai_controller.hpp" -template <> const char *GetClassName<AIController>() { return "AIController"; } +template <> const char *GetClassName<AIController, ST_AI>() { return "AIController"; } void SQAIController_Register(Squirrel *engine) { - DefSQClass <AIController> SQAIController("AIController"); + DefSQClass<AIController, ST_AI> SQAIController("AIController"); SQAIController.PreRegister(engine); SQAIController.DefSQStaticMethod(engine, &AIController::GetTick, "GetTick", 1, "."); diff --git a/src/ai/api/ai_date.hpp.sq b/src/ai/api/ai_date.hpp.sq index a37ab5486..4c7dfedad 100644 --- a/src/ai/api/ai_date.hpp.sq +++ b/src/ai/api/ai_date.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIDate *>(HSQUIRRELVM vm, AIDate *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDate", res, NULL, DefSQDestructorCallback<AIDate>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIDate>() { return "AIDate"; } +template <> const char *GetClassName<AIDate, ST_AI>() { return "AIDate"; } void SQAIDate_Register(Squirrel *engine) { - DefSQClass <AIDate> SQAIDate("AIDate"); + DefSQClass<AIDate, ST_AI> SQAIDate("AIDate"); SQAIDate.PreRegister(engine); SQAIDate.AddConstructor<void (AIDate::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_depotlist.hpp.sq b/src/ai/api/ai_depotlist.hpp.sq index 8f3ed40f3..a61eab12a 100644 --- a/src/ai/api/ai_depotlist.hpp.sq +++ b/src/ai/api/ai_depotlist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIDepotList *>(HSQUIRRELVM vm, AIDepotList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDepotList", res, NULL, DefSQDestructorCallback<AIDepotList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIDepotList>() { return "AIDepotList"; } +template <> const char *GetClassName<AIDepotList, ST_AI>() { return "AIDepotList"; } void SQAIDepotList_Register(Squirrel *engine) { - DefSQClass <AIDepotList> SQAIDepotList("AIDepotList"); + DefSQClass<AIDepotList, ST_AI> SQAIDepotList("AIDepotList"); SQAIDepotList.PreRegister(engine, "AIList"); SQAIDepotList.AddConstructor<void (AIDepotList::*)(AITile::TransportType transport_type), 2>(engine, "xi"); diff --git a/src/ai/api/ai_engine.hpp.sq b/src/ai/api/ai_engine.hpp.sq index accb9cba2..f56bb6658 100644 --- a/src/ai/api/ai_engine.hpp.sq +++ b/src/ai/api/ai_engine.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIEngine *>(HSQUIRRELVM vm, AIEngine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngine", res, NULL, DefSQDestructorCallback<AIEngine>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEngine>() { return "AIEngine"; } +template <> const char *GetClassName<AIEngine, ST_AI>() { return "AIEngine"; } void SQAIEngine_Register(Squirrel *engine) { - DefSQClass <AIEngine> SQAIEngine("AIEngine"); + DefSQClass<AIEngine, ST_AI> SQAIEngine("AIEngine"); SQAIEngine.PreRegister(engine); SQAIEngine.AddConstructor<void (AIEngine::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_enginelist.hpp.sq b/src/ai/api/ai_enginelist.hpp.sq index be64ca965..c7477b591 100644 --- a/src/ai/api/ai_enginelist.hpp.sq +++ b/src/ai/api/ai_enginelist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIEngineList *>(HSQUIRRELVM vm, AIEngineList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEngineList", res, NULL, DefSQDestructorCallback<AIEngineList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEngineList>() { return "AIEngineList"; } +template <> const char *GetClassName<AIEngineList, ST_AI>() { return "AIEngineList"; } void SQAIEngineList_Register(Squirrel *engine) { - DefSQClass <AIEngineList> SQAIEngineList("AIEngineList"); + DefSQClass<AIEngineList, ST_AI> SQAIEngineList("AIEngineList"); SQAIEngineList.PreRegister(engine, "AIList"); SQAIEngineList.AddConstructor<void (AIEngineList::*)(AIVehicle::VehicleType vehicle_type), 2>(engine, "xi"); diff --git a/src/ai/api/ai_error.hpp.sq b/src/ai/api/ai_error.hpp.sq index be23fcf53..a9bd00fe5 100644 --- a/src/ai/api/ai_error.hpp.sq +++ b/src/ai/api/ai_error.hpp.sq @@ -26,11 +26,11 @@ namespace SQConvert { template <> inline int Return<AIError *>(HSQUIRRELVM vm, AIError *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIError", res, NULL, DefSQDestructorCallback<AIError>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIError>() { return "AIError"; } +template <> const char *GetClassName<AIError, ST_AI>() { return "AIError"; } void SQAIError_Register(Squirrel *engine) { - DefSQClass <AIError> SQAIError("AIError"); + DefSQClass<AIError, ST_AI> SQAIError("AIError"); SQAIError.PreRegister(engine); SQAIError.AddConstructor<void (AIError::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_event.hpp.sq b/src/ai/api/ai_event.hpp.sq index 4f54ca63e..3554e4d06 100644 --- a/src/ai/api/ai_event.hpp.sq +++ b/src/ai/api/ai_event.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIEvent *>(HSQUIRRELVM vm, AIEvent *res) { if (res == NULL) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, "AIEvent", res, NULL, DefSQDestructorCallback<AIEvent>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEvent>() { return "AIEvent"; } +template <> const char *GetClassName<AIEvent, ST_AI>() { return "AIEvent"; } void SQAIEvent_Register(Squirrel *engine) { - DefSQClass <AIEvent> SQAIEvent("AIEvent"); + DefSQClass<AIEvent, ST_AI> SQAIEvent("AIEvent"); SQAIEvent.PreRegister(engine); SQAIEvent.AddConstructor<void (AIEvent::*)(AIEvent::AIEventType type), 2>(engine, "xi"); @@ -70,11 +70,11 @@ namespace SQConvert { template <> inline int Return<AIEventController *>(HSQUIRRELVM vm, AIEventController *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventController", res, NULL, DefSQDestructorCallback<AIEventController>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventController>() { return "AIEventController"; } +template <> const char *GetClassName<AIEventController, ST_AI>() { return "AIEventController"; } void SQAIEventController_Register(Squirrel *engine) { - DefSQClass <AIEventController> SQAIEventController("AIEventController"); + DefSQClass<AIEventController, ST_AI> SQAIEventController("AIEventController"); SQAIEventController.PreRegister(engine); SQAIEventController.AddConstructor<void (AIEventController::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_event_types.hpp.sq b/src/ai/api/ai_event_types.hpp.sq index 9b8eda4b0..63588ec77 100644 --- a/src/ai/api/ai_event_types.hpp.sq +++ b/src/ai/api/ai_event_types.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIEventVehicleCrashed *>(HSQUIRRELVM vm, AIEventVehicleCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleCrashed", res, NULL, DefSQDestructorCallback<AIEventVehicleCrashed>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventVehicleCrashed>() { return "AIEventVehicleCrashed"; } +template <> const char *GetClassName<AIEventVehicleCrashed, ST_AI>() { return "AIEventVehicleCrashed"; } void SQAIEventVehicleCrashed_Register(Squirrel *engine) { - DefSQClass <AIEventVehicleCrashed> SQAIEventVehicleCrashed("AIEventVehicleCrashed"); + DefSQClass<AIEventVehicleCrashed, ST_AI> SQAIEventVehicleCrashed("AIEventVehicleCrashed"); SQAIEventVehicleCrashed.PreRegister(engine, "AIEvent"); SQAIEventVehicleCrashed.DefSQConst(engine, AIEventVehicleCrashed::CRASH_TRAIN, "CRASH_TRAIN"); @@ -56,11 +56,11 @@ namespace SQConvert { template <> inline int Return<AIEventSubsidyOffer *>(HSQUIRRELVM vm, AIEventSubsidyOffer *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyOffer", res, NULL, DefSQDestructorCallback<AIEventSubsidyOffer>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventSubsidyOffer>() { return "AIEventSubsidyOffer"; } +template <> const char *GetClassName<AIEventSubsidyOffer, ST_AI>() { return "AIEventSubsidyOffer"; } void SQAIEventSubsidyOffer_Register(Squirrel *engine) { - DefSQClass <AIEventSubsidyOffer> SQAIEventSubsidyOffer("AIEventSubsidyOffer"); + DefSQClass<AIEventSubsidyOffer, ST_AI> SQAIEventSubsidyOffer("AIEventSubsidyOffer"); SQAIEventSubsidyOffer.PreRegister(engine, "AIEvent"); SQAIEventSubsidyOffer.DefSQStaticMethod(engine, &AIEventSubsidyOffer::Convert, "Convert", 2, ".x"); @@ -79,11 +79,11 @@ namespace SQConvert { template <> inline int Return<AIEventSubsidyOfferExpired *>(HSQUIRRELVM vm, AIEventSubsidyOfferExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyOfferExpired", res, NULL, DefSQDestructorCallback<AIEventSubsidyOfferExpired>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventSubsidyOfferExpired>() { return "AIEventSubsidyOfferExpired"; } +template <> const char *GetClassName<AIEventSubsidyOfferExpired, ST_AI>() { return "AIEventSubsidyOfferExpired"; } void SQAIEventSubsidyOfferExpired_Register(Squirrel *engine) { - DefSQClass <AIEventSubsidyOfferExpired> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired"); + DefSQClass<AIEventSubsidyOfferExpired, ST_AI> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired"); SQAIEventSubsidyOfferExpired.PreRegister(engine, "AIEvent"); SQAIEventSubsidyOfferExpired.DefSQStaticMethod(engine, &AIEventSubsidyOfferExpired::Convert, "Convert", 2, ".x"); @@ -102,11 +102,11 @@ namespace SQConvert { template <> inline int Return<AIEventSubsidyAwarded *>(HSQUIRRELVM vm, AIEventSubsidyAwarded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyAwarded", res, NULL, DefSQDestructorCallback<AIEventSubsidyAwarded>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventSubsidyAwarded>() { return "AIEventSubsidyAwarded"; } +template <> const char *GetClassName<AIEventSubsidyAwarded, ST_AI>() { return "AIEventSubsidyAwarded"; } void SQAIEventSubsidyAwarded_Register(Squirrel *engine) { - DefSQClass <AIEventSubsidyAwarded> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded"); + DefSQClass<AIEventSubsidyAwarded, ST_AI> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded"); SQAIEventSubsidyAwarded.PreRegister(engine, "AIEvent"); SQAIEventSubsidyAwarded.DefSQStaticMethod(engine, &AIEventSubsidyAwarded::Convert, "Convert", 2, ".x"); @@ -125,11 +125,11 @@ namespace SQConvert { template <> inline int Return<AIEventSubsidyExpired *>(HSQUIRRELVM vm, AIEventSubsidyExpired *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventSubsidyExpired", res, NULL, DefSQDestructorCallback<AIEventSubsidyExpired>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventSubsidyExpired>() { return "AIEventSubsidyExpired"; } +template <> const char *GetClassName<AIEventSubsidyExpired, ST_AI>() { return "AIEventSubsidyExpired"; } void SQAIEventSubsidyExpired_Register(Squirrel *engine) { - DefSQClass <AIEventSubsidyExpired> SQAIEventSubsidyExpired("AIEventSubsidyExpired"); + DefSQClass<AIEventSubsidyExpired, ST_AI> SQAIEventSubsidyExpired("AIEventSubsidyExpired"); SQAIEventSubsidyExpired.PreRegister(engine, "AIEvent"); SQAIEventSubsidyExpired.DefSQStaticMethod(engine, &AIEventSubsidyExpired::Convert, "Convert", 2, ".x"); @@ -148,11 +148,11 @@ namespace SQConvert { template <> inline int Return<AIEventEnginePreview *>(HSQUIRRELVM vm, AIEventEnginePreview *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventEnginePreview", res, NULL, DefSQDestructorCallback<AIEventEnginePreview>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventEnginePreview>() { return "AIEventEnginePreview"; } +template <> const char *GetClassName<AIEventEnginePreview, ST_AI>() { return "AIEventEnginePreview"; } void SQAIEventEnginePreview_Register(Squirrel *engine) { - DefSQClass <AIEventEnginePreview> SQAIEventEnginePreview("AIEventEnginePreview"); + DefSQClass<AIEventEnginePreview, ST_AI> SQAIEventEnginePreview("AIEventEnginePreview"); SQAIEventEnginePreview.PreRegister(engine, "AIEvent"); SQAIEventEnginePreview.DefSQStaticMethod(engine, &AIEventEnginePreview::Convert, "Convert", 2, ".x"); @@ -178,11 +178,11 @@ namespace SQConvert { template <> inline int Return<AIEventCompanyNew *>(HSQUIRRELVM vm, AIEventCompanyNew *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyNew", res, NULL, DefSQDestructorCallback<AIEventCompanyNew>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventCompanyNew>() { return "AIEventCompanyNew"; } +template <> const char *GetClassName<AIEventCompanyNew, ST_AI>() { return "AIEventCompanyNew"; } void SQAIEventCompanyNew_Register(Squirrel *engine) { - DefSQClass <AIEventCompanyNew> SQAIEventCompanyNew("AIEventCompanyNew"); + DefSQClass<AIEventCompanyNew, ST_AI> SQAIEventCompanyNew("AIEventCompanyNew"); SQAIEventCompanyNew.PreRegister(engine, "AIEvent"); SQAIEventCompanyNew.DefSQStaticMethod(engine, &AIEventCompanyNew::Convert, "Convert", 2, ".x"); @@ -201,11 +201,11 @@ namespace SQConvert { template <> inline int Return<AIEventCompanyInTrouble *>(HSQUIRRELVM vm, AIEventCompanyInTrouble *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyInTrouble", res, NULL, DefSQDestructorCallback<AIEventCompanyInTrouble>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventCompanyInTrouble>() { return "AIEventCompanyInTrouble"; } +template <> const char *GetClassName<AIEventCompanyInTrouble, ST_AI>() { return "AIEventCompanyInTrouble"; } void SQAIEventCompanyInTrouble_Register(Squirrel *engine) { - DefSQClass <AIEventCompanyInTrouble> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble"); + DefSQClass<AIEventCompanyInTrouble, ST_AI> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble"); SQAIEventCompanyInTrouble.PreRegister(engine, "AIEvent"); SQAIEventCompanyInTrouble.DefSQStaticMethod(engine, &AIEventCompanyInTrouble::Convert, "Convert", 2, ".x"); @@ -224,11 +224,11 @@ namespace SQConvert { template <> inline int Return<AIEventCompanyAskMerger *>(HSQUIRRELVM vm, AIEventCompanyAskMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyAskMerger", res, NULL, DefSQDestructorCallback<AIEventCompanyAskMerger>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventCompanyAskMerger>() { return "AIEventCompanyAskMerger"; } +template <> const char *GetClassName<AIEventCompanyAskMerger, ST_AI>() { return "AIEventCompanyAskMerger"; } void SQAIEventCompanyAskMerger_Register(Squirrel *engine) { - DefSQClass <AIEventCompanyAskMerger> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger"); + DefSQClass<AIEventCompanyAskMerger, ST_AI> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger"); SQAIEventCompanyAskMerger.PreRegister(engine, "AIEvent"); SQAIEventCompanyAskMerger.DefSQStaticMethod(engine, &AIEventCompanyAskMerger::Convert, "Convert", 2, ".x"); @@ -249,11 +249,11 @@ namespace SQConvert { template <> inline int Return<AIEventCompanyMerger *>(HSQUIRRELVM vm, AIEventCompanyMerger *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyMerger", res, NULL, DefSQDestructorCallback<AIEventCompanyMerger>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventCompanyMerger>() { return "AIEventCompanyMerger"; } +template <> const char *GetClassName<AIEventCompanyMerger, ST_AI>() { return "AIEventCompanyMerger"; } void SQAIEventCompanyMerger_Register(Squirrel *engine) { - DefSQClass <AIEventCompanyMerger> SQAIEventCompanyMerger("AIEventCompanyMerger"); + DefSQClass<AIEventCompanyMerger, ST_AI> SQAIEventCompanyMerger("AIEventCompanyMerger"); SQAIEventCompanyMerger.PreRegister(engine, "AIEvent"); SQAIEventCompanyMerger.DefSQStaticMethod(engine, &AIEventCompanyMerger::Convert, "Convert", 2, ".x"); @@ -273,11 +273,11 @@ namespace SQConvert { template <> inline int Return<AIEventCompanyBankrupt *>(HSQUIRRELVM vm, AIEventCompanyBankrupt *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventCompanyBankrupt", res, NULL, DefSQDestructorCallback<AIEventCompanyBankrupt>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventCompanyBankrupt>() { return "AIEventCompanyBankrupt"; } +template <> const char *GetClassName<AIEventCompanyBankrupt, ST_AI>() { return "AIEventCompanyBankrupt"; } void SQAIEventCompanyBankrupt_Register(Squirrel *engine) { - DefSQClass <AIEventCompanyBankrupt> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt"); + DefSQClass<AIEventCompanyBankrupt, ST_AI> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt"); SQAIEventCompanyBankrupt.PreRegister(engine, "AIEvent"); SQAIEventCompanyBankrupt.DefSQStaticMethod(engine, &AIEventCompanyBankrupt::Convert, "Convert", 2, ".x"); @@ -296,11 +296,11 @@ namespace SQConvert { template <> inline int Return<AIEventVehicleLost *>(HSQUIRRELVM vm, AIEventVehicleLost *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleLost", res, NULL, DefSQDestructorCallback<AIEventVehicleLost>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventVehicleLost>() { return "AIEventVehicleLost"; } +template <> const char *GetClassName<AIEventVehicleLost, ST_AI>() { return "AIEventVehicleLost"; } void SQAIEventVehicleLost_Register(Squirrel *engine) { - DefSQClass <AIEventVehicleLost> SQAIEventVehicleLost("AIEventVehicleLost"); + DefSQClass<AIEventVehicleLost, ST_AI> SQAIEventVehicleLost("AIEventVehicleLost"); SQAIEventVehicleLost.PreRegister(engine, "AIEvent"); SQAIEventVehicleLost.DefSQStaticMethod(engine, &AIEventVehicleLost::Convert, "Convert", 2, ".x"); @@ -319,11 +319,11 @@ namespace SQConvert { template <> inline int Return<AIEventVehicleWaitingInDepot *>(HSQUIRRELVM vm, AIEventVehicleWaitingInDepot *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleWaitingInDepot", res, NULL, DefSQDestructorCallback<AIEventVehicleWaitingInDepot>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventVehicleWaitingInDepot>() { return "AIEventVehicleWaitingInDepot"; } +template <> const char *GetClassName<AIEventVehicleWaitingInDepot, ST_AI>() { return "AIEventVehicleWaitingInDepot"; } void SQAIEventVehicleWaitingInDepot_Register(Squirrel *engine) { - DefSQClass <AIEventVehicleWaitingInDepot> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot"); + DefSQClass<AIEventVehicleWaitingInDepot, ST_AI> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot"); SQAIEventVehicleWaitingInDepot.PreRegister(engine, "AIEvent"); SQAIEventVehicleWaitingInDepot.DefSQStaticMethod(engine, &AIEventVehicleWaitingInDepot::Convert, "Convert", 2, ".x"); @@ -342,11 +342,11 @@ namespace SQConvert { template <> inline int Return<AIEventVehicleUnprofitable *>(HSQUIRRELVM vm, AIEventVehicleUnprofitable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventVehicleUnprofitable", res, NULL, DefSQDestructorCallback<AIEventVehicleUnprofitable>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventVehicleUnprofitable>() { return "AIEventVehicleUnprofitable"; } +template <> const char *GetClassName<AIEventVehicleUnprofitable, ST_AI>() { return "AIEventVehicleUnprofitable"; } void SQAIEventVehicleUnprofitable_Register(Squirrel *engine) { - DefSQClass <AIEventVehicleUnprofitable> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable"); + DefSQClass<AIEventVehicleUnprofitable, ST_AI> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable"); SQAIEventVehicleUnprofitable.PreRegister(engine, "AIEvent"); SQAIEventVehicleUnprofitable.DefSQStaticMethod(engine, &AIEventVehicleUnprofitable::Convert, "Convert", 2, ".x"); @@ -365,11 +365,11 @@ namespace SQConvert { template <> inline int Return<AIEventIndustryOpen *>(HSQUIRRELVM vm, AIEventIndustryOpen *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventIndustryOpen", res, NULL, DefSQDestructorCallback<AIEventIndustryOpen>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventIndustryOpen>() { return "AIEventIndustryOpen"; } +template <> const char *GetClassName<AIEventIndustryOpen, ST_AI>() { return "AIEventIndustryOpen"; } void SQAIEventIndustryOpen_Register(Squirrel *engine) { - DefSQClass <AIEventIndustryOpen> SQAIEventIndustryOpen("AIEventIndustryOpen"); + DefSQClass<AIEventIndustryOpen, ST_AI> SQAIEventIndustryOpen("AIEventIndustryOpen"); SQAIEventIndustryOpen.PreRegister(engine, "AIEvent"); SQAIEventIndustryOpen.DefSQStaticMethod(engine, &AIEventIndustryOpen::Convert, "Convert", 2, ".x"); @@ -388,11 +388,11 @@ namespace SQConvert { template <> inline int Return<AIEventIndustryClose *>(HSQUIRRELVM vm, AIEventIndustryClose *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventIndustryClose", res, NULL, DefSQDestructorCallback<AIEventIndustryClose>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventIndustryClose>() { return "AIEventIndustryClose"; } +template <> const char *GetClassName<AIEventIndustryClose, ST_AI>() { return "AIEventIndustryClose"; } void SQAIEventIndustryClose_Register(Squirrel *engine) { - DefSQClass <AIEventIndustryClose> SQAIEventIndustryClose("AIEventIndustryClose"); + DefSQClass<AIEventIndustryClose, ST_AI> SQAIEventIndustryClose("AIEventIndustryClose"); SQAIEventIndustryClose.PreRegister(engine, "AIEvent"); SQAIEventIndustryClose.DefSQStaticMethod(engine, &AIEventIndustryClose::Convert, "Convert", 2, ".x"); @@ -411,11 +411,11 @@ namespace SQConvert { template <> inline int Return<AIEventEngineAvailable *>(HSQUIRRELVM vm, AIEventEngineAvailable *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventEngineAvailable", res, NULL, DefSQDestructorCallback<AIEventEngineAvailable>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventEngineAvailable>() { return "AIEventEngineAvailable"; } +template <> const char *GetClassName<AIEventEngineAvailable, ST_AI>() { return "AIEventEngineAvailable"; } void SQAIEventEngineAvailable_Register(Squirrel *engine) { - DefSQClass <AIEventEngineAvailable> SQAIEventEngineAvailable("AIEventEngineAvailable"); + DefSQClass<AIEventEngineAvailable, ST_AI> SQAIEventEngineAvailable("AIEventEngineAvailable"); SQAIEventEngineAvailable.PreRegister(engine, "AIEvent"); SQAIEventEngineAvailable.DefSQStaticMethod(engine, &AIEventEngineAvailable::Convert, "Convert", 2, ".x"); @@ -434,11 +434,11 @@ namespace SQConvert { template <> inline int Return<AIEventStationFirstVehicle *>(HSQUIRRELVM vm, AIEventStationFirstVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventStationFirstVehicle", res, NULL, DefSQDestructorCallback<AIEventStationFirstVehicle>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventStationFirstVehicle>() { return "AIEventStationFirstVehicle"; } +template <> const char *GetClassName<AIEventStationFirstVehicle, ST_AI>() { return "AIEventStationFirstVehicle"; } void SQAIEventStationFirstVehicle_Register(Squirrel *engine) { - DefSQClass <AIEventStationFirstVehicle> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle"); + DefSQClass<AIEventStationFirstVehicle, ST_AI> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle"); SQAIEventStationFirstVehicle.PreRegister(engine, "AIEvent"); SQAIEventStationFirstVehicle.DefSQStaticMethod(engine, &AIEventStationFirstVehicle::Convert, "Convert", 2, ".x"); @@ -458,11 +458,11 @@ namespace SQConvert { template <> inline int Return<AIEventDisasterZeppelinerCrashed *>(HSQUIRRELVM vm, AIEventDisasterZeppelinerCrashed *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventDisasterZeppelinerCrashed", res, NULL, DefSQDestructorCallback<AIEventDisasterZeppelinerCrashed>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventDisasterZeppelinerCrashed>() { return "AIEventDisasterZeppelinerCrashed"; } +template <> const char *GetClassName<AIEventDisasterZeppelinerCrashed, ST_AI>() { return "AIEventDisasterZeppelinerCrashed"; } void SQAIEventDisasterZeppelinerCrashed_Register(Squirrel *engine) { - DefSQClass <AIEventDisasterZeppelinerCrashed> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed"); + DefSQClass<AIEventDisasterZeppelinerCrashed, ST_AI> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed"); SQAIEventDisasterZeppelinerCrashed.PreRegister(engine, "AIEvent"); SQAIEventDisasterZeppelinerCrashed.DefSQStaticMethod(engine, &AIEventDisasterZeppelinerCrashed::Convert, "Convert", 2, ".x"); @@ -481,11 +481,11 @@ namespace SQConvert { template <> inline int Return<AIEventDisasterZeppelinerCleared *>(HSQUIRRELVM vm, AIEventDisasterZeppelinerCleared *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventDisasterZeppelinerCleared", res, NULL, DefSQDestructorCallback<AIEventDisasterZeppelinerCleared>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventDisasterZeppelinerCleared>() { return "AIEventDisasterZeppelinerCleared"; } +template <> const char *GetClassName<AIEventDisasterZeppelinerCleared, ST_AI>() { return "AIEventDisasterZeppelinerCleared"; } void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine) { - DefSQClass <AIEventDisasterZeppelinerCleared> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared"); + DefSQClass<AIEventDisasterZeppelinerCleared, ST_AI> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared"); SQAIEventDisasterZeppelinerCleared.PreRegister(engine, "AIEvent"); SQAIEventDisasterZeppelinerCleared.DefSQStaticMethod(engine, &AIEventDisasterZeppelinerCleared::Convert, "Convert", 2, ".x"); @@ -504,11 +504,11 @@ namespace SQConvert { template <> inline int Return<AIEventTownFounded *>(HSQUIRRELVM vm, AIEventTownFounded *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIEventTownFounded", res, NULL, DefSQDestructorCallback<AIEventTownFounded>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIEventTownFounded>() { return "AIEventTownFounded"; } +template <> const char *GetClassName<AIEventTownFounded, ST_AI>() { return "AIEventTownFounded"; } void SQAIEventTownFounded_Register(Squirrel *engine) { - DefSQClass <AIEventTownFounded> SQAIEventTownFounded("AIEventTownFounded"); + DefSQClass<AIEventTownFounded, ST_AI> SQAIEventTownFounded("AIEventTownFounded"); SQAIEventTownFounded.PreRegister(engine, "AIEvent"); SQAIEventTownFounded.DefSQStaticMethod(engine, &AIEventTownFounded::Convert, "Convert", 2, ".x"); diff --git a/src/ai/api/ai_execmode.hpp.sq b/src/ai/api/ai_execmode.hpp.sq index 32f03210e..26ef77ade 100644 --- a/src/ai/api/ai_execmode.hpp.sq +++ b/src/ai/api/ai_execmode.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIExecMode *>(HSQUIRRELVM vm, AIExecMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIExecMode", res, NULL, DefSQDestructorCallback<AIExecMode>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIExecMode>() { return "AIExecMode"; } +template <> const char *GetClassName<AIExecMode, ST_AI>() { return "AIExecMode"; } void SQAIExecMode_Register(Squirrel *engine) { - DefSQClass <AIExecMode> SQAIExecMode("AIExecMode"); + DefSQClass<AIExecMode, ST_AI> SQAIExecMode("AIExecMode"); SQAIExecMode.PreRegister(engine); SQAIExecMode.AddConstructor<void (AIExecMode::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_gamesettings.hpp.sq b/src/ai/api/ai_gamesettings.hpp.sq index 22418c41a..dc075bcf4 100644 --- a/src/ai/api/ai_gamesettings.hpp.sq +++ b/src/ai/api/ai_gamesettings.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIGameSettings *>(HSQUIRRELVM vm, AIGameSettings *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGameSettings", res, NULL, DefSQDestructorCallback<AIGameSettings>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIGameSettings>() { return "AIGameSettings"; } +template <> const char *GetClassName<AIGameSettings, ST_AI>() { return "AIGameSettings"; } void SQAIGameSettings_Register(Squirrel *engine) { - DefSQClass <AIGameSettings> SQAIGameSettings("AIGameSettings"); + DefSQClass<AIGameSettings, ST_AI> SQAIGameSettings("AIGameSettings"); SQAIGameSettings.PreRegister(engine); SQAIGameSettings.AddConstructor<void (AIGameSettings::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_group.hpp.sq b/src/ai/api/ai_group.hpp.sq index 0e8944efe..85405b518 100644 --- a/src/ai/api/ai_group.hpp.sq +++ b/src/ai/api/ai_group.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIGroup *>(HSQUIRRELVM vm, AIGroup *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroup", res, NULL, DefSQDestructorCallback<AIGroup>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIGroup>() { return "AIGroup"; } +template <> const char *GetClassName<AIGroup, ST_AI>() { return "AIGroup"; } void SQAIGroup_Register(Squirrel *engine) { - DefSQClass <AIGroup> SQAIGroup("AIGroup"); + DefSQClass<AIGroup, ST_AI> SQAIGroup("AIGroup"); SQAIGroup.PreRegister(engine); SQAIGroup.AddConstructor<void (AIGroup::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_grouplist.hpp.sq b/src/ai/api/ai_grouplist.hpp.sq index 3c4862722..f691c8b50 100644 --- a/src/ai/api/ai_grouplist.hpp.sq +++ b/src/ai/api/ai_grouplist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline 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"; } +template <> const char *GetClassName<AIGroupList, ST_AI>() { return "AIGroupList"; } void SQAIGroupList_Register(Squirrel *engine) { - DefSQClass <AIGroupList> SQAIGroupList("AIGroupList"); + DefSQClass<AIGroupList, ST_AI> SQAIGroupList("AIGroupList"); SQAIGroupList.PreRegister(engine, "AIList"); SQAIGroupList.AddConstructor<void (AIGroupList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_industry.hpp.sq b/src/ai/api/ai_industry.hpp.sq index 61362dce2..c4a867371 100644 --- a/src/ai/api/ai_industry.hpp.sq +++ b/src/ai/api/ai_industry.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIIndustry *>(HSQUIRRELVM vm, AIIndustry *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustry", res, NULL, DefSQDestructorCallback<AIIndustry>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIIndustry>() { return "AIIndustry"; } +template <> const char *GetClassName<AIIndustry, ST_AI>() { return "AIIndustry"; } void SQAIIndustry_Register(Squirrel *engine) { - DefSQClass <AIIndustry> SQAIIndustry("AIIndustry"); + DefSQClass<AIIndustry, ST_AI> SQAIIndustry("AIIndustry"); SQAIIndustry.PreRegister(engine); SQAIIndustry.AddConstructor<void (AIIndustry::*)(), 1>(engine, "x"); 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"); diff --git a/src/ai/api/ai_industrytype.hpp.sq b/src/ai/api/ai_industrytype.hpp.sq index 83a94246f..7cfd13f20 100644 --- a/src/ai/api/ai_industrytype.hpp.sq +++ b/src/ai/api/ai_industrytype.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIIndustryType *>(HSQUIRRELVM vm, AIIndustryType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryType", res, NULL, DefSQDestructorCallback<AIIndustryType>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIIndustryType>() { return "AIIndustryType"; } +template <> const char *GetClassName<AIIndustryType, ST_AI>() { return "AIIndustryType"; } void SQAIIndustryType_Register(Squirrel *engine) { - DefSQClass <AIIndustryType> SQAIIndustryType("AIIndustryType"); + DefSQClass<AIIndustryType, ST_AI> SQAIIndustryType("AIIndustryType"); SQAIIndustryType.PreRegister(engine); SQAIIndustryType.AddConstructor<void (AIIndustryType::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_industrytypelist.hpp.sq b/src/ai/api/ai_industrytypelist.hpp.sq index a5355a6ce..dbeded04b 100644 --- a/src/ai/api/ai_industrytypelist.hpp.sq +++ b/src/ai/api/ai_industrytypelist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIIndustryTypeList *>(HSQUIRRELVM vm, AIIndustryTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIIndustryTypeList", res, NULL, DefSQDestructorCallback<AIIndustryTypeList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIIndustryTypeList>() { return "AIIndustryTypeList"; } +template <> const char *GetClassName<AIIndustryTypeList, ST_AI>() { return "AIIndustryTypeList"; } void SQAIIndustryTypeList_Register(Squirrel *engine) { - DefSQClass <AIIndustryTypeList> SQAIIndustryTypeList("AIIndustryTypeList"); + DefSQClass<AIIndustryTypeList, ST_AI> SQAIIndustryTypeList("AIIndustryTypeList"); SQAIIndustryTypeList.PreRegister(engine, "AIList"); SQAIIndustryTypeList.AddConstructor<void (AIIndustryTypeList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_list.hpp.sq b/src/ai/api/ai_list.hpp.sq index 53fe55a6b..9336e26c1 100644 --- a/src/ai/api/ai_list.hpp.sq +++ b/src/ai/api/ai_list.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AIList *>(HSQUIRRELVM vm, AIList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIList", res, NULL, DefSQDestructorCallback<AIList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIList>() { return "AIList"; } +template <> const char *GetClassName<AIList, ST_AI>() { return "AIList"; } void SQAIList_Register(Squirrel *engine) { - DefSQClass <AIList> SQAIList("AIList"); + DefSQClass<AIList, ST_AI> SQAIList("AIList"); SQAIList.PreRegister(engine); SQAIList.AddConstructor<void (AIList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_log.hpp.sq b/src/ai/api/ai_log.hpp.sq index 51d2cddc2..ca635267f 100644 --- a/src/ai/api/ai_log.hpp.sq +++ b/src/ai/api/ai_log.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AILog *>(HSQUIRRELVM vm, AILog *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AILog", res, NULL, DefSQDestructorCallback<AILog>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AILog>() { return "AILog"; } +template <> const char *GetClassName<AILog, ST_AI>() { return "AILog"; } void SQAILog_Register(Squirrel *engine) { - DefSQClass <AILog> SQAILog("AILog"); + DefSQClass<AILog, ST_AI> SQAILog("AILog"); SQAILog.PreRegister(engine); SQAILog.AddConstructor<void (AILog::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_map.hpp.sq b/src/ai/api/ai_map.hpp.sq index bbb1d7f5f..0a144e383 100644 --- a/src/ai/api/ai_map.hpp.sq +++ b/src/ai/api/ai_map.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIMap *>(HSQUIRRELVM vm, AIMap *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIMap", res, NULL, DefSQDestructorCallback<AIMap>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIMap>() { return "AIMap"; } +template <> const char *GetClassName<AIMap, ST_AI>() { return "AIMap"; } void SQAIMap_Register(Squirrel *engine) { - DefSQClass <AIMap> SQAIMap("AIMap"); + DefSQClass<AIMap, ST_AI> SQAIMap("AIMap"); SQAIMap.PreRegister(engine); SQAIMap.AddConstructor<void (AIMap::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_marine.hpp.sq b/src/ai/api/ai_marine.hpp.sq index 03d6c8284..f04cede8c 100644 --- a/src/ai/api/ai_marine.hpp.sq +++ b/src/ai/api/ai_marine.hpp.sq @@ -26,11 +26,11 @@ namespace SQConvert { template <> inline int Return<AIMarine *>(HSQUIRRELVM vm, AIMarine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIMarine", res, NULL, DefSQDestructorCallback<AIMarine>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIMarine>() { return "AIMarine"; } +template <> const char *GetClassName<AIMarine, ST_AI>() { return "AIMarine"; } void SQAIMarine_Register(Squirrel *engine) { - DefSQClass <AIMarine> SQAIMarine("AIMarine"); + DefSQClass<AIMarine, ST_AI> SQAIMarine("AIMarine"); SQAIMarine.PreRegister(engine); SQAIMarine.AddConstructor<void (AIMarine::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_order.hpp.sq b/src/ai/api/ai_order.hpp.sq index 00c494aff..7edb96355 100644 --- a/src/ai/api/ai_order.hpp.sq +++ b/src/ai/api/ai_order.hpp.sq @@ -34,11 +34,11 @@ namespace SQConvert { template <> inline int Return<AIOrder *>(HSQUIRRELVM vm, AIOrder *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIOrder", res, NULL, DefSQDestructorCallback<AIOrder>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIOrder>() { return "AIOrder"; } +template <> const char *GetClassName<AIOrder, ST_AI>() { return "AIOrder"; } void SQAIOrder_Register(Squirrel *engine) { - DefSQClass <AIOrder> SQAIOrder("AIOrder"); + DefSQClass<AIOrder, ST_AI> SQAIOrder("AIOrder"); SQAIOrder.PreRegister(engine); SQAIOrder.AddConstructor<void (AIOrder::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_rail.hpp.sq b/src/ai/api/ai_rail.hpp.sq index 1b1ea5a2d..70f2c444e 100644 --- a/src/ai/api/ai_rail.hpp.sq +++ b/src/ai/api/ai_rail.hpp.sq @@ -32,11 +32,11 @@ namespace SQConvert { template <> inline int Return<AIRail *>(HSQUIRRELVM vm, AIRail *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRail", res, NULL, DefSQDestructorCallback<AIRail>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIRail>() { return "AIRail"; } +template <> const char *GetClassName<AIRail, ST_AI>() { return "AIRail"; } void SQAIRail_Register(Squirrel *engine) { - DefSQClass <AIRail> SQAIRail("AIRail"); + DefSQClass<AIRail, ST_AI> SQAIRail("AIRail"); SQAIRail.PreRegister(engine); SQAIRail.AddConstructor<void (AIRail::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_railtypelist.hpp.sq b/src/ai/api/ai_railtypelist.hpp.sq index 9a7ac7684..435af5662 100644 --- a/src/ai/api/ai_railtypelist.hpp.sq +++ b/src/ai/api/ai_railtypelist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIRailTypeList *>(HSQUIRRELVM vm, AIRailTypeList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRailTypeList", res, NULL, DefSQDestructorCallback<AIRailTypeList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIRailTypeList>() { return "AIRailTypeList"; } +template <> const char *GetClassName<AIRailTypeList, ST_AI>() { return "AIRailTypeList"; } void SQAIRailTypeList_Register(Squirrel *engine) { - DefSQClass <AIRailTypeList> SQAIRailTypeList("AIRailTypeList"); + DefSQClass<AIRailTypeList, ST_AI> SQAIRailTypeList("AIRailTypeList"); SQAIRailTypeList.PreRegister(engine, "AIList"); SQAIRailTypeList.AddConstructor<void (AIRailTypeList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_road.hpp.sq b/src/ai/api/ai_road.hpp.sq index 7c73b37c6..400a3b40b 100644 --- a/src/ai/api/ai_road.hpp.sq +++ b/src/ai/api/ai_road.hpp.sq @@ -30,11 +30,11 @@ namespace SQConvert { template <> inline int Return<AIRoad *>(HSQUIRRELVM vm, AIRoad *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIRoad", res, NULL, DefSQDestructorCallback<AIRoad>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIRoad>() { return "AIRoad"; } +template <> const char *GetClassName<AIRoad, ST_AI>() { return "AIRoad"; } void SQAIRoad_Register(Squirrel *engine) { - DefSQClass <AIRoad> SQAIRoad("AIRoad"); + DefSQClass<AIRoad, ST_AI> SQAIRoad("AIRoad"); SQAIRoad.PreRegister(engine); SQAIRoad.AddConstructor<void (AIRoad::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_sign.hpp.sq b/src/ai/api/ai_sign.hpp.sq index fd9a25320..dabb955d3 100644 --- a/src/ai/api/ai_sign.hpp.sq +++ b/src/ai/api/ai_sign.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AISign *>(HSQUIRRELVM vm, AISign *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISign", res, NULL, DefSQDestructorCallback<AISign>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AISign>() { return "AISign"; } +template <> const char *GetClassName<AISign, ST_AI>() { return "AISign"; } void SQAISign_Register(Squirrel *engine) { - DefSQClass <AISign> SQAISign("AISign"); + DefSQClass<AISign, ST_AI> SQAISign("AISign"); SQAISign.PreRegister(engine); SQAISign.AddConstructor<void (AISign::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_signlist.hpp.sq b/src/ai/api/ai_signlist.hpp.sq index b54e5b64d..b6c85c0b8 100644 --- a/src/ai/api/ai_signlist.hpp.sq +++ b/src/ai/api/ai_signlist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AISignList *>(HSQUIRRELVM vm, AISignList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISignList", res, NULL, DefSQDestructorCallback<AISignList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AISignList>() { return "AISignList"; } +template <> const char *GetClassName<AISignList, ST_AI>() { return "AISignList"; } void SQAISignList_Register(Squirrel *engine) { - DefSQClass <AISignList> SQAISignList("AISignList"); + DefSQClass<AISignList, ST_AI> SQAISignList("AISignList"); SQAISignList.PreRegister(engine, "AIList"); SQAISignList.AddConstructor<void (AISignList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_station.hpp.sq b/src/ai/api/ai_station.hpp.sq index bc1278b4d..a0663ac5b 100644 --- a/src/ai/api/ai_station.hpp.sq +++ b/src/ai/api/ai_station.hpp.sq @@ -26,11 +26,11 @@ namespace SQConvert { template <> inline int Return<AIStation *>(HSQUIRRELVM vm, AIStation *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStation", res, NULL, DefSQDestructorCallback<AIStation>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIStation>() { return "AIStation"; } +template <> const char *GetClassName<AIStation, ST_AI>() { return "AIStation"; } void SQAIStation_Register(Squirrel *engine) { - DefSQClass <AIStation> SQAIStation("AIStation"); + DefSQClass<AIStation, ST_AI> SQAIStation("AIStation"); SQAIStation.PreRegister(engine, "AIBaseStation"); SQAIStation.AddConstructor<void (AIStation::*)(), 1>(engine, "x"); 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"); diff --git a/src/ai/api/ai_subsidy.hpp.sq b/src/ai/api/ai_subsidy.hpp.sq index e64e2a23b..57168f661 100644 --- a/src/ai/api/ai_subsidy.hpp.sq +++ b/src/ai/api/ai_subsidy.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AISubsidy *>(HSQUIRRELVM vm, AISubsidy *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISubsidy", res, NULL, DefSQDestructorCallback<AISubsidy>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AISubsidy>() { return "AISubsidy"; } +template <> const char *GetClassName<AISubsidy, ST_AI>() { return "AISubsidy"; } void SQAISubsidy_Register(Squirrel *engine) { - DefSQClass <AISubsidy> SQAISubsidy("AISubsidy"); + DefSQClass<AISubsidy, ST_AI> SQAISubsidy("AISubsidy"); SQAISubsidy.PreRegister(engine); SQAISubsidy.AddConstructor<void (AISubsidy::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_subsidylist.hpp.sq b/src/ai/api/ai_subsidylist.hpp.sq index c85289806..7ccc3ce60 100644 --- a/src/ai/api/ai_subsidylist.hpp.sq +++ b/src/ai/api/ai_subsidylist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AISubsidyList *>(HSQUIRRELVM vm, AISubsidyList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AISubsidyList", res, NULL, DefSQDestructorCallback<AISubsidyList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AISubsidyList>() { return "AISubsidyList"; } +template <> const char *GetClassName<AISubsidyList, ST_AI>() { return "AISubsidyList"; } void SQAISubsidyList_Register(Squirrel *engine) { - DefSQClass <AISubsidyList> SQAISubsidyList("AISubsidyList"); + DefSQClass<AISubsidyList, ST_AI> SQAISubsidyList("AISubsidyList"); SQAISubsidyList.PreRegister(engine, "AIList"); SQAISubsidyList.AddConstructor<void (AISubsidyList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_testmode.hpp.sq b/src/ai/api/ai_testmode.hpp.sq index 6050eb9eb..01e585d09 100644 --- a/src/ai/api/ai_testmode.hpp.sq +++ b/src/ai/api/ai_testmode.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AITestMode *>(HSQUIRRELVM vm, AITestMode *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITestMode", res, NULL, DefSQDestructorCallback<AITestMode>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITestMode>() { return "AITestMode"; } +template <> const char *GetClassName<AITestMode, ST_AI>() { return "AITestMode"; } void SQAITestMode_Register(Squirrel *engine) { - DefSQClass <AITestMode> SQAITestMode("AITestMode"); + DefSQClass<AITestMode, ST_AI> SQAITestMode("AITestMode"); SQAITestMode.PreRegister(engine); SQAITestMode.AddConstructor<void (AITestMode::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_tile.hpp.sq b/src/ai/api/ai_tile.hpp.sq index 44b7ecc0b..b33668cf4 100644 --- a/src/ai/api/ai_tile.hpp.sq +++ b/src/ai/api/ai_tile.hpp.sq @@ -32,11 +32,11 @@ namespace SQConvert { template <> inline int Return<AITile *>(HSQUIRRELVM vm, AITile *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITile", res, NULL, DefSQDestructorCallback<AITile>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITile>() { return "AITile"; } +template <> const char *GetClassName<AITile, ST_AI>() { return "AITile"; } void SQAITile_Register(Squirrel *engine) { - DefSQClass <AITile> SQAITile("AITile"); + DefSQClass<AITile, ST_AI> SQAITile("AITile"); SQAITile.PreRegister(engine); SQAITile.AddConstructor<void (AITile::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_tilelist.hpp.sq b/src/ai/api/ai_tilelist.hpp.sq index 2eb0cbf44..708388d12 100644 --- a/src/ai/api/ai_tilelist.hpp.sq +++ b/src/ai/api/ai_tilelist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AITileList *>(HSQUIRRELVM vm, AITileList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList", res, NULL, DefSQDestructorCallback<AITileList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITileList>() { return "AITileList"; } +template <> const char *GetClassName<AITileList, ST_AI>() { return "AITileList"; } void SQAITileList_Register(Squirrel *engine) { - DefSQClass <AITileList> SQAITileList("AITileList"); + DefSQClass<AITileList, ST_AI> SQAITileList("AITileList"); SQAITileList.PreRegister(engine, "AIList"); SQAITileList.AddConstructor<void (AITileList::*)(), 1>(engine, "x"); @@ -45,11 +45,11 @@ namespace SQConvert { template <> inline int Return<AITileList_IndustryAccepting *>(HSQUIRRELVM vm, AITileList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AITileList_IndustryAccepting>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITileList_IndustryAccepting>() { return "AITileList_IndustryAccepting"; } +template <> const char *GetClassName<AITileList_IndustryAccepting, ST_AI>() { return "AITileList_IndustryAccepting"; } void SQAITileList_IndustryAccepting_Register(Squirrel *engine) { - DefSQClass <AITileList_IndustryAccepting> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting"); + DefSQClass<AITileList_IndustryAccepting, ST_AI> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting"); SQAITileList_IndustryAccepting.PreRegister(engine, "AITileList"); SQAITileList_IndustryAccepting.AddConstructor<void (AITileList_IndustryAccepting::*)(IndustryID industry_id, int radius), 3>(engine, "xii"); @@ -65,11 +65,11 @@ namespace SQConvert { template <> inline int Return<AITileList_IndustryProducing *>(HSQUIRRELVM vm, AITileList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryProducing", res, NULL, DefSQDestructorCallback<AITileList_IndustryProducing>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITileList_IndustryProducing>() { return "AITileList_IndustryProducing"; } +template <> const char *GetClassName<AITileList_IndustryProducing, ST_AI>() { return "AITileList_IndustryProducing"; } void SQAITileList_IndustryProducing_Register(Squirrel *engine) { - DefSQClass <AITileList_IndustryProducing> SQAITileList_IndustryProducing("AITileList_IndustryProducing"); + DefSQClass<AITileList_IndustryProducing, ST_AI> SQAITileList_IndustryProducing("AITileList_IndustryProducing"); SQAITileList_IndustryProducing.PreRegister(engine, "AITileList"); SQAITileList_IndustryProducing.AddConstructor<void (AITileList_IndustryProducing::*)(IndustryID industry_id, int radius), 3>(engine, "xii"); @@ -85,11 +85,11 @@ namespace SQConvert { template <> inline int Return<AITileList_StationType *>(HSQUIRRELVM vm, AITileList_StationType *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_StationType", res, NULL, DefSQDestructorCallback<AITileList_StationType>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITileList_StationType>() { return "AITileList_StationType"; } +template <> const char *GetClassName<AITileList_StationType, ST_AI>() { return "AITileList_StationType"; } void SQAITileList_StationType_Register(Squirrel *engine) { - DefSQClass <AITileList_StationType> SQAITileList_StationType("AITileList_StationType"); + DefSQClass<AITileList_StationType, ST_AI> SQAITileList_StationType("AITileList_StationType"); SQAITileList_StationType.PreRegister(engine, "AITileList"); SQAITileList_StationType.AddConstructor<void (AITileList_StationType::*)(StationID station_id, AIStation::StationType station_type), 3>(engine, "xii"); diff --git a/src/ai/api/ai_town.hpp.sq b/src/ai/api/ai_town.hpp.sq index 0b5e322bf..5f89be05b 100644 --- a/src/ai/api/ai_town.hpp.sq +++ b/src/ai/api/ai_town.hpp.sq @@ -28,11 +28,11 @@ namespace SQConvert { template <> inline int Return<AITown *>(HSQUIRRELVM vm, AITown *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITown", res, NULL, DefSQDestructorCallback<AITown>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITown>() { return "AITown"; } +template <> const char *GetClassName<AITown, ST_AI>() { return "AITown"; } void SQAITown_Register(Squirrel *engine) { - DefSQClass <AITown> SQAITown("AITown"); + DefSQClass<AITown, ST_AI> SQAITown("AITown"); SQAITown.PreRegister(engine); SQAITown.AddConstructor<void (AITown::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_townlist.hpp.sq b/src/ai/api/ai_townlist.hpp.sq index 88d64edcd..8e47f2ff0 100644 --- a/src/ai/api/ai_townlist.hpp.sq +++ b/src/ai/api/ai_townlist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AITownList *>(HSQUIRRELVM vm, AITownList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITownList", res, NULL, DefSQDestructorCallback<AITownList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITownList>() { return "AITownList"; } +template <> const char *GetClassName<AITownList, ST_AI>() { return "AITownList"; } void SQAITownList_Register(Squirrel *engine) { - DefSQClass <AITownList> SQAITownList("AITownList"); + DefSQClass<AITownList, ST_AI> SQAITownList("AITownList"); SQAITownList.PreRegister(engine, "AIList"); SQAITownList.AddConstructor<void (AITownList::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_tunnel.hpp.sq b/src/ai/api/ai_tunnel.hpp.sq index c854d2be7..67eaa7f8b 100644 --- a/src/ai/api/ai_tunnel.hpp.sq +++ b/src/ai/api/ai_tunnel.hpp.sq @@ -24,11 +24,11 @@ namespace SQConvert { template <> inline int Return<AITunnel *>(HSQUIRRELVM vm, AITunnel *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITunnel", res, NULL, DefSQDestructorCallback<AITunnel>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AITunnel>() { return "AITunnel"; } +template <> const char *GetClassName<AITunnel, ST_AI>() { return "AITunnel"; } void SQAITunnel_Register(Squirrel *engine) { - DefSQClass <AITunnel> SQAITunnel("AITunnel"); + DefSQClass<AITunnel, ST_AI> SQAITunnel("AITunnel"); SQAITunnel.PreRegister(engine); SQAITunnel.AddConstructor<void (AITunnel::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_vehicle.hpp.sq b/src/ai/api/ai_vehicle.hpp.sq index e9d300fe6..d541114df 100644 --- a/src/ai/api/ai_vehicle.hpp.sq +++ b/src/ai/api/ai_vehicle.hpp.sq @@ -28,11 +28,11 @@ namespace SQConvert { template <> inline int Return<AIVehicle *>(HSQUIRRELVM vm, AIVehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicle", res, NULL, DefSQDestructorCallback<AIVehicle>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIVehicle>() { return "AIVehicle"; } +template <> const char *GetClassName<AIVehicle, ST_AI>() { return "AIVehicle"; } void SQAIVehicle_Register(Squirrel *engine) { - DefSQClass <AIVehicle> SQAIVehicle("AIVehicle"); + DefSQClass<AIVehicle, ST_AI> SQAIVehicle("AIVehicle"); SQAIVehicle.PreRegister(engine); SQAIVehicle.AddConstructor<void (AIVehicle::*)(), 1>(engine, "x"); 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"); diff --git a/src/ai/api/ai_waypoint.hpp.sq b/src/ai/api/ai_waypoint.hpp.sq index e248481de..a9a41f86d 100644 --- a/src/ai/api/ai_waypoint.hpp.sq +++ b/src/ai/api/ai_waypoint.hpp.sq @@ -26,11 +26,11 @@ namespace SQConvert { template <> inline int Return<AIWaypoint *>(HSQUIRRELVM vm, AIWaypoint *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypoint", res, NULL, DefSQDestructorCallback<AIWaypoint>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIWaypoint>() { return "AIWaypoint"; } +template <> const char *GetClassName<AIWaypoint, ST_AI>() { return "AIWaypoint"; } void SQAIWaypoint_Register(Squirrel *engine) { - DefSQClass <AIWaypoint> SQAIWaypoint("AIWaypoint"); + DefSQClass<AIWaypoint, ST_AI> SQAIWaypoint("AIWaypoint"); SQAIWaypoint.PreRegister(engine, "AIBaseStation"); SQAIWaypoint.AddConstructor<void (AIWaypoint::*)(), 1>(engine, "x"); diff --git a/src/ai/api/ai_waypointlist.hpp.sq b/src/ai/api/ai_waypointlist.hpp.sq index 90fb6d1ba..6d57a2ab1 100644 --- a/src/ai/api/ai_waypointlist.hpp.sq +++ b/src/ai/api/ai_waypointlist.hpp.sq @@ -20,11 +20,11 @@ namespace SQConvert { template <> inline int Return<AIWaypointList *>(HSQUIRRELVM vm, AIWaypointList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypointList", res, NULL, DefSQDestructorCallback<AIWaypointList>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIWaypointList>() { return "AIWaypointList"; } +template <> const char *GetClassName<AIWaypointList, ST_AI>() { return "AIWaypointList"; } void SQAIWaypointList_Register(Squirrel *engine) { - DefSQClass <AIWaypointList> SQAIWaypointList("AIWaypointList"); + DefSQClass<AIWaypointList, ST_AI> SQAIWaypointList("AIWaypointList"); SQAIWaypointList.PreRegister(engine, "AIList"); SQAIWaypointList.AddConstructor<void (AIWaypointList::*)(AIWaypoint::WaypointType waypoint_type), 2>(engine, "xi"); @@ -40,11 +40,11 @@ namespace SQConvert { template <> inline int Return<AIWaypointList_Vehicle *>(HSQUIRRELVM vm, AIWaypointList_Vehicle *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIWaypointList_Vehicle", res, NULL, DefSQDestructorCallback<AIWaypointList_Vehicle>); return 1; } } // namespace SQConvert -template <> const char *GetClassName<AIWaypointList_Vehicle>() { return "AIWaypointList_Vehicle"; } +template <> const char *GetClassName<AIWaypointList_Vehicle, ST_AI>() { return "AIWaypointList_Vehicle"; } void SQAIWaypointList_Vehicle_Register(Squirrel *engine) { - DefSQClass <AIWaypointList_Vehicle> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle"); + DefSQClass<AIWaypointList_Vehicle, ST_AI> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle"); SQAIWaypointList_Vehicle.PreRegister(engine, "AIList"); SQAIWaypointList_Vehicle.AddConstructor<void (AIWaypointList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi"); diff --git a/src/ai/api/squirrel_export.awk b/src/ai/api/squirrel_export.awk index 1246be2e6..2783d56a8 100644 --- a/src/ai/api/squirrel_export.awk +++ b/src/ai/api/squirrel_export.awk @@ -209,13 +209,13 @@ BEGIN { print "} // namespace SQConvert" print ""; - print "template <> const char *GetClassName<" cls ">() { return \"" cls "\"; }" + print "template <> const char *GetClassName<" cls ", ST_AI>() { return \"" cls "\"; }" print ""; # Then do the registration functions of the class. */ print "void SQ" cls "_Register(Squirrel *engine)" print "{" - print " DefSQClass <" cls "> SQ" cls "(\"" cls "\");" + print " DefSQClass<" cls ", ST_AI> SQ" cls "(\"" cls "\");" if (super_cls == "AIObject" || super_cls == "AIAbstractList::Valuator") { print " SQ" cls ".PreRegister(engine);" } else { diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp index 163d9b655..44ab21650 100644 --- a/src/script/squirrel.hpp +++ b/src/script/squirrel.hpp @@ -14,6 +14,11 @@ #include <squirrel.h> +/** The type of script we're working with, i.e. for who is it? */ +enum ScriptType { + ST_AI, ///< The script is for the AI. +}; + class Squirrel { private: typedef void (SQPrintFunc)(bool error_msg, const SQChar *message); diff --git a/src/script/squirrel_class.hpp b/src/script/squirrel_class.hpp index a08d8b3a6..73117b60a 100644 --- a/src/script/squirrel_class.hpp +++ b/src/script/squirrel_class.hpp @@ -18,7 +18,7 @@ * The template to define classes in Squirrel. It takes care of the creation * and calling of such classes, to minimize the API layer. */ -template <class CL> +template <class CL, ScriptType ST> class DefSQClass { private: const char *classname; @@ -35,7 +35,7 @@ public: void DefSQMethod(Squirrel *engine, Func function_proc, const char *function_name) { using namespace SQConvert; - engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc)); + engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, 0, NULL, &function_proc, sizeof(function_proc)); } /** @@ -45,7 +45,7 @@ public: void DefSQAdvancedMethod(Squirrel *engine, Func function_proc, const char *function_name) { using namespace SQConvert; - engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func>, 0, NULL, &function_proc, sizeof(function_proc)); + engine->AddMethod(function_name, DefSQAdvancedNonStaticCallback<CL, Func, ST>, 0, NULL, &function_proc, sizeof(function_proc)); } /** @@ -58,7 +58,7 @@ public: void DefSQMethod(Squirrel *engine, Func function_proc, const char *function_name, int nparam, const char *params) { using namespace SQConvert; - engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func>, nparam, params, &function_proc, sizeof(function_proc)); + engine->AddMethod(function_name, DefSQNonStaticCallback<CL, Func, ST>, nparam, params, &function_proc, sizeof(function_proc)); } /** diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp index a5a242539..03f1315fa 100644 --- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -19,7 +19,7 @@ #include "../string_func.h" #include "squirrel_helper_type.hpp" -template <class CL> const char *GetClassName(); +template <class CL, ScriptType ST> const char *GetClassName(); /** * The Squirrel convert routines @@ -731,7 +731,7 @@ namespace SQConvert { * In here the function_proc is recovered, and the SQCall is called that * can handle this exact amount of params. */ - template <typename Tcls, typename Tmethod> + template <typename Tcls, typename Tmethod, ScriptType Ttype> inline SQInteger DefSQNonStaticCallback(HSQUIRRELVM vm) { /* Find the amount of params we got */ @@ -745,7 +745,7 @@ namespace SQConvert { /* Protect against calls to a non-static method in a static way */ sq_pushroottable(vm); - const char *className = GetClassName<Tcls>(); + const char *className = GetClassName<Tcls, Ttype>(); sq_pushstring(vm, OTTD2SQ(className), -1); sq_get(vm, -2); sq_pushobject(vm, instance); @@ -773,7 +773,7 @@ namespace SQConvert { * In here the function_proc is recovered, and the SQCall is called that * can handle this exact amount of params. */ - template <typename Tcls, typename Tmethod> + template <typename Tcls, typename Tmethod, ScriptType Ttype> inline SQInteger DefSQAdvancedNonStaticCallback(HSQUIRRELVM vm) { /* Find the amount of params we got */ @@ -787,7 +787,7 @@ namespace SQConvert { /* Protect against calls to a non-static method in a static way */ sq_pushroottable(vm); - const char *className = GetClassName<Tcls>(); + const char *className = GetClassName<Tcls, Ttype>(); sq_pushstring(vm, OTTD2SQ(className), -1); sq_get(vm, -2); sq_pushobject(vm, instance); |