diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:23 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:23 +0000 |
commit | 436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (patch) | |
tree | 8c96fbae532958e5cecfd0370387f26fcb837037 /src/script/api/script_vehicle.hpp | |
parent | 1616961ea2c1fa84c41d7df9af535fbb190d2c41 (diff) | |
download | openttd-436cf09923d881f3c11c8a4b6262c0a89ad1ee73.tar.xz |
(svn r23614) -Add: more API functions exposed to NoGo (part 1)
Diffstat (limited to 'src/script/api/script_vehicle.hpp')
-rw-r--r-- | src/script/api/script_vehicle.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp index 18b9e4314..4d0debb4a 100644 --- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -16,7 +16,7 @@ /** * Class that handles all vehicle related functions. - * @api ai + * @api ai game */ class ScriptVehicle : public ScriptObject { public: @@ -119,6 +119,7 @@ public: * @pre 'name' must have at most 30 characters. * @exception ScriptError::ERR_NAME_IS_NOT_UNIQUE * @return True if and only if the name was changed. + * @api -game */ static bool SetName(VehicleID vehicle_id, const char *name); @@ -307,6 +308,7 @@ public: * @note In Test Mode it means you can't assign orders yet to this vehicle, * as the vehicle isn't really built yet. Build it for real first before * assigning orders. + * @api -game */ static VehicleID BuildVehicle(TileIndex depot, EngineID engine_id); @@ -323,6 +325,7 @@ public: * @return The VehicleID of the new vehicle, or an invalid VehicleID when * it failed. Check the return value using IsValidVehicle. In test-mode * 0 is returned if it was successful; any other value indicates failure. + * @api -game */ static VehicleID CloneVehicle(TileIndex depot, VehicleID vehicle_id, bool share_orders); @@ -338,6 +341,7 @@ public: * @pre GetVehicleType(source_vehicle_id) == VT_RAIL. * @pre dest_vehicle_id == -1 || GetVehicleType(dest_vehicle_id) == VT_RAIL. * @return Whether or not moving the wagon succeeded. + * @api -game */ static bool MoveWagon(VehicleID source_vehicle_id, int source_wagon, int dest_vehicle_id, int dest_wagon); @@ -353,6 +357,7 @@ public: * @pre GetVehicleType(source_vehicle_id) == VT_RAIL. * @pre dest_vehicle_id == -1 || GetVehicleType(dest_vehicle_id) == VT_RAIL. * @return Whether or not moving the wagons succeeded. + * @api -game */ static bool MoveWagonChain(VehicleID source_vehicle_id, int source_wagon, int dest_vehicle_id, int dest_wagon); @@ -380,6 +385,7 @@ public: * @exception ScriptVehicle::ERR_VEHICLE_IS_DESTROYED * @exception ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT * @return True if and only if the refit succeeded. + * @api -game */ static bool RefitVehicle(VehicleID vehicle_id, CargoID cargo); @@ -392,6 +398,7 @@ public: * @exception ScriptVehicle::ERR_VEHICLE_IS_DESTROYED * @exception ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT * @return True if and only if the vehicle has been sold. + * @api -game */ static bool SellVehicle(VehicleID vehicle_id); @@ -406,6 +413,7 @@ public: * @exception ScriptVehicle::ERR_VEHICLE_IS_DESTROYED * @exception ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT * @return True if and only if the wagon has been sold. + * @api -game */ static bool SellWagon(VehicleID vehicle_id, int wagon); @@ -420,6 +428,7 @@ public: * @exception ScriptVehicle::ERR_VEHICLE_IS_DESTROYED * @exception ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT * @return True if and only if the wagons have been sold. + * @api -game */ static bool SellWagonChain(VehicleID vehicle_id, int wagon); @@ -430,6 +439,7 @@ public: * @pre IsValidVehicle(vehicle_id). * @exception ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT * @return True if the current order was changed. + * @api -game */ static bool SendVehicleToDepot(VehicleID vehicle_id); @@ -440,6 +450,7 @@ public: * @pre IsValidVehicle(vehicle_id). * @exception ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT * @return True if the current order was changed. + * @api -game */ static bool SendVehicleToDepotForServicing(VehicleID vehicle_id); @@ -451,6 +462,7 @@ public: * @exception (For aircraft only): ScriptVehicle::ERR_VEHICLE_IN_FLIGHT * @exception (For trains only): ScriptVehicle::ERR_VEHICLE_NO_POWER * @return True if and only if the vehicle has been started or stopped. + * @api -game */ static bool StartStopVehicle(VehicleID vehicle_id); @@ -462,6 +474,7 @@ public: * @return True if and only if the vehicle has started to turn. * @note Vehicles cannot always be reversed. For example busses and trucks need to be running * and not be inside a depot. + * @api -game */ static bool ReverseVehicle(VehicleID vehicle_id); |