/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
*/
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
#include "../script_vehicle.hpp"
#include "../template/template_vehicle.hpp.sq"
template <> const char *GetClassName() { return "GSVehicle"; }
void SQGSVehicle_Register(Squirrel *engine)
{
DefSQClass SQGSVehicle("GSVehicle");
SQGSVehicle.PreRegister(engine);
SQGSVehicle.AddConstructor(engine, "x");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BASE, "ERR_VEHICLE_BASE");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_RAIL, "VT_RAIL");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_ROAD, "VT_ROAD");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_WATER, "VT_WATER");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_AIR, "VT_AIR");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_INVALID, "VT_INVALID");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_RUNNING, "VS_RUNNING");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_STOPPED, "VS_STOPPED");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_IN_DEPOT, "VS_IN_DEPOT");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_AT_STATION, "VS_AT_STATION");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_BROKEN, "VS_BROKEN");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_CRASHED, "VS_CRASHED");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_INVALID, "VS_INVALID");
SQGSVehicle.DefSQConst(engine, ScriptVehicle::VEHICLE_INVALID, "VEHICLE_INVALID");
ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, ScriptVehicle::ERR_VEHICLE_TOO_MANY);
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
ScriptError::RegisterErrorMap(STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_TRAIN, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_SHIP, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
ScriptError::RegisterErrorMap(STR_ERROR_DEPOT_WRONG_DEPOT_TYPE, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
ScriptError::RegisterErrorMap(STR_ERROR_VEHICLE_IS_DESTROYED, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED);
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT);
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_START_NO_POWER, ScriptVehicle::ERR_VEHICLE_NO_POWER);
ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_TOO_LONG, ScriptVehicle::ERR_VEHICLE_TOO_LONG);
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetNumWagons, "GetNumWagons", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetName, "GetName", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLocation, "GetLocation", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetEngineType, "GetEngineType", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAge, "GetAge", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonAge, "GetWagonAge", 3, ".ii");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaxAge, "GetMaxAge", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetState, "GetState", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRunningCost, "GetRunningCost", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetVehicleType, "GetVehicleType", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRoadType, "GetRoadType", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsInDepot, "IsInDepot", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCapacity, "GetCapacity", 3, ".ii");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLength, "GetLength", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetGroupID, "GetGroupID", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsArticulated, "IsArticulated", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetReliability, "GetReliability", 2, ".i");
SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i");
SQGSVehicle.PostRegister(engine);
}