src/ai/api/ai_vehicle.cpp
branchnoai
changeset 9709 196a08fbfeb6
parent 9706 8d8f719a4e69
child 9711 c8b427215c9d
--- a/src/ai/api/ai_vehicle.cpp	Tue Oct 16 16:11:33 2007 +0000
+++ b/src/ai/api/ai_vehicle.cpp	Wed Oct 17 23:45:22 2007 +0000
@@ -172,6 +172,18 @@
 	}
 }
 
+bool AIVehicle::IsInDepot(VehicleID vehicle_id)
+{
+	if (!this->IsValidVehicle(vehicle_id)) return false;
+	return ::GetVehicle(vehicle_id)->IsInDepot();
+}
+
+bool AIVehicle::IsStoppedInDepot(VehicleID vehicle_id)
+{
+	if (!this->IsValidVehicle(vehicle_id)) return false;
+	return ::GetVehicle(vehicle_id)->IsStoppedInDepot();
+}
+
 bool AIVehicle::StartStopVehicle(VehicleID vehicle_id)
 {
 	if (!this->IsValidVehicle(vehicle_id)) return false;