Esempio n. 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);
            }
        }
Esempio n. 2
0
 public KCT_Recon_Rollout(KCT_BuildListVessel vessel, RolloutReconType type, string id)
 {
     RRType = type;
     associatedID = id;
     //BP = vessel.GetTotalMass() * KCT_GameStates.timeSettings.ReconditioningEffect * KCT_GameStates.timeSettings.OverallMultiplier; //1 day per 50 tons (default) * overall multiplier
     BP = KCT_MathParsing.GetStandardFormulaValue("Reconditioning", new Dictionary<string, string>() {{"M", vessel.GetTotalMass().ToString()}, {"O", KCT_GameStates.timeSettings.OverallMultiplier.ToString()},
         {"E", KCT_GameStates.timeSettings.ReconditioningEffect.ToString()}, {"X", KCT_GameStates.timeSettings.MaxReconditioning.ToString()}});
     //if (BP > KCT_GameStates.timeSettings.MaxReconditioning) BP = KCT_GameStates.timeSettings.MaxReconditioning;
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         BP *= (1 - KCT_GameStates.timeSettings.RolloutReconSplit);
         name = "LaunchPad Reconditioning";
     }
     else if (type == RolloutReconType.Rollout)
     {
         BP *= KCT_GameStates.timeSettings.RolloutReconSplit;
         name = "Vessel Rollout";
     }
     else if (type == RolloutReconType.Rollback)
     {
         BP *= KCT_GameStates.timeSettings.RolloutReconSplit;
         progress = BP;
         name = "Vessel Rollback";
     }
     else if (type == RolloutReconType.Recovery)
     {
         BP *= KCT_GameStates.timeSettings.RolloutReconSplit;
         name = "Vessel Recovery";
         double maxDist = SpaceCenter.Instance.cb.Radius * Math.PI;
         BP += BP * (vessel.DistanceFromKSC / maxDist);
     }
 }
Esempio n. 3
0
 public ReconRollout(Vessel vessel, RolloutReconType type, string id, string launchSite)
 {
     RRType       = type;
     AssociatedID = id;
     LaunchPadID  = launchSite;
     KCTDebug.Log("New recon_rollout at launchsite: " + LaunchPadID);
     Progress = 0;
     try
     {
         BP = MathParser.ParseReconditioningFormula(new BuildListVessel(vessel), true);
     }
     catch
     {
         KCTDebug.Log("Error while determining BP for recon_rollout");
     }
     if (type == RolloutReconType.Rollback)
     {
         Progress = BP;
     }
     else if (type == RolloutReconType.Recovery)
     {
         double KSCDistance = (float)SpaceCenter.Instance.GreatCircleDistance(SpaceCenter.Instance.cb.GetRelSurfaceNVector(vessel.latitude, vessel.longitude));
         double maxDist     = SpaceCenter.Instance.cb.Radius * Math.PI;
         BP += BP * (KSCDistance / maxDist);
     }
 }
Esempio n. 4
0
 public ReconRollout()
 {
     Progress     = 0;
     BP           = 0;
     Cost         = 0;
     RRType       = RolloutReconType.None;
     AssociatedID = "";
     LaunchPadID  = "LaunchPad";
 }
Esempio n. 5
0
 public void SwapRolloutType()
 {
     if (RRType == RolloutReconType.Rollout)
     {
         RRType = RolloutReconType.Rollback;
     }
     else if (RRType == RolloutReconType.Rollback)
     {
         RRType = RolloutReconType.Rollout;
     }
 }
Esempio n. 6
0
 public KCT_Recon_Rollout(KCT_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;
     }
     //BP = vessel.GetTotalMass() * KCT_GameStates.timeSettings.ReconditioningEffect * KCT_GameStates.timeSettings.OverallMultiplier; //1 day per 50 tons (default) * overall multiplier
     //BP = KCT_MathParsing.GetStandardFormulaValue("Reconditioning", new Dictionary<string, string>() {{"M", vessel.GetTotalMass().ToString()}, {"O", KCT_PresetManager.Instance.ActivePreset.timeSettings.OverallMultiplier.ToString()},
     //    {"E", KCT_PresetManager.Instance.ActivePreset.timeSettings.ReconditioningEffect.ToString()}, {"X", KCT_PresetManager.Instance.ActivePreset.timeSettings.MaxReconditioning.ToString()}});
     //if (BP > KCT_GameStates.timeSettings.MaxReconditioning) BP = KCT_GameStates.timeSettings.MaxReconditioning;
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(vessel, true);
         //BP *= (1 - KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit);
         name = "LaunchPad Reconditioning";
     }
     else if (type == RolloutReconType.Rollout)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(vessel, false);
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         name = "Vessel Rollout";
         cost = KCT_MathParsing.ParseRolloutCostFormula(vessel);
     }
     else if (type == RolloutReconType.Rollback)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(vessel, false);
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         progress = BP;
         name     = "Vessel Rollback";
     }
     else if (type == RolloutReconType.Recovery)
     {
         BP = KCT_MathParsing.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);
     }
 }
Esempio n. 7
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);
            }
        }
Esempio n. 8
0
 public KCT_Recon_Rollout(Vessel vessel, RolloutReconType type, string id, string launchSite)
 {
     RRType       = type;
     associatedID = id;
     launchPadID  = launchSite;
     KCTDebug.Log("New recon_rollout at launchsite: " + launchPadID);
     //BP = vessel.GetTotalMass() * KCT_GameStates.timeSettings.ReconditioningEffect * KCT_GameStates.timeSettings.OverallMultiplier; //1 day per 50 tons (default) * overall multiplier
     //BP = KCT_MathParsing.GetStandardFormulaValue("Reconditioning", new Dictionary<string, string>() {{"M", vessel.GetTotalMass().ToString()}, {"O", KCT_PresetManager.Instance.ActivePreset.timeSettings.OverallMultiplier.ToString()},
     //    {"E", KCT_PresetManager.Instance.ActivePreset.timeSettings.ReconditioningEffect.ToString()}, {"X", KCT_PresetManager.Instance.ActivePreset.timeSettings.MaxReconditioning.ToString()}});
     //if (BP > KCT_GameStates.timeSettings.MaxReconditioning) BP = KCT_GameStates.timeSettings.MaxReconditioning;
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), true);
         //BP *= (1 - KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit);
         name = "LaunchPad Reconditioning";
     }
     else if (type == RolloutReconType.Rollout)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         name = "Vessel Rollout";
     }
     else if (type == RolloutReconType.Rollback)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         name     = "Vessel Rollback";
         progress = BP;
     }
     else if (type == RolloutReconType.Recovery)
     {
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         BP   = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         name = "Vessel Recovery";
         double KSCDistance = (float)SpaceCenter.Instance.GreatCircleDistance(SpaceCenter.Instance.cb.GetRelSurfaceNVector(vessel.latitude, vessel.longitude));
         double maxDist     = SpaceCenter.Instance.cb.Radius * Math.PI;
         BP += BP * (KSCDistance / maxDist);
     }
 }
Esempio n. 9
0
 public KCT_Recon_Rollout(KCT_BuildListVessel vessel, RolloutReconType type, string id)
 {
     RRType       = type;
     associatedID = id;
     //BP = vessel.GetTotalMass() * KCT_GameStates.timeSettings.ReconditioningEffect * KCT_GameStates.timeSettings.OverallMultiplier; //1 day per 50 tons (default) * overall multiplier
     BP = KCT_MathParsing.GetStandardFormulaValue("Reconditioning", new Dictionary <string, string>()
     {
         { "M", vessel.GetTotalMass().ToString() }, { "O", KCT_GameStates.timeSettings.OverallMultiplier.ToString() },
         { "E", KCT_GameStates.timeSettings.ReconditioningEffect.ToString() }, { "X", KCT_GameStates.timeSettings.MaxReconditioning.ToString() }
     });
     //if (BP > KCT_GameStates.timeSettings.MaxReconditioning) BP = KCT_GameStates.timeSettings.MaxReconditioning;
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         BP  *= (1 - KCT_GameStates.timeSettings.RolloutReconSplit);
         name = "LaunchPad Reconditioning";
     }
     else if (type == RolloutReconType.Rollout)
     {
         BP  *= KCT_GameStates.timeSettings.RolloutReconSplit;
         name = "Vessel Rollout";
     }
     else if (type == RolloutReconType.Rollback)
     {
         BP      *= KCT_GameStates.timeSettings.RolloutReconSplit;
         progress = BP;
         name     = "Vessel Rollback";
     }
     else if (type == RolloutReconType.Recovery)
     {
         BP  *= KCT_GameStates.timeSettings.RolloutReconSplit;
         name = "Vessel Recovery";
         double maxDist = SpaceCenter.Instance.cb.Radius * Math.PI;
         BP += BP * (vessel.DistanceFromKSC / maxDist);
     }
 }
Esempio n. 10
0
 public KCT_Recon_Rollout(Vessel vessel, RolloutReconType type, string id, string launchSite)
 {
     RRType       = type;
     associatedID = id;
     launchPadID  = launchSite;
     KCTDebug.Log("New recon_rollout at launchsite: " + launchPadID);
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), true);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "LaunchPad Reconditioning";
         }
     }
     else if (type == RolloutReconType.Rollout)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "Vessel Rollout";
         }
     }
     else if (type == RolloutReconType.Rollback)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name     = "Vessel Rollback";
             progress = BP;
         }
     }
     else if (type == RolloutReconType.Recovery)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "Vessel Recovery";
             double KSCDistance = (float)SpaceCenter.Instance.GreatCircleDistance(SpaceCenter.Instance.cb.GetRelSurfaceNVector(vessel.latitude, vessel.longitude));
             double maxDist     = SpaceCenter.Instance.cb.Radius * Math.PI;
             BP += BP * (KSCDistance / maxDist);
         }
     }
 }
Esempio n. 11
0
 public void SwapRolloutType()
 {
     if (RRType == RolloutReconType.Rollout)
     {
         RRType = RolloutReconType.Rollback;
         name = "Vessel Rollback";
     }
     else if (RRType == RolloutReconType.Rollback)
     {
         RRType = RolloutReconType.Rollout;
         name = "Vessel Rollout";
     }
 }
Esempio n. 12
0
 public KCT_Recon_Rollout(Vessel vessel, RolloutReconType type, string id, string launchSite)
 {
     RRType = type;
     associatedID = id;
     launchPadID = launchSite;
     KCTDebug.Log("New recon_rollout at launchsite: " + launchPadID);
     //BP = vessel.GetTotalMass() * KCT_GameStates.timeSettings.ReconditioningEffect * KCT_GameStates.timeSettings.OverallMultiplier; //1 day per 50 tons (default) * overall multiplier
     //BP = KCT_MathParsing.GetStandardFormulaValue("Reconditioning", new Dictionary<string, string>() {{"M", vessel.GetTotalMass().ToString()}, {"O", KCT_PresetManager.Instance.ActivePreset.timeSettings.OverallMultiplier.ToString()},
     //    {"E", KCT_PresetManager.Instance.ActivePreset.timeSettings.ReconditioningEffect.ToString()}, {"X", KCT_PresetManager.Instance.ActivePreset.timeSettings.MaxReconditioning.ToString()}});
     //if (BP > KCT_GameStates.timeSettings.MaxReconditioning) BP = KCT_GameStates.timeSettings.MaxReconditioning;
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), true);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "LaunchPad Reconditioning";
         }
     }
     else if (type == RolloutReconType.Rollout)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "Vessel Rollout";
         }
     }
     else if (type == RolloutReconType.Rollback)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "Vessel Rollback";
             progress = BP;
         }
     }
     else if (type == RolloutReconType.Recovery)
     {
         try
         {
             BP = KCT_MathParsing.ParseReconditioningFormula(new KCT_BuildListVessel(vessel), false);
         }
         catch
         {
             KCTDebug.Log("Error while determining BP for recon_rollout");
         }
         finally
         {
             name = "Vessel Recovery";
             double KSCDistance = (float)SpaceCenter.Instance.GreatCircleDistance(SpaceCenter.Instance.cb.GetRelSurfaceNVector(vessel.latitude, vessel.longitude));
             double maxDist = SpaceCenter.Instance.cb.Radius * Math.PI;
             BP += BP * (KSCDistance / maxDist);
         }
     }
 }
Esempio n. 13
0
 public KCT_Recon_Rollout(KCT_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;
     //BP = vessel.GetTotalMass() * KCT_GameStates.timeSettings.ReconditioningEffect * KCT_GameStates.timeSettings.OverallMultiplier; //1 day per 50 tons (default) * overall multiplier
     //BP = KCT_MathParsing.GetStandardFormulaValue("Reconditioning", new Dictionary<string, string>() {{"M", vessel.GetTotalMass().ToString()}, {"O", KCT_PresetManager.Instance.ActivePreset.timeSettings.OverallMultiplier.ToString()},
     //    {"E", KCT_PresetManager.Instance.ActivePreset.timeSettings.ReconditioningEffect.ToString()}, {"X", KCT_PresetManager.Instance.ActivePreset.timeSettings.MaxReconditioning.ToString()}});
     //if (BP > KCT_GameStates.timeSettings.MaxReconditioning) BP = KCT_GameStates.timeSettings.MaxReconditioning;
     progress = 0;
     if (type == RolloutReconType.Reconditioning)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(vessel, true);
         //BP *= (1 - KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit);
         name = "LaunchPad Reconditioning";
     }
     else if (type == RolloutReconType.Rollout)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(vessel, false);
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         name = "Vessel Rollout";
         cost = KCT_MathParsing.ParseRolloutCostFormula(vessel);
     }
     else if (type == RolloutReconType.Rollback)
     {
         BP = KCT_MathParsing.ParseReconditioningFormula(vessel, false);
         //BP *= KCT_PresetManager.Instance.ActivePreset.timeSettings.RolloutReconSplit;
         progress = BP;
         name = "Vessel Rollback";
     }
     else if (type == RolloutReconType.Recovery)
     {
         BP = KCT_MathParsing.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);
     }
 }