示例#1
0
        private void LoadRoutineDepartureMissions()
        {
            if (_missions == null)
            {
                return;
            }

            if (_routineDepartureMissions == null)
            {
                _routineDepartureMissions = new List <RoutineDepartureMission>();
            }
            else
            {
                _routineDepartureMissions.Clear();
            }

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

            foreach (string orderId in orders)
            {
                RoutineDepartureMission routineDepartureMission = RoutineDepartureMission.AssembleRoutineMission <RoutineDepartureMission>(orderId, _missions);
                if (routineDepartureMission == null)
                {
                    continue;
                }
                _routineDepartureMissions.Add(routineDepartureMission);
            }
        }
示例#2
0
        public void RoutineDepartureDetail(string missiondId, uint flightIdDepartureDockPart, IWindow parent = null)
        {
            CancelRoutineDepartureDetail();
            _routineDepartureDetailWindow = new RoutineDepartureDetailWindow(this);
            WindowManager.Open(_routineDepartureDetailWindow, parent: parent);

            RoutineDepartureMission routineDepartureMission = null;

            foreach (Mission mission in _missions)
            {
                if (mission.Info == null)
                {
                    continue;
                }
                if (mission.Info.Type != 20)
                {
                    continue;
                }
                if (mission.MissionId == missiondId)
                {
                    routineDepartureMission = RoutineMission.AssemblePotentialRoutineMission <RoutineDepartureMission>(mission);
                    routineDepartureMission.flightIdDepartureDockPart = flightIdDepartureDockPart;
                    if (!routineDepartureMission.AllowedVessel(FlightGlobals.ActiveVessel).CheckSucces)
                    {
                        continue;
                    }
                }
            }
            _routineDepartureDetailWindow.RoutineDepartureMission = routineDepartureMission;
            _routineDepartureDetailWindow.DepartureParts          = RmmUtil.GetDockedParts(FlightGlobals.ActiveVessel, RmmUtil.GetDockedPart(FlightGlobals.ActiveVessel, RmmUtil.GetVesselPart(FlightGlobals.ActiveVessel, flightIdDepartureDockPart)));
        }
示例#3
0
        public void RoutineDepartureDetail(RoutineDepartureMission routineDepartureMission, IWindow parent = null)
        {
            CancelRoutineDepartureDetail();
            _routineDepartureDetailWindow = new RoutineDepartureDetailWindow(this);
            WindowManager.Open(_routineDepartureDetailWindow, parent: parent);

            _routineDepartureDetailWindow.RoutineDepartureMission = routineDepartureMission;
        }