summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_vehicle.hpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-07-10 22:30:38 +0000
committeryexo <yexo@openttd.org>2009-07-10 22:30:38 +0000
commitb58001f6956c9fb825d5b00b125349b221a71cd8 (patch)
tree28ea35f156838ccf6047d0f75065b0a728e5abd3 /src/ai/api/ai_vehicle.hpp
parent4843b3c45d7dac3dc3bde82b8b4b0cfd3c5924e1 (diff)
downloadopenttd-b58001f6956c9fb825d5b00b125349b221a71cd8.tar.xz
(svn r16790) -Add [NoAI]: AIVehicle::GetReliability to get the current reliability of vehicles
Diffstat (limited to 'src/ai/api/ai_vehicle.hpp')
-rw-r--r--src/ai/api/ai_vehicle.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp
index a93cb8026..8d7442104 100644
--- a/src/ai/api/ai_vehicle.hpp
+++ b/src/ai/api/ai_vehicle.hpp
@@ -525,6 +525,14 @@ public:
*/
static bool HasSharedOrders(VehicleID vehicle_id);
+ /**
+ * Get the current reliability of a vehicle.
+ * @param vehicle_id The vehicle to check.
+ * @pre IsValidVehicle(vehicle_id).
+ * @return The current reliability (0-100%).
+ */
+ static int GetReliability(VehicleID vehicle_id);
+
private:
/**
* Internal function used by SellWagon(Chain).