75 * @pre AICargo::IsValidCargo(cargo) |
75 * @pre AICargo::IsValidCargo(cargo) |
76 * @pre you must own the vehicle |
76 * @pre you must own the vehicle |
77 * @pre the vehicle must be stopped in the depot |
77 * @pre the vehicle must be stopped in the depot |
78 * @return true if and only if the refit succeeded. |
78 * @return true if and only if the refit succeeded. |
79 */ |
79 */ |
80 bool RefitVehicle(VehicleID vehicle_id, CargoID cargo); |
80 static bool RefitVehicle(VehicleID vehicle_id, CargoID cargo); |
81 |
81 |
82 /** |
82 /** |
83 * Sells the given vehicle. |
83 * Sells the given vehicle. |
84 * @param vehicle_id the vehicle to sell. |
84 * @param vehicle_id the vehicle to sell. |
85 * @pre IsValidVehicle(vehicle_id). |
85 * @pre IsValidVehicle(vehicle_id). |
86 * @pre you must own the vehicle |
86 * @pre you must own the vehicle |
87 * @pre the vehicle must be stopped in the depot |
87 * @pre the vehicle must be stopped in the depot |
88 * @return true if and only if the vehicle has been sold. |
88 * @return true if and only if the vehicle has been sold. |
89 */ |
89 */ |
90 bool SellVehicle(VehicleID vehicle_id); |
90 static bool SellVehicle(VehicleID vehicle_id); |
91 |
91 |
92 /** |
92 /** |
93 * Sends the given vehicle to a depot. |
93 * Sends the given vehicle to a depot. |
94 * @param vehicle_id the vehicle to send to a depot. |
94 * @param vehicle_id the vehicle to send to a depot. |
95 * @pre IsValidVehicle(vehicle_id). |
95 * @pre IsValidVehicle(vehicle_id). |
96 * @return true if and only if the vehicle has been sent to a depot. |
96 * @return true if and only if the vehicle has been sent to a depot. |
97 */ |
97 */ |
98 bool SendVehicleToDepot(VehicleID vehicle_id); |
98 static bool SendVehicleToDepot(VehicleID vehicle_id); |
99 |
99 |
100 /** |
100 /** |
101 * Check if a vehicle is in a depot. |
101 * Check if a vehicle is in a depot. |
102 * @param vehicle_id the vehicle to check. |
102 * @param vehicle_id the vehicle to check. |
103 * @pre isValidVehicle(vehicle_id). |
103 * @pre isValidVehicle(vehicle_id). |
104 * @return true if and only if the vehicle is in a depot. |
104 * @return true if and only if the vehicle is in a depot. |
105 */ |
105 */ |
106 bool IsInDepot(VehicleID vehicle_id); |
106 static bool IsInDepot(VehicleID vehicle_id); |
107 |
107 |
108 /** |
108 /** |
109 * Check if a vehicle is in a depot and stopped. |
109 * Check if a vehicle is in a depot and stopped. |
110 * @param vehicle_id the vehicle to check. |
110 * @param vehicle_id the vehicle to check. |
111 * @pre isValidVehicle(vehicle_id). |
111 * @pre isValidVehicle(vehicle_id). |
112 * @return true if and only if the vehicle is in a depot and stopped. |
112 * @return true if and only if the vehicle is in a depot and stopped. |
113 */ |
113 */ |
114 bool IsStoppedInDepot(VehicleID vehicle_id); |
114 static bool IsStoppedInDepot(VehicleID vehicle_id); |
115 |
115 |
116 /** |
116 /** |
117 * Starts or stops the given vehicle depending on the current state. |
117 * Starts or stops the given vehicle depending on the current state. |
118 * @param vehicle_id the vehicle to start/stop. |
118 * @param vehicle_id the vehicle to start/stop. |
119 * @pre IsValidVehicle(vehicle_id). |
119 * @pre IsValidVehicle(vehicle_id). |
120 * @return true if and only if the vehicle has been started or stopped. |
120 * @return true if and only if the vehicle has been started or stopped. |
121 */ |
121 */ |
122 bool StartStopVehicle(VehicleID vehicle_id); |
122 static bool StartStopVehicle(VehicleID vehicle_id); |
123 |
123 |
124 /** |
124 /** |
125 * Skips the current order of the given vehicle. |
125 * Skips the current order of the given vehicle. |
126 * @param vehicle_id the vehicle to skip the order for. |
126 * @param vehicle_id the vehicle to skip the order for. |
127 * @param order_id the selected order to which we want to skip. |
127 * @param order_id the selected order to which we want to skip. |
128 * @pre IsValidVehicleOrder(vehicle_id, order_id). |
128 * @pre IsValidVehicleOrder(vehicle_id, order_id). |
129 * @return true if and only if the order has been skipped. |
129 * @return true if and only if the order has been skipped. |
130 */ |
130 */ |
131 bool SkipToVehicleOrder(VehicleID vehicle_id, uint32 order_id); |
131 static bool SkipToVehicleOrder(VehicleID vehicle_id, uint32 order_id); |
132 |
132 |
133 /** |
133 /** |
134 * Set the name of a vehicle. |
134 * Set the name of a vehicle. |
135 * @param vehicle_id the vehicle to set the name for. |
135 * @param vehicle_id the vehicle to set the name for. |
136 * @param name the name for the vehicle. |
136 * @param name the name for the vehicle. |
137 * @pre IsValidVehicle(vehicle_id). |
137 * @pre IsValidVehicle(vehicle_id). |
138 * @pre Name has to be unique. |
138 * @pre Name has to be unique. |
139 * @pre You have to own the vehicle. |
139 * @pre You have to own the vehicle. |
140 * @return true if and only if the name was changed. |
140 * @return true if and only if the name was changed. |
141 */ |
141 */ |
142 bool SetName(VehicleID vehicle_id, const char *name); |
142 static bool SetName(VehicleID vehicle_id, const char *name); |
143 |
143 |
144 /** |
144 /** |
145 * Get the current location of a vehicle. |
145 * Get the current location of a vehicle. |
146 * @param vehicle_id the vehicle to get the location of. |
146 * @param vehicle_id the vehicle to get the location of. |
147 * @pre IsValidVehicle(vehicle_id). |
147 * @pre IsValidVehicle(vehicle_id). |