src/ai/api/ai_vehicle.hpp
branchnoai
changeset 9699 e1b5f29cc6f9
parent 9691 1231d4e5f5aa
child 9706 8d8f719a4e69
--- a/src/ai/api/ai_vehicle.hpp	Sun Aug 19 13:31:04 2007 +0000
+++ b/src/ai/api/ai_vehicle.hpp	Sun Aug 19 13:43:59 2007 +0000
@@ -138,7 +138,6 @@
 	 */
 	bool SellVehicle(VehicleID vehicle_id);
 
-
 	/**
 	 * Sends the given vehicle to a depot.
 	 * @param vehicle_id the vehicle to send to a depot.
@@ -164,6 +163,17 @@
 	bool SkipVehicleOrder(VehicleID vehicle_id);
 
 	/**
+	 * Set the name of a vehicle.
+	 * @param vehicle_id the vehicle to set the name for.
+	 * @param name the name for the vehicle.
+	 * @pre IsValidVehicle(vehicle_id).
+	 * @pre Name has to be unique.
+	 * @pre You have to own the vehicle.
+	 * @return true if and only if the name was changed.
+	 */
+	bool SetName(VehicleID vehicle_id, const char *name);
+
+	/**
 	 * Get the current location of a vehicle.
 	 * @param vehicle_id the vehicle to get the location of.
 	 * @pre IsValidVehicle(vehicle_id).
@@ -188,6 +198,14 @@
 	static int32 GetUnitNumber(VehicleID vehicle_id);
 
 	/**
+	 * Get the name of a vehicle.
+	 * @param vehicle_id the vehicle to get the unitnumber of.
+	 * @pre IsValidVehicle(vehicle_id).
+	 * @return the name the vehicle has.
+	 */
+	static char *GetName(VehicleID vehicle_id);
+
+	/**
 	 * Get the current age of a vehicle.
 	 * @note age is in days.
 	 * @param vehicle_id the vehicle to get the age of.