src/ai/api/ai_vehicle.cpp
branchnoai
changeset 9709 196a08fbfeb6
parent 9706 8d8f719a4e69
child 9711 c8b427215c9d
equal deleted inserted replaced
9708:a63a756fd080 9709:196a08fbfeb6
   170 		case VEH_AIRCRAFT: return this->DoCommand(0, vehicle_id, 0, CMD_SEND_AIRCRAFT_TO_HANGAR);
   170 		case VEH_AIRCRAFT: return this->DoCommand(0, vehicle_id, 0, CMD_SEND_AIRCRAFT_TO_HANGAR);
   171 		default: return false;
   171 		default: return false;
   172 	}
   172 	}
   173 }
   173 }
   174 
   174 
       
   175 bool AIVehicle::IsInDepot(VehicleID vehicle_id)
       
   176 {
       
   177 	if (!this->IsValidVehicle(vehicle_id)) return false;
       
   178 	return ::GetVehicle(vehicle_id)->IsInDepot();
       
   179 }
       
   180 
       
   181 bool AIVehicle::IsStoppedInDepot(VehicleID vehicle_id)
       
   182 {
       
   183 	if (!this->IsValidVehicle(vehicle_id)) return false;
       
   184 	return ::GetVehicle(vehicle_id)->IsStoppedInDepot();
       
   185 }
       
   186 
   175 bool AIVehicle::StartStopVehicle(VehicleID vehicle_id)
   187 bool AIVehicle::StartStopVehicle(VehicleID vehicle_id)
   176 {
   188 {
   177 	if (!this->IsValidVehicle(vehicle_id)) return false;
   189 	if (!this->IsValidVehicle(vehicle_id)) return false;
   178 
   190 
   179 	switch (::GetVehicle(vehicle_id)->type) {
   191 	switch (::GetVehicle(vehicle_id)->type) {