public List <Vessel> GetResourceStockpiles()
        {
            List <Vessel> depots = LogisticsTools.GetNearbyVessels(LogisticsSetup.Instance.Config.ScavangeRange, false, vessel, true)
                                   .Where(dv => dv.FindPartModulesImplementing <USI_ModuleResourceWarehouse>().Any()).ToList();
            var nearbyVesselList = LogisticsTools.GetNearbyVessels(LogisticsTools.PHYSICS_RANGE, false, vessel, true);

            foreach (var v in nearbyVesselList)
            {
                var range = LogisticsTools.GetRange(vessel, v);
                var parts =
                    v.Parts.Where(
                        p => p.FindModuleImplementing <ModuleResourceDistributor>() != null && LogisticsTools.HasCrew(p, "Pilot"));
                foreach (var p in parts)
                {
                    var m = p.FindModuleImplementing <ModuleResourceDistributor>();
                    if (range <= m.ResourceDistributionRange)
                    {
                        //Now find ones adjacent to our depot.
                        List <Vessel> stockpiles = LogisticsTools.GetNearbyVessels(m.ResourceDistributionRange, false, vessel,
                                                                                   true).Where(sv => sv.FindPartModulesImplementing <USI_ModuleResourceWarehouse>().Any()).ToList();
                        foreach (var s in stockpiles)
                        {
                            if (!depots.Contains(s))
                            {
                                depots.Add(s);
                            }
                        }
                    }
                }
            }
            return(depots);
        }
        public List <Vessel> GetPowerDistributors()
        {
            var distributors  = new List <Vessel>();
            var nearbyVessels = LogisticsTools.GetNearbyVessels(LogisticsTools.PHYSICS_RANGE, false,
                                                                vessel, true);

            foreach (var v in nearbyVessels)
            {
                var range = LogisticsTools.GetRange(vessel, v);

                if (v.parts
                    .Select(p => p.FindModuleImplementing <ModulePowerDistributor>())
                    .Any(m => m != null && range <= m.ActiveDistributionRange))
                {
                    distributors.Add(v);
                }
            }
            return(distributors);
        }