예제 #1
0
        private void setupStations()
        {
            IOrderedEnumerable <Station> stations = Stations.OrderBy(s => s.Distance);

            Station_BestOrbitalLarge  = null;
            Station_BestOrbitalMedium = null;
            Station_BestPlanetary     = null;
            Station_MaterialTrader    = null;
            foreach (var station in stations)
            {
                station.CurrentSystem = this;
                if (station.HasMaterialTrader)
                {
                    Station_MaterialTrader = station;
                }
                if (Station_BestPlanetary == null && station.RelevantType == RelevantStationType.Planetary)
                {
                    Station_BestPlanetary = station;
                }
                else if (Station_BestOrbitalLarge == null && station.RelevantType == RelevantStationType.OrbitalLarge)
                {
                    Station_BestOrbitalLarge = station;
                }
                else if (Station_BestOrbitalMedium == null && station.RelevantType == RelevantStationType.OrbitalMedium)
                {
                    Station_BestOrbitalMedium = station;
                }
            }
        }
예제 #2
0
파일: Route.cs 프로젝트: fadoe/FPLedit
 public List <Station> GetOrderedStations()
 => Stations.OrderBy(s => s.Positions.GetPosition(Index)).ToList();