From 9b5219c17bbf19c87b082ca79c6bcf8e20daffcf Mon Sep 17 00:00:00 2001 From: yexo Date: Mon, 14 Dec 2009 22:17:15 +0000 Subject: [PATCH] (svn r18504) -Remove [NoAI]: AIVehicle::SkipToVehicleOrder as it was a duplicate or AIOrder.SkipToOrder --- bin/ai/compat_0.7.nut | 5 +++++ src/ai/api/ai_changelog.hpp | 1 + src/ai/api/ai_vehicle.cpp | 5 ----- src/ai/api/ai_vehicle.hpp | 9 --------- src/ai/api/ai_vehicle.hpp.sq | 1 - 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut index 18f5a2a3a3..0cd8fe8d20 100644 --- a/bin/ai/compat_0.7.nut +++ b/bin/ai/compat_0.7.nut @@ -86,3 +86,8 @@ AIRail.RemoveRailStationTileRect <- function(tile, tile2) { return AIRail.RemoveRailStationTileRectangle(tile, tile2, false); } + +AIVehicle.SkipToVehicleOrder <- function(vehicle_id, order_position) +{ + return AIOrder.SkipToOrder(vehicle_id, order_position); +} diff --git a/src/ai/api/ai_changelog.hpp b/src/ai/api/ai_changelog.hpp index 61ce3d5a8e..309fa681d2 100644 --- a/src/ai/api/ai_changelog.hpp +++ b/src/ai/api/ai_changelog.hpp @@ -44,6 +44,7 @@ * \li AISubsidy::GetDestination, use AISubsidy::GetDestinationIndex instead * \li AITile::GetHeight, use AITile::GetMinHeight/GetMaxHeight/GetCornerHeight instead * \li AITown::GetMaxProduction, use AITown::GetLastMonthProduction instead + * \li AIVehicle::SkipToVehicleOrder, use AIOrder::SkipToOrder instead * \li AIWaypoint::WAYPOINT_INVALID, use AIBaseStation::STATION_INVALID instead * * Other changes: diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp index 91c3cf547d..c05f67909e 100644 --- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -193,11 +193,6 @@ return AIObject::DoCommand(0, vehicle_id, 0, CMD_START_STOP_VEHICLE); } -/* static */ bool AIVehicle::SkipToVehicleOrder(VehicleID vehicle_id, AIOrder::OrderPosition order_position) -{ - return AIOrder::SkipToOrder(vehicle_id, order_position); -} - /* static */ bool AIVehicle::ReverseVehicle(VehicleID vehicle_id) { EnforcePrecondition(false, IsValidVehicle(vehicle_id)); diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp index dfe056fe97..3e050b5706 100644 --- a/src/ai/api/ai_vehicle.hpp +++ b/src/ai/api/ai_vehicle.hpp @@ -459,15 +459,6 @@ public: */ static bool StartStopVehicle(VehicleID vehicle_id); - /** - * Skips the current order of the given vehicle. - * @param vehicle_id The vehicle to skip the order for. - * @param order_position The selected order to which we want to skip. - * @pre IsValidVehicleOrder(vehicle_id, order_position). - * @return True if and only if the order has been skipped. - */ - static bool SkipToVehicleOrder(VehicleID vehicle_id, AIOrder::OrderPosition order_position); - /** * Turn the given vehicle so it'll drive the other way. * @param vehicle_id The vehicle to turn. diff --git a/src/ai/api/ai_vehicle.hpp.sq b/src/ai/api/ai_vehicle.hpp.sq index 8f9f7586e7..edd28b0190 100644 --- a/src/ai/api/ai_vehicle.hpp.sq +++ b/src/ai/api/ai_vehicle.hpp.sq @@ -143,7 +143,6 @@ void SQAIVehicle_Register(Squirrel *engine) SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SendVehicleToDepot, "SendVehicleToDepot", 2, ".i"); SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SendVehicleToDepotForServicing, "SendVehicleToDepotForServicing", 2, ".i"); SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::StartStopVehicle, "StartStopVehicle", 2, ".i"); - SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SkipToVehicleOrder, "SkipToVehicleOrder", 3, ".ii"); SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::ReverseVehicle, "ReverseVehicle", 2, ".i"); SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetCapacity, "GetCapacity", 3, ".ii"); SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetLength, "GetLength", 2, ".i");