Skip to content

Commit

Permalink
5.1, bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jun 3, 2018
1 parent 65c7dbd commit c007db7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 15 deletions.
Binary file modified Assets/Plugins/KerbalEngineer.Unity.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions Documents/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.5.1, 2018-6-2, KSP 1.4.3 #2152
- Fix Target Selector and post-burn-relative-inclicnation not updating if they were the only rendezvous readouts showing.
- Fix error in tracking station.

1.1.5.0, 2018-6-1, KSP 1.4.3 #2152
- You can now set custom colors for all readout values. These are stored in ReadoutsConfig.xml which you can delete if something goes horribly awry.
- Added readouts: post-burn eccentricity, post-burn relative inclination, dynamic pressure.
Expand Down
2 changes: 1 addition & 1 deletion KerbalEngineer/EngineerGlobals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class EngineerGlobals
/// <summary>
/// Current version of the Kerbal Engineer assembly.
/// </summary>
public const string ASSEMBLY_VERSION = "1.1.5.0";
public const string ASSEMBLY_VERSION = "1.1.5.1";

private static string assemblyFile;
private static string assemblyName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ public void Update() {

ITargetable target = null;
global::Vessel vessel = null;

landedSamePlanet = false;
isLanded = false;
overrideANDN = false;
overrideANDNRev = false;

if (HighLogic.LoadedSceneIsFlight) {
if (FlightGlobals.fetch == null ||
FlightGlobals.fetch.VesselTarget == null ||
Expand Down Expand Up @@ -400,7 +404,7 @@ public void Update() {



if (FlightGlobals.ActiveVessel.patchedConicSolver == null ||
if (FlightGlobals.ActiveVessel == null || FlightGlobals.ActiveVessel.patchedConicSolver == null ||
FlightGlobals.ActiveVessel.patchedConicSolver.maneuverNodes == null ||
FlightGlobals.ActiveVessel.patchedConicSolver.maneuverNodes.Count == 0) {
} else {
Expand Down
28 changes: 17 additions & 11 deletions KerbalEngineer/Flight/Readouts/Rendezvous/TargetSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,24 @@ private void DrawTarget(Unity.Flight.ISectionModule section) {

this.DrawLine("Selected Target", RendezvousProcessor.nameForTargetable(target), section.IsHud);

if (RendezvousProcessor.sourceDisplay != null) {
if (RendezvousProcessor.landedSamePlanet || RendezvousProcessor.overrideANDN)
this.DrawLine("Ref Orbit", "Landed on " + RendezvousProcessor.activeVessel.GetOrbit().referenceBody.GetName(), section.IsHud);
else
this.DrawLine("Ref Orbit", RendezvousProcessor.sourceDisplay, section.IsHud);
}
try {

if (RendezvousProcessor.sourceDisplay != null) {
if (RendezvousProcessor.landedSamePlanet || RendezvousProcessor.overrideANDN)
this.DrawLine("Ref Orbit", "Landed on " + RendezvousProcessor.activeVessel.GetOrbit().referenceBody.GetName(), section.IsHud);
else
this.DrawLine("Ref Orbit", RendezvousProcessor.sourceDisplay, section.IsHud);
}

if (RendezvousProcessor.targetDisplay != null) {
if (RendezvousProcessor.landedSamePlanet || RendezvousProcessor.overrideANDNRev)
this.DrawLine("Target Orbit", "Landed on " + target.GetOrbit().referenceBody.GetName(), section.IsHud);
else
this.DrawLine("Target Orbit", RendezvousProcessor.targetDisplay, section.IsHud);
}

if (RendezvousProcessor.targetDisplay != null) {
if (RendezvousProcessor.landedSamePlanet || RendezvousProcessor.overrideANDNRev)
this.DrawLine("Target Orbit", "Landed on " + target.GetOrbit().referenceBody.GetName(), section.IsHud);
else
this.DrawLine("Target Orbit", RendezvousProcessor.targetDisplay, section.IsHud);
} catch (System.Exception) {
Debug.Log(" target " + target + " " + RendezvousProcessor.activeVessel + " " + target.GetOrbit() + " " + RendezvousProcessor.overrideANDN + " " + RendezvousProcessor.overrideANDNRev + " " + RendezvousProcessor.landedSamePlanet);
}

}
Expand Down
Binary file modified Output/KerbalEngineer/KerbalEngineer.Unity.dll
Binary file not shown.
Binary file modified Output/KerbalEngineer/KerbalEngineer.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion Output/KerbalEngineer/KerbalEngineer.version
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"MAJOR":1,
"MINOR":1,
"PATCH":5,
"BUILD":0
"BUILD":1
},
"KSP_VERSION":
{
Expand Down

0 comments on commit c007db7

Please sign in to comment.