Jump to content

linuxgurugamer

Bug Hunter
  • Posts

    24,914
  • Joined

  • Last visited

Everything posted by linuxgurugamer

  1. You need to update SpaceDock, it's still at 0.2
  2. That's not true plywood, it's a pressboard. But it works Since this involves copying a couple of Squad files, I've asked for permission
  3. New release, 1.3.9: Merged patch from @eberkain updating tweakscale cfg Merged patch from StahnAileron fixing the rcsJet cfg to use EC and adjusting the stats Thank you all for the help
  4. No, variable sweep wing is a different issue, in that the wing is always there. From KSP's point of view, the COL is what changes, not the lift. New release 0.1.3: Added easing in of control surface after animation finishes. Ease-in is over a period of 1 second
  5. I've just updated the RetractableLiftingSurface to now ease in the control surface over a range of 1 second once the wing animation is done While I haven't tested, it should work as long as you use either one or the other. I don't know how they will work together, it's something on the roadmap. First I'll need to decide what should happen if you happen to want to use both in a single launch, not a trivial question Fixed, check the thread
  6. No resolution. and there won't be for a little while. Once 1.3 drops, I'll be updating all my mods, and will be looking at this at that time. Sorry about the delay
  7. New Release, 1.4.3.2: Fixed build environment (was building for .net 4) Fixed EVA fuel not being used Fixed EVA fuels being preserved when entering vessel which doesn't have storage Please test and let me know if you see any problems
  8. If you could post the cfg, I'll get it merged tomorrow.
  9. It's taken a bit longer to fix than I thought. I just finished, but haven't had time to do a full test. I hope to get it out by tomorrow eve at the latest.
  10. Good description, I'm adding it right now
  11. If you know C, you should be able to pick up c#. I'd suggest trying it, and ask for help when you need it
  12. Thanks. I'm busy debugging another mod, so am relying on you guys for this
  13. I'm having a very strange problem with onVesselSwitching event. So, to start, here is a class I use for logging: namespace EvaFuel { public static class Log { public enum LEVEL { OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DETAIL = 4, TRACE = 5 }; static string PREFIX = "EVAFuel: "; [ConditionalAttribute("DEBUG")] public static void Info(String msg) { if (IsLogable(LEVEL.INFO)) { UnityEngine.Debug.Log(PREFIX + msg); } } This is the beginning of the class with the problems: [KSPAddon(KSPAddon.Startup.SpaceCentre, true)] public class EvaFuelManager : MonoBehaviour { private void Start() { Log.Info("Start"); DontDestroyOnLoad(this); } public void Awake() { Log.Info("Awake"); GameEvents.onVesselSwitching.Add(this.onVesselSwitching); } And here is where I'm having problems: void mylog(string s) { // Set a variable to the My Documents path. string mydocpath = @"R:\tmplog.txt"; System.IO.StreamWriter sw = System.IO.File.AppendText(mydocpath); try { string logLine = System.String.Format( "{0:G}: {1}.", System.DateTime.Now, s); sw.WriteLine(logLine); } finally { sw.Close(); } } public string resourceName { get { return HighLogic.CurrentGame.Parameters.CustomParams<EVAFuelSettings>().EvaPropellantName; } } private void onVesselSwitching(Vessel from, Vessel to) { mylog("onVesselSwitching"); Log.Info("onVesselSwitching"); if (to == null || from == null) { Log.Info("to or from are null"); return; } mylog("onVesselSwitching 1"); Log.Info("onVesselSwitching 1"); if (lastPart == null) return; mylog("lastPart not null: " + lastPart.partInfo.title); Log.Info("lastPart not null: " + lastPart.partInfo.title); mylog("onVesselSwitching 2"); Log.Info("onVesselSwitching 2"); mylog("onVesselSwitching: from: " + from.Parts.First().partInfo.title + " to: " + to.Parts.First().partInfo.title); Log.Info("onVesselSwitching: from: " + from.Parts.First().partInfo.title + " to: " + to.Parts.First().partInfo.title); Log.Info("lastPart == data.to"); KerbalEVA kEVA = to.Parts.First().FindModuleImplementing<KerbalEVA>(); if (to.parts == null || to.parts.Count == 0) return; if (from.parts == null || from.parts.Count == 0) return; PartResource kerbalResource = null; PartResource shipResource = null; // When the following return is here (or the following two lines are commented out) no errors. return; kerbalResource = to.parts.First().Resources.Where(p => p.resourceName == resourceName).First(); shipResource = from.parts.First().Resources.Where(p => p.resourceName == resourceName).First(); } What is strange is that I'm getting an error if the last two lines are there, but no error if commented out. The strange part is that NONE of those logging statements are executed when the error occurs, but when the lines are commented out, the logging statements work. Additional strangeness is that if I have a return in front of those lines, no error happens. Originally, those two lines were using: to.Parts from.Parts I added that "mylog" function because I was thinking that there may have been a race condition, and that writing directly to a file would at least show it's being called. I even tried adding a try/catch around those two lines, but didn't make any difference. When I run with the two lines disabled, I see the following: EVAFuel: onVesselSwitching (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42) EVAFuel: to or from are null When not disabled, the error: Exception handling event onVesselSwitching in class EvaFuelManager:System.TypeLoadException: Could not load type 'System.Func`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. at EventData`2[Vessel,Vessel].Fire (.Vessel data0, .Vessel data1) [0x00000] in <filename unknown>:0 (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42) TypeLoadException: Could not load type 'System.Func`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. at EventData`2[Vessel,Vessel].Fire (.Vessel data0, .Vessel data1) [0x00000] in <filename unknown>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) EventData`2:Fire(Vessel, Vessel) FlightGlobals:setActiveVessel(Vessel, Boolean) FlightGlobals:SetActiveVessel(Vessel) FlightDriver:Start()
×
×
  • Create New...