示例#1
0
        public ReconRollout(BuildListVessel vessel, RolloutReconType type, string id, string launchSite = "")
        {
            RRType       = type;
            AssociatedID = id;
            LaunchPadID  = string.IsNullOrEmpty(launchSite) ? vessel.LaunchSite : launchSite;   //For when we add custom launchpads
            Progress     = 0;
            BP           = MathParser.ParseReconditioningFormula(vessel, true);
            //if (type != RolloutReconType.Reconditioning)
            //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;

            if (type == RolloutReconType.Reconditioning)
            {
                //BP *= (1 - KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit);
            }
            else if (type == RolloutReconType.Rollout)
            {
                Cost = MathParser.ParseRolloutCostFormula(vessel);
            }
            else if (type == RolloutReconType.Rollback)
            {
                Progress = BP;
            }
            else if (type == RolloutReconType.Recovery)
            {
                double maxDist = SpaceCenter.Instance.cb.Radius * Math.PI;
                BP += BP * (vessel.DistanceFromKSC / maxDist);
            }
        }
示例#2
0
        public ReconRollout(BuildListVessel vessel, RolloutReconType type, string id, string launchSite = "")
        {
            RRType       = type;
            AssociatedID = id;
            if (launchSite != "") //For when we add custom launchpads
            {
                LaunchPadID = launchSite;
            }
            else
            {
                LaunchPadID = vessel.LaunchSite;
            }

            Progress = 0;
            if (type == RolloutReconType.Reconditioning)
            {
                BP = MathParser.ParseReconditioningFormula(vessel, true);
                //BP *= (1 - KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit);
                Name = "LaunchPad Reconditioning";
            }
            else if (type == RolloutReconType.Rollout)
            {
                BP = MathParser.ParseReconditioningFormula(vessel, false);
                //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
                Name = "Vessel Rollout";
                Cost = MathParser.ParseRolloutCostFormula(vessel);
            }
            else if (type == RolloutReconType.Rollback)
            {
                BP = MathParser.ParseReconditioningFormula(vessel, false);
                //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
                Progress = BP;
                Name     = "Vessel Rollback";
            }
            else if (type == RolloutReconType.Recovery)
            {
                BP = MathParser.ParseReconditioningFormula(vessel, false);
                //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
                Name = "Vessel Recovery";
                double maxDist = SpaceCenter.Instance.cb.Radius * Math.PI;
                BP += BP * (vessel.DistanceFromKSC / maxDist);
            }
        }