Exemple #1
0
        private void LoadRoutineArrivalMissions()
        {
            if (_missions == null)
            {
                return;
            }

            if (_routineArrivalMissions == null)
            {
                _routineArrivalMissions = new List <RoutineArrivalMission>();
            }
            else
            {
                _routineArrivalMissions.Clear();
            }

            List <string> orders = RmmScenario.Instance.GetOrdersOfType(10);

            foreach (string orderId in orders)
            {
                RoutineArrivalMission routineArrivalMission = RoutineArrivalMission.AssembleRoutineMission <RoutineArrivalMission>(orderId, _missions);
                if (routineArrivalMission == null)
                {
                    continue;
                }
                _routineArrivalMissions.Add(routineArrivalMission);
            }
        }
Exemple #2
0
        public void RoutineDetail(string missiondId, IWindow parent = null)
        {
            CancelRoutineDetail();
            _routineDetailWindow = new RoutineDetailWindow(this);
            WindowManager.Open(_routineDetailWindow, parent: parent);

            RoutineArrivalMission routineArrivalMission = null;

            foreach (Mission mission in _missions)
            {
                if (mission.Info == null)
                {
                    continue;
                }
                if (mission.Info.Type != 10)
                {
                    continue;
                }
                if (mission.MissionId == missiondId)
                {
                    routineArrivalMission = RoutineMission.AssemblePotentialRoutineMission <RoutineArrivalMission>(mission);
                    if (!routineArrivalMission.AllowedLocation(FlightGlobals.ActiveVessel).CheckSucces)
                    {
                        continue;
                    }
                }
            }
            _routineDetailWindow.RoutineArrivalMission = routineArrivalMission;
        }
Exemple #3
0
        public void RoutineDetail(RoutineArrivalMission routineArrivalMission, IWindow parent = null)
        {
            CancelRoutineDetail();
            _routineDetailWindow = new RoutineDetailWindow(this);
            WindowManager.Open(_routineDetailWindow, parent: parent);

            _routineDetailWindow.RoutineArrivalMission = routineArrivalMission;
        }