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); }
public void Load(ConfigNode node) { foreach (ConfigNode.Value val in node.values) { try { this[val.name] = (TValue)System.Convert.ChangeType(val.value, typeof(TValue)); } catch (Exception e) { StnSciScenario.LogException(e); this[val.name] = default(TValue); } } }
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); } } }
public void Load(ConfigNode node) { foreach (ConfigNode.Value val in node.values) { if (!this.ContainsKey(val.name)) { this[val.name] = new HashSet <TValue>(); } try { this[val.name].UnionWith(parse(val.value)); } catch (Exception e) { StnSciScenario.LogException(e); } } }
public void Save(ConfigNode node) { StnSciScenario.LogError("CNMap.Save called; not implemented"); }
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(); }