Skip to content

Commit

Permalink
1157
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Jan 15, 2019
1 parent a6a3ccf commit 29cf9af
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 13 deletions.
Binary file modified Assets/Plugins/KerbalEngineer.Unity.dll
Binary file not shown.
5 changes: 5 additions & 0 deletions Documents/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.1.5.7, 2018-1-14, KSP 1.6.1 #2401
- Fix Impact Marker showing while on EVA and KER overlay isn't available due to career limitations.
- Add readout for throttle % to Vessel readouts.
- Merge some pull requests.

1.1.5.6, 2018-1-8, KSP 1.6.0 #2395
- Fix missing part data causing VAB filters to break.

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.6";
public const string ASSEMBLY_VERSION = "1.1.5.7";

private static string assemblyFile;
private static string assemblyName;
Expand Down
6 changes: 3 additions & 3 deletions KerbalEngineer/Flight/FlightEngineerCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,17 +351,17 @@ private void Update() {
}

try {
SectionLibrary.Update();
this.UpdateModules();

markerDeadman -= 1; //this makes sure the impact marker disappears if the impact marker readout is no longer updating for any reason.
if (markerDeadman <= 0) {
markerDeadman = 0;
Flight.Readouts.Surface.ImpactProcessor.ShowMarker = false;
} else {
Flight.Readouts.Surface.ImpactProcessor.ShowMarker = true;
Flight.Readouts.Surface.ImpactProcessor.ShowMarker = IsDisplayable;
}

SectionLibrary.Update();
this.UpdateModules();
} catch (Exception ex) {
MyLogger.Exception(ex);
}
Expand Down
1 change: 1 addition & 0 deletions KerbalEngineer/Flight/Readouts/ReadoutLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ static ReadoutLibrary() {
readouts.Add(new IntakeAirSupply());
readouts.Add(new IntakeAirDemandSupply());
readouts.Add(new PartCount());
readouts.Add(new Throttle());
readouts.Add(new Heading());
readouts.Add(new Pitch());
readouts.Add(new Roll());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,13 @@ public void Update() {
UtilMath.SwapValues(ref num5, ref num6);
UtilMath.SwapValues(ref eVs, ref eVs2);
}

}

if (tOne > originOrbit.StartUT) {
if (tOne > originOrbit.StartUT) {
TimeTilEncounter = tOne - originOrbit.StartUT;
SeparationAtEncounter = (originOrbit.getPositionAtUT(tOne) - targetOrbit.getPositionAtUT(tOne)).magnitude;
SpeedAtEncounter = Math.Abs(originOrbit.getOrbitalSpeedAt(tOne) - targetOrbit.getOrbitalSpeedAt(tOne));
}
}

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class SeparationAtClosestApproach : ReadoutModule {
#region Constructors

public SeparationAtClosestApproach() {
this.Name = "Separation at Encounter";
this.Name = "Separation at Approach";
this.Category = ReadoutCategory.GetCategory("Rendezvous");
this.HelpString = "Distance to the target at closest approach.";
this.IsDefault = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class SpeedAtClosestApproach : ReadoutModule

public SpeedAtClosestApproach()
{
this.Name = "Rel. Speed at Encounter";
this.Name = "Rel. Speed at Approach";
this.Category = ReadoutCategory.GetCategory("Rendezvous");
this.HelpString = "Shows the difference in orbital speed between your vessel and the target object at the next encounter.";
this.HelpString = "Shows the difference in orbital speed between your vessel and the target object at the next closest approach.";
this.IsDefault = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class TimeTilClosestApproach : ReadoutModule

public TimeTilClosestApproach()
{
this.Name = "Time til Encounter";
this.Name = "Time til Approach";
this.Category = ReadoutCategory.GetCategory("Rendezvous");
this.HelpString = "Time until the next closest approach to the target.";
this.IsDefault = false;
Expand Down
64 changes: 64 additions & 0 deletions KerbalEngineer/Flight/Readouts/Vessel/Throttle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// Kerbal Engineer Redux
//
// Copyright (C) 2014 CYBUTEK
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

#region Using Directives

using KerbalEngineer.Flight.Sections;
using KerbalEngineer.Helpers;

#endregion

namespace KerbalEngineer.Flight.Readouts.Vessel
{
public class Throttle : ReadoutModule
{
#region Constructors

public Throttle()
{
this.Name = "Throttle";
this.Category = ReadoutCategory.GetCategory("Vessel");
this.HelpString = "Shows the current requested throttle %. ";
this.IsDefault = false;
}

#endregion

#region Methods: public

public override void Draw(Unity.Flight.ISectionModule section)
{
if (SimulationProcessor.ShowDetails)
{
this.DrawLine(FlightInputHandler.state.mainThrottle.ToString("0%"), section.IsHud);
}
}

public override void Reset()
{
}

public override void Update()
{
SimulationProcessor.RequestUpdate();
}

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

0 comments on commit 29cf9af

Please sign in to comment.