(svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically

pull/155/head
rubidium 13 years ago
parent cbe453eab0
commit 4e91548f71

@ -28,6 +28,8 @@ void AIScanner::RescanAIDir()
this->Scan(PATHSEP "library.nut", AI_LIBRARY_DIR);
}
template <> const char *GetClassName<AIInfo>() { return "AIInfo"; }
AIScanner::AIScanner() :
ScriptScanner(),
info_dummy(NULL)

@ -29,9 +29,6 @@
*/
class AIAccounting : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIAccounting"; }
/**
* Creating instance of this class starts counting the costs of commands
* from zero. Saves the current value of GetCosts so we can return to

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIAccounting_Register(Squirrel *engine)
{
DefSQClass <AIAccounting> SQAIAccounting("AIAccounting");

@ -19,9 +19,6 @@
*/
class AIAirport : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIAirport"; }
/**
* The types of airports available in the game.
*/

@ -26,6 +26,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIAirport_Register(Squirrel *engine)
{
DefSQClass <AIAirport> SQAIAirport("AIAirport");

@ -25,9 +25,6 @@
*/
class AIBase : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBase"; }
/**
* Get a random value.
* @return A random value between 0 and MAX(uint32).

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIBase_Register(Squirrel *engine)
{
DefSQClass <AIBase> SQAIBase("AIBase");

@ -19,9 +19,6 @@
*/
class AIBaseStation : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBaseStation"; }
/**
* Special station IDs for building adjacent/new stations when
* the adjacent/distant join features are enabled.

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIBaseStation_Register(Squirrel *engine)
{
DefSQClass <AIBaseStation> SQAIBaseStation("AIBaseStation");

@ -39,9 +39,6 @@ public:
ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, // [STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT]
};
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBridge"; }
/**
* Checks whether the given bridge type is valid.
* @param bridge_id The bridge to check.

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIBridge_Register(Squirrel *engine)
{
DefSQClass <AIBridge> SQAIBridge("AIBridge");

@ -20,8 +20,6 @@
*/
class AIBridgeList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBridgeList"; }
AIBridgeList();
};
@ -31,9 +29,6 @@ public:
*/
class AIBridgeList_Length : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIBridgeList_Length"; }
/**
* @param length The length of the bridge you want to build.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIBridgeList_Register(Squirrel *engine)
{
DefSQClass <AIBridgeList> SQAIBridgeList("AIBridgeList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIBridgeList_Length_Register(Squirrel *engine)
{
DefSQClass <AIBridgeList_Length> SQAIBridgeList_Length("AIBridgeList_Length");

@ -19,9 +19,6 @@
*/
class AICargo : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargo"; }
/**
* The classes of cargo (from newgrf_cargo.h).
*/

@ -28,6 +28,8 @@ namespace SQConvert {
template <> 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"; }
void SQAICargo_Register(Squirrel *engine)
{
DefSQClass <AICargo> SQAICargo("AICargo");

@ -20,8 +20,6 @@
*/
class AICargoList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList"; }
AICargoList();
};
@ -33,9 +31,6 @@ public:
*/
class AICargoList_IndustryAccepting : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList_IndustryAccepting"; }
/**
* @param industry_id The industry to get the list of cargos it accepts from.
*/
@ -48,9 +43,6 @@ public:
*/
class AICargoList_IndustryProducing : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList_IndustryProducing"; }
/**
* @param industry_id The industry to get the list of cargos it produces from.
*/
@ -63,9 +55,6 @@ public:
*/
class AICargoList_StationAccepting : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICargoList_StationAccepting"; }
/**
* @param station_id The station to get the list of cargos it accepts from.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAICargoList_Register(Squirrel *engine)
{
DefSQClass <AICargoList> SQAICargoList("AICargoList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> 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"; }
void SQAICargoList_IndustryAccepting_Register(Squirrel *engine)
{
DefSQClass <AICargoList_IndustryAccepting> SQAICargoList_IndustryAccepting("AICargoList_IndustryAccepting");
@ -56,6 +60,8 @@ namespace SQConvert {
template <> 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"; }
void SQAICargoList_IndustryProducing_Register(Squirrel *engine)
{
DefSQClass <AICargoList_IndustryProducing> SQAICargoList_IndustryProducing("AICargoList_IndustryProducing");
@ -74,6 +80,8 @@ namespace SQConvert {
template <> 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"; }
void SQAICargoList_StationAccepting_Register(Squirrel *engine)
{
DefSQClass <AICargoList_StationAccepting> SQAICargoList_StationAccepting("AICargoList_StationAccepting");

@ -19,9 +19,6 @@
*/
class AICompany : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AICompany"; }
/** The range of possible quarters to get company information of. */
enum Quarter {
CURRENT_QUARTER = 0, ///< The current quarter.

@ -28,6 +28,8 @@ namespace SQConvert {
template <> 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"; }
void SQAICompany_Register(Squirrel *engine)
{
DefSQClass <AICompany> SQAICompany("AICompany");

@ -24,9 +24,6 @@ class AIController {
friend class AIInstance;
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIController"; }
/**
* Initializer of the AIController.
*/

@ -9,6 +9,8 @@
#include "ai_controller.hpp"
template <> const char *GetClassName<AIController>() { return "AIController"; }
void SQAIController_Register(Squirrel *engine)
{
DefSQClass <AIController> SQAIController("AIController");

@ -26,9 +26,6 @@
*/
class AIDate : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIDate"; }
/**
* Get the current date.
* This is the number of days since epoch under the assumption that

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIDate_Register(Squirrel *engine)
{
DefSQClass <AIDate> SQAIDate("AIDate");

@ -21,9 +21,6 @@
*/
class AIDepotList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIDepotList"; }
/**
* @param transport_type The type of transport to make a list of depots for.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIDepotList_Register(Squirrel *engine)
{
DefSQClass <AIDepotList> SQAIDepotList("AIDepotList");

@ -21,9 +21,6 @@
*/
class AIEngine : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEngine"; }
/**
* Checks whether the given engine type is valid. An engine is valid if you
* have at least one vehicle of this engine or it's currently buildable.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEngine_Register(Squirrel *engine)
{
DefSQClass <AIEngine> SQAIEngine("AIEngine");

@ -21,9 +21,6 @@
*/
class AIEngineList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEngineList"; }
/**
* @param vehicle_type The type of vehicle to make a list of engines for.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEngineList_Register(Squirrel *engine)
{
DefSQClass <AIEngineList> SQAIEngineList("AIEngineList");

@ -43,9 +43,6 @@
*/
class AIError : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIError"; }
/**
* All categories errors can be divided in.
*/

@ -26,6 +26,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIError_Register(Squirrel *engine)
{
DefSQClass <AIError> SQAIError("AIError");

@ -21,9 +21,6 @@
*/
class AIEvent : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEvent"; }
/**
* The type of event. Needed to lookup the detailed class.
*/
@ -80,12 +77,6 @@ protected:
*/
class AIEventController : public AIObject {
public:
/**
* The name of the class, needed by several sub-processes.
*/
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventController"; }
/**
* Check if there is an event waiting.
* @return true if there is an event on the stack.

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEvent_Register(Squirrel *engine)
{
DefSQClass <AIEvent> SQAIEvent("AIEvent");
@ -68,6 +70,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventController_Register(Squirrel *engine)
{
DefSQClass <AIEventController> SQAIEventController("AIEventController");

@ -21,9 +21,6 @@
*/
class AIEventVehicleCrashed : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleCrashed"; }
/**
* The reasons for vehicle crashes
*/
@ -84,9 +81,6 @@ private:
*/
class AIEventSubsidyOffer : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyOffer"; }
/**
* @param subsidy_id The index of this subsidy in the _subsidies array.
*/
@ -117,9 +111,6 @@ private:
*/
class AIEventSubsidyOfferExpired : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyOfferExpired"; }
/**
* @param subsidy_id The index of this subsidy in the _subsidies array.
*/
@ -150,9 +141,6 @@ private:
*/
class AIEventSubsidyAwarded : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyAwarded"; }
/**
* @param subsidy_id The index of this subsidy in the _subsidies array.
*/
@ -183,9 +171,6 @@ private:
*/
class AIEventSubsidyExpired : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventSubsidyExpired"; }
/**
* @param subsidy_id The index of this subsidy in the _subsidies array.
*/
@ -218,9 +203,6 @@ private:
*/
class AIEventEnginePreview : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventEnginePreview"; }
/**
* @param engine The engine offered to test.
*/
@ -309,9 +291,6 @@ private:
*/
class AIEventCompanyNew : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyNew"; }
/**
* @param owner The new company.
*/
@ -343,9 +322,6 @@ private:
*/
class AIEventCompanyInTrouble : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyInTrouble"; }
/**
* @param owner The company that is in trouble.
*/
@ -376,9 +352,6 @@ private:
*/
class AIEventCompanyAskMerger : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyAskMerger"; }
/**
* @param owner The company that can be bough.
* @param value The value/costs of buying the company.
@ -426,9 +399,6 @@ private:
*/
class AIEventCompanyMerger : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyMerger"; }
/**
* @param old_owner The company bought off.
* @param new_owner The company that bougth owner.
@ -471,9 +441,6 @@ private:
*/
class AIEventCompanyBankrupt : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventCompanyBankrupt"; }
/**
* @param owner The company that has gone bankrupt.
*/
@ -504,9 +471,6 @@ private:
*/
class AIEventVehicleLost : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleLost"; }
/**
* @param vehicle_id The vehicle that is lost.
*/
@ -537,9 +501,6 @@ private:
*/
class AIEventVehicleWaitingInDepot : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleWaitingInDepot"; }
/**
* @param vehicle_id The vehicle that is waiting in a depot.
*/
@ -570,9 +531,6 @@ private:
*/
class AIEventVehicleUnprofitable : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventVehicleUnprofitable"; }
/**
* @param vehicle_id The vehicle that was unprofitable.
*/
@ -603,9 +561,6 @@ private:
*/
class AIEventIndustryOpen : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventIndustryOpen"; }
/**
* @param industry_id The new industry.
*/
@ -636,9 +591,6 @@ private:
*/
class AIEventIndustryClose : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventIndustryClose"; }
/**
* @param industry_id The new industry.
*/
@ -669,9 +621,6 @@ private:
*/
class AIEventEngineAvailable : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventEngineAvailable"; }
/**
* @param engine The engine that is available.
*/
@ -702,9 +651,6 @@ private:
*/
class AIEventStationFirstVehicle : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventStationFirstVehicle"; }
/**
* @param station The station visited for the first time.
* @param vehicle The vehicle visiting the station.
@ -744,9 +690,6 @@ private:
*/
class AIEventDisasterZeppelinerCrashed : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventDisasterZeppelinerCrashed"; }
/**
* @param station The station containing the affected airport
*/
@ -777,9 +720,6 @@ private:
*/
class AIEventDisasterZeppelinerCleared : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventDisasterZeppelinerCleared"; }
/**
* @param station The station containing the affected airport
*/
@ -810,9 +750,6 @@ private:
*/
class AIEventTownFounded : public AIEvent {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIEventTownFounded"; }
/**
* @param town The town that was created.
*/

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventVehicleCrashed_Register(Squirrel *engine)
{
DefSQClass <AIEventVehicleCrashed> SQAIEventVehicleCrashed("AIEventVehicleCrashed");
@ -54,6 +56,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventSubsidyOffer_Register(Squirrel *engine)
{
DefSQClass <AIEventSubsidyOffer> SQAIEventSubsidyOffer("AIEventSubsidyOffer");
@ -75,6 +79,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventSubsidyOfferExpired_Register(Squirrel *engine)
{
DefSQClass <AIEventSubsidyOfferExpired> SQAIEventSubsidyOfferExpired("AIEventSubsidyOfferExpired");
@ -96,6 +102,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventSubsidyAwarded_Register(Squirrel *engine)
{
DefSQClass <AIEventSubsidyAwarded> SQAIEventSubsidyAwarded("AIEventSubsidyAwarded");
@ -117,6 +125,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventSubsidyExpired_Register(Squirrel *engine)
{
DefSQClass <AIEventSubsidyExpired> SQAIEventSubsidyExpired("AIEventSubsidyExpired");
@ -138,6 +148,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventEnginePreview_Register(Squirrel *engine)
{
DefSQClass <AIEventEnginePreview> SQAIEventEnginePreview("AIEventEnginePreview");
@ -166,6 +178,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventCompanyNew_Register(Squirrel *engine)
{
DefSQClass <AIEventCompanyNew> SQAIEventCompanyNew("AIEventCompanyNew");
@ -187,6 +201,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventCompanyInTrouble_Register(Squirrel *engine)
{
DefSQClass <AIEventCompanyInTrouble> SQAIEventCompanyInTrouble("AIEventCompanyInTrouble");
@ -208,6 +224,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventCompanyAskMerger_Register(Squirrel *engine)
{
DefSQClass <AIEventCompanyAskMerger> SQAIEventCompanyAskMerger("AIEventCompanyAskMerger");
@ -231,6 +249,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventCompanyMerger_Register(Squirrel *engine)
{
DefSQClass <AIEventCompanyMerger> SQAIEventCompanyMerger("AIEventCompanyMerger");
@ -253,6 +273,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventCompanyBankrupt_Register(Squirrel *engine)
{
DefSQClass <AIEventCompanyBankrupt> SQAIEventCompanyBankrupt("AIEventCompanyBankrupt");
@ -274,6 +296,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventVehicleLost_Register(Squirrel *engine)
{
DefSQClass <AIEventVehicleLost> SQAIEventVehicleLost("AIEventVehicleLost");
@ -295,6 +319,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventVehicleWaitingInDepot_Register(Squirrel *engine)
{
DefSQClass <AIEventVehicleWaitingInDepot> SQAIEventVehicleWaitingInDepot("AIEventVehicleWaitingInDepot");
@ -316,6 +342,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventVehicleUnprofitable_Register(Squirrel *engine)
{
DefSQClass <AIEventVehicleUnprofitable> SQAIEventVehicleUnprofitable("AIEventVehicleUnprofitable");
@ -337,6 +365,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventIndustryOpen_Register(Squirrel *engine)
{
DefSQClass <AIEventIndustryOpen> SQAIEventIndustryOpen("AIEventIndustryOpen");
@ -358,6 +388,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventIndustryClose_Register(Squirrel *engine)
{
DefSQClass <AIEventIndustryClose> SQAIEventIndustryClose("AIEventIndustryClose");
@ -379,6 +411,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventEngineAvailable_Register(Squirrel *engine)
{
DefSQClass <AIEventEngineAvailable> SQAIEventEngineAvailable("AIEventEngineAvailable");
@ -400,6 +434,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventStationFirstVehicle_Register(Squirrel *engine)
{
DefSQClass <AIEventStationFirstVehicle> SQAIEventStationFirstVehicle("AIEventStationFirstVehicle");
@ -422,6 +458,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventDisasterZeppelinerCrashed_Register(Squirrel *engine)
{
DefSQClass <AIEventDisasterZeppelinerCrashed> SQAIEventDisasterZeppelinerCrashed("AIEventDisasterZeppelinerCrashed");
@ -443,6 +481,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventDisasterZeppelinerCleared_Register(Squirrel *engine)
{
DefSQClass <AIEventDisasterZeppelinerCleared> SQAIEventDisasterZeppelinerCleared("AIEventDisasterZeppelinerCleared");
@ -464,6 +504,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIEventTownFounded_Register(Squirrel *engine)
{
DefSQClass <AIEventTownFounded> SQAIEventTownFounded("AIEventTownFounded");

@ -22,10 +22,6 @@
* In Execute mode all commands you do are executed for real.
*/
class AIExecMode : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIExecMode"; }
private:
AIModeProc *last_mode; ///< The previous mode we were in.
AIObject *last_instance; ///< The previous instace of the mode.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIExecMode_Register(Squirrel *engine)
{
DefSQClass <AIExecMode> SQAIExecMode("AIExecMode");

@ -36,9 +36,6 @@
*/
class AIGameSettings : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIGameSettings"; }
/**
* Is the given game setting a valid setting for this instance of OpenTTD?
* @param setting The setting to check for existence.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIGameSettings_Register(Squirrel *engine)
{
DefSQClass <AIGameSettings> SQAIGameSettings("AIGameSettings");

@ -19,9 +19,6 @@
*/
class AIGroup : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIGroup"; }
/**
* The group IDs of some special groups.
*/

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIGroup_Register(Squirrel *engine)
{
DefSQClass <AIGroup> SQAIGroup("AIGroup");

@ -21,8 +21,6 @@
*/
class AIGroupList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIGroupList"; }
AIGroupList();
};

@ -20,6 +20,8 @@ namespace SQConvert {
template <> int Return<AIGroupList *>(HSQUIRRELVM vm, AIGroupList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIGroupList", res, NULL, DefSQDestructorCallback<AIGroupList>); return 1; }
} // namespace SQConvert
template <> const char *GetClassName<AIGroupList>() { return "AIGroupList"; }
void SQAIGroupList_Register(Squirrel *engine)
{
DefSQClass <AIGroupList> SQAIGroupList("AIGroupList");

@ -19,9 +19,6 @@
*/
class AIIndustry : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustry"; }
/** Ways for an industry to accept a cargo. */
enum CargoAcceptState {
CAS_NOT_ACCEPTED, ///< The CargoID is not accepted by this industry.

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIIndustry_Register(Squirrel *engine)
{
DefSQClass <AIIndustry> SQAIIndustry("AIIndustry");

@ -20,8 +20,6 @@
*/
class AIIndustryList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryList"; }
AIIndustryList();
};
@ -31,9 +29,6 @@ public:
*/
class AIIndustryList_CargoAccepting : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryList_CargoAccepting"; }
/**
* @param cargo_id The cargo this industry should accept.
*/
@ -47,9 +42,6 @@ public:
*/
class AIIndustryList_CargoProducing : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryList_CargoProducing"; }
/**
* @param cargo_id The cargo this industry should produce.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIIndustryList_Register(Squirrel *engine)
{
DefSQClass <AIIndustryList> SQAIIndustryList("AIIndustryList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIIndustryList_CargoAccepting_Register(Squirrel *engine)
{
DefSQClass <AIIndustryList_CargoAccepting> SQAIIndustryList_CargoAccepting("AIIndustryList_CargoAccepting");
@ -56,6 +60,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIIndustryList_CargoProducing_Register(Squirrel *engine)
{
DefSQClass <AIIndustryList_CargoProducing> SQAIIndustryList_CargoProducing("AIIndustryList_CargoProducing");

@ -19,9 +19,6 @@
*/
class AIIndustryType : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryType"; }
/**
* Special IndustryTypes.
*/

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIIndustryType_Register(Squirrel *engine)
{
DefSQClass <AIIndustryType> SQAIIndustryType("AIIndustryType");

@ -20,8 +20,6 @@
*/
class AIIndustryTypeList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIIndustryTypeList"; }
AIIndustryTypeList();
};

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIIndustryTypeList_Register(Squirrel *engine)
{
DefSQClass <AIIndustryTypeList> SQAIIndustryTypeList("AIIndustryTypeList");

@ -24,9 +24,6 @@ class AIListSorter;
*/
class AIList : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIList"; }
/** Type of sorter */
enum SorterType {
SORT_BY_VALUE, ///< Sort the list based on the value of the item.

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIList_Register(Squirrel *engine)
{
DefSQClass <AIList> SQAIList("AIList");

@ -23,9 +23,6 @@ class AILog : public AIObject {
friend class AIController;
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AILog"; }
#ifndef EXPORT_SKIP
/**
* Log levels; The value is also feed to DEBUG() lvl.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAILog_Register(Squirrel *engine)
{
DefSQClass <AILog> SQAILog("AILog");

@ -22,9 +22,6 @@ class AIMap : public AIObject {
public:
static const int TILE_INVALID = (int)INVALID_TILE; ///< Invalid TileIndex.
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIMap"; }
/**
* Checks whether the given tile is valid.
* @param tile The tile to check.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIMap_Register(Squirrel *engine)
{
DefSQClass <AIMap> SQAIMap("AIMap");

@ -19,9 +19,6 @@
*/
class AIMarine : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIMarine"; }
/**
* All marine related error messages.
*/

@ -26,6 +26,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIMarine_Register(Squirrel *engine)
{
DefSQClass <AIMarine> SQAIMarine("AIMarine");

@ -19,9 +19,6 @@
*/
class AIOrder : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIOrder"; }
/**
* All order related error messages.
*/

@ -34,6 +34,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIOrder_Register(Squirrel *engine)
{
DefSQClass <AIOrder> SQAIOrder("AIOrder");

@ -19,9 +19,6 @@
*/
class AIRail : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIRail"; }
/**
* All rail related error messages.
*/

@ -32,6 +32,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIRail_Register(Squirrel *engine)
{
DefSQClass <AIRail> SQAIRail("AIRail");

@ -20,8 +20,6 @@
*/
class AIRailTypeList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIRailTypeList"; }
AIRailTypeList();
};

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIRailTypeList_Register(Squirrel *engine)
{
DefSQClass <AIRailTypeList> SQAIRailTypeList("AIRailTypeList");

@ -19,9 +19,6 @@
*/
class AIRoad : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIRoad"; }
/**
* All road related error messages.
*/

@ -30,6 +30,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIRoad_Register(Squirrel *engine)
{
DefSQClass <AIRoad> SQAIRoad("AIRoad");

@ -19,9 +19,6 @@
*/
class AISign : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISign"; }
/**
* All sign related error messages.
*/

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAISign_Register(Squirrel *engine)
{
DefSQClass <AISign> SQAISign("AISign");

@ -20,8 +20,6 @@
*/
class AISignList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISignList"; }
AISignList();
};

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAISignList_Register(Squirrel *engine)
{
DefSQClass <AISignList> SQAISignList("AISignList");

@ -20,9 +20,6 @@
*/
class AIStation : public AIBaseStation {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIStation"; }
/**
* All station related error messages.
*/

@ -26,6 +26,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIStation_Register(Squirrel *engine)
{
DefSQClass <AIStation> SQAIStation("AIStation");

@ -21,9 +21,6 @@
*/
class AIStationList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIStationList"; }
/**
* @param station_type The type of station to make a list of stations for.
*/
@ -36,9 +33,6 @@ public:
*/
class AIStationList_Vehicle : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIStationList_Vehicle"; }
/**
* @param vehicle_id The vehicle to get the list of stations he has in its orders from.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIStationList_Register(Squirrel *engine)
{
DefSQClass <AIStationList> SQAIStationList("AIStationList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIStationList_Vehicle_Register(Squirrel *engine)
{
DefSQClass <AIStationList_Vehicle> SQAIStationList_Vehicle("AIStationList_Vehicle");

@ -19,9 +19,6 @@
*/
class AISubsidy : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISubsidy"; }
/**
* Enumeration for source and destination of a subsidy.
* @note The list of values may grow in future.

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAISubsidy_Register(Squirrel *engine)
{
DefSQClass <AISubsidy> SQAISubsidy("AISubsidy");

@ -20,8 +20,6 @@
*/
class AISubsidyList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AISubsidyList"; }
AISubsidyList();
};

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAISubsidyList_Register(Squirrel *engine)
{
DefSQClass <AISubsidyList> SQAISubsidyList("AISubsidyList");

@ -24,10 +24,6 @@
* the cost would be.
*/
class AITestMode : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITestMode"; }
private:
AIModeProc *last_mode; ///< The previous mode we were in.
AIObject *last_instance; ///< The previous instace of the mode.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITestMode_Register(Squirrel *engine)
{
DefSQClass <AITestMode> SQAITestMode("AITestMode");

@ -20,9 +20,6 @@
*/
class AITile : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITile"; }
/**
* Error messages related to modifying tiles.
*/

@ -32,6 +32,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITile_Register(Squirrel *engine)
{
DefSQClass <AITile> SQAITile("AITile");

@ -21,9 +21,6 @@
*/
class AITileList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList"; }
/**
* Adds the rectangle between tile_from and tile_to to the to-be-evaluated tiles.
* @param tile_from One corner of the tiles to add.
@ -64,9 +61,6 @@ public:
*/
class AITileList_IndustryAccepting : public AITileList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList_IndustryAccepting"; }
/**
* @param industry_id The industry to create the AITileList around.
* @param radius The radius of the station you will be using.
@ -83,9 +77,6 @@ public:
*/
class AITileList_IndustryProducing : public AITileList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList_IndustryProducing"; }
/**
* @param industry_id The industry to create the AITileList around.
* @param radius The radius of the station you will be using.
@ -102,9 +93,6 @@ public:
*/
class AITileList_StationType : public AITileList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITileList_StationType"; }
/**
* @param station_id The station to create the AITileList for.
* @param station_type The StationType to create the AIList for.

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITileList_Register(Squirrel *engine)
{
DefSQClass <AITileList> SQAITileList("AITileList");
@ -43,6 +45,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITileList_IndustryAccepting_Register(Squirrel *engine)
{
DefSQClass <AITileList_IndustryAccepting> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting");
@ -61,6 +65,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITileList_IndustryProducing_Register(Squirrel *engine)
{
DefSQClass <AITileList_IndustryProducing> SQAITileList_IndustryProducing("AITileList_IndustryProducing");
@ -79,6 +85,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITileList_StationType_Register(Squirrel *engine)
{
DefSQClass <AITileList_StationType> SQAITileList_StationType("AITileList_StationType");

@ -19,9 +19,6 @@
*/
class AITown : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITown"; }
/**
* Actions that one can perform on a town.
*/

@ -28,6 +28,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITown_Register(Squirrel *engine)
{
DefSQClass <AITown> SQAITown("AITown");

@ -20,8 +20,6 @@
*/
class AITownList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITownList"; }
AITownList();
};

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITownList_Register(Squirrel *engine)
{
DefSQClass <AITownList> SQAITownList("AITownList");

@ -19,9 +19,6 @@
*/
class AITunnel : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AITunnel"; }
/**
* All tunnel related errors.
*/

@ -24,6 +24,8 @@ namespace SQConvert {
template <> 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"; }
void SQAITunnel_Register(Squirrel *engine)
{
DefSQClass <AITunnel> SQAITunnel("AITunnel");

@ -19,9 +19,6 @@
*/
class AIVehicle : public AIObject {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicle"; }
/**
* All vehicle related error messages.
*/

@ -28,6 +28,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicle_Register(Squirrel *engine)
{
DefSQClass <AIVehicle> SQAIVehicle("AIVehicle");

@ -21,8 +21,6 @@
*/
class AIVehicleList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList"; }
AIVehicleList();
};
@ -32,9 +30,6 @@ public:
*/
class AIVehicleList_Station : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_Station"; }
/**
* @param station_id The station to get the list of vehicles from, which have orders to it.
* @pre AIBaseStation::IsValidBaseStation(station_id)
@ -52,9 +47,6 @@ public:
*/
class AIVehicleList_Depot : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_Depot"; }
/**
* @param tile The tile of the depot to get the list of vehicles from, which have orders to it.
*/
@ -67,9 +59,6 @@ public:
*/
class AIVehicleList_SharedOrders : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_SharedOrders"; }
/**
* @param vehicle_id The vehicle that the rest shared orders with.
*/
@ -82,9 +71,6 @@ public:
*/
class AIVehicleList_Group : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_Group"; }
/**
* @param group_id The ID of the group the vehicles are in.
*/
@ -97,9 +83,6 @@ public:
*/
class AIVehicleList_DefaultGroup : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIVehicleList_DefaultGroup"; }
/**
* @param vehicle_type The VehicleType to get the list of vehicles for.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicleList_Register(Squirrel *engine)
{
DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicleList_Station_Register(Squirrel *engine)
{
DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station");
@ -56,6 +60,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicleList_Depot_Register(Squirrel *engine)
{
DefSQClass <AIVehicleList_Depot> SQAIVehicleList_Depot("AIVehicleList_Depot");
@ -74,6 +80,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicleList_SharedOrders_Register(Squirrel *engine)
{
DefSQClass <AIVehicleList_SharedOrders> SQAIVehicleList_SharedOrders("AIVehicleList_SharedOrders");
@ -92,6 +100,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicleList_Group_Register(Squirrel *engine)
{
DefSQClass <AIVehicleList_Group> SQAIVehicleList_Group("AIVehicleList_Group");
@ -110,6 +120,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIVehicleList_DefaultGroup_Register(Squirrel *engine)
{
DefSQClass <AIVehicleList_DefaultGroup> SQAIVehicleList_DefaultGroup("AIVehicleList_DefaultGroup");

@ -19,9 +19,6 @@
*/
class AIWaypoint : public AIBaseStation {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIWaypoint"; }
/**
* Type of waypoints known in the game.
*/

@ -26,6 +26,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIWaypoint_Register(Squirrel *engine)
{
DefSQClass <AIWaypoint> SQAIWaypoint("AIWaypoint");

@ -21,9 +21,6 @@
*/
class AIWaypointList : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIWaypointList"; }
/**
* @param waypoint_type The type of waypoint to make a list of waypoints for.
*/
@ -36,9 +33,6 @@ public:
*/
class AIWaypointList_Vehicle : public AIList {
public:
/** Get the name of this class to identify it towards squirrel. */
static const char *GetClassName() { return "AIWaypointList_Vehicle"; }
/**
* @param vehicle_id The vehicle to get the list of waypoints he has in its orders from.
*/

@ -20,6 +20,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIWaypointList_Register(Squirrel *engine)
{
DefSQClass <AIWaypointList> SQAIWaypointList("AIWaypointList");
@ -38,6 +40,8 @@ namespace SQConvert {
template <> 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"; }
void SQAIWaypointList_Vehicle_Register(Squirrel *engine)
{
DefSQClass <AIWaypointList_Vehicle> SQAIWaypointList_Vehicle("AIWaypointList_Vehicle");

@ -209,6 +209,9 @@ BEGIN {
print "} // namespace SQConvert"
print "";
print "template <> const char *GetClassName<" cls ">() { return \"" cls "\"; }"
print "";
# Then do the registration functions of the class. */
print "void SQ" cls "_Register(Squirrel *engine)"
print "{"
@ -414,7 +417,6 @@ BEGIN {
cls_param[1] = len;
cls_param[2] = types;
} else if (substr(funcname, 0, 1) == "_" && types != "v") {
} else if (funcname == "GetClassName" && types == ".") {
} else if (is_static) {
static_method_size++
static_methods[static_method_size, 0] = funcname

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save