public static bool CheckBoring(Vessel vessel, bool msg = false)
 {
     //print(vessel.Landed + ", " + vessel.landedAt + ", " + vessel.launchTime + ", " + vessel.situation + ", " + vessel.orbit.referenceBody.name);
     if ((vessel.orbit.referenceBody.name == "Kerbin") && (vessel.situation == Vessel.Situations.LANDED || vessel.situation == Vessel.Situations.PRELAUNCH || vessel.situation == Vessel.Situations.SPLASHED || vessel.altitude <= vessel.orbit.referenceBody.atmosphereDepth))
     {
         StnSciScenario.Log("in boring place");
         if (msg)
         {
             ScreenMessages.PostScreenMessage(Localizer.Format("#autoLOC_StatSci_screen_boring"), 6, ScreenMessageStyle.UPPER_CENTER);
         }
         return(true);
     }
     return(false);
 }
示例#2
0
 public StnSciScenario()
 {
     Instance = this;
     if (settings == null)
     {
         settings = new StnSciSettings();
         foreach (ConfigNode node in GameDatabase.Instance.GetConfigNodes("STN_SCI_SETTINGS"))
         {
             if (!ConfigNode.LoadObjectFromConfig(settings, node))
             {
                 StnSciScenario.Log("Station Science: failed to load settings");
             }
             settings.Load(node);
         }
     }
 }
示例#3
0
 public float calcReward(float value, bool first_time = false)
 {
     StnSciScenario.Log("calcReward: " + y_intercept + " + " + value + " * " + slope + " * ( " + first_time + " ? " + first_time_multiplier + ")");
     return((y_intercept + value * slope) * (first_time ? first_time_multiplier : 1));
 }
 public void StartExpAction(KSPActionParam p)
 {
     StnSciScenario.Log("in startExperiment(arg)");
     StartExperiment();
 }