Skip to content

Commit

Permalink
1171
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbudda committed Oct 18, 2019
1 parent 986e407 commit ab684cb
Show file tree
Hide file tree
Showing 12 changed files with 177 additions and 157 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.7.1, 2019-10-18, KSP 1.8.0 #2686
- Fix impact marker rendering.
- Further improvements to handling old xml settings.

1.1.7.0, 2019-10-16, KSP 1.8.0 #2686
- Update to KSP 1.8, target .NET 4.
- Fix readout colors reverting to default on GUI size change.
Expand Down
Binary file added KerbalEngineer.dll
Binary file not shown.
5 changes: 3 additions & 2 deletions KerbalEngineer/Drawing/DebugDrawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ class DebugDrawing {

static Material _material;
static Material material {
get {
if (_material == null) _material = new Material(Shader.Find("Particles/Additive"));
get
{
if (_material == null) _material = new Material(Shader.Find("Legacy Shaders/Particles/Additive"));
return _material;
}
}
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.7.0";
public const string ASSEMBLY_VERSION = "1.1.7.1";

private static string assemblyFile;
private static string assemblyName;
Expand Down
4 changes: 2 additions & 2 deletions KerbalEngineer/Flight/FlightEngineerCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ void OnRenderObject() {
private void Start() {
try {
SectionLibrary.Load();
ReadoutLibrary.Reset();
MyLogger.Log("FlightEngineerCore->Start");
} catch (Exception ex) {
MyLogger.Exception(ex);
}
ReadoutLibrary.Reset();
MyLogger.Log("FlightEngineerCore->Start");
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion KerbalEngineer/Flight/Readouts/Miscellaneous/Separator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Separator()

public override void Draw(Unity.Flight.ISectionModule section)
{
GUILayout.Box("WHY THO", section.IsHud ? this.boxStyleHud : this.boxStyle);
GUILayout.Box("", section.IsHud ? this.boxStyleHud : this.boxStyle);
}

#endregion
Expand Down
19 changes: 17 additions & 2 deletions KerbalEngineer/Settings/SettingHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using System.Linq;
using System.Xml;
using System.Xml.Serialization;
using KSP.UI.Screens;

#endregion

Expand Down Expand Up @@ -200,7 +201,6 @@ public T GetSet<T>(string name, T defaultObject)
public void Save(string fileName)
{
fileName = Path.Combine(settingsDirectory, fileName);

this.Serialise(fileName);
}

Expand All @@ -227,6 +227,11 @@ private void Serialise(string fileName)
{
this.CreateDirectory(fileName);

//foreach (var i in Items)
//{
// MyLogger.Log("Name " + i.Name + " value " + i.Value.GetType());
//}

XmlWriterSettings xmlWriterSettings = new XmlWriterSettings {
Encoding = System.Text.Encoding.UTF8,
Indent = true
Expand Down Expand Up @@ -281,7 +286,17 @@ public static SettingHandler Load(string fileName, Type[] extraTypes = null)
{
fileName = Path.Combine(settingsDirectory, fileName);

return Deserialise(fileName, extraTypes);
var items = Deserialise(fileName, extraTypes);

for (var i = items.Items.Count - 1; i >= 0; i--) {
if (items.Items[i].Value is XmlNode[])
{
MyLogger.Log("fixed old or invalid setting: " + items.Items[i].Name);
items.Items[i].Value = items.Items[i].Value.ToString();
}
}

return items;
}

#endregion
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":7,
"BUILD":0
"BUILD":1
},
"KSP_VERSION":
{
Expand Down
296 changes: 148 additions & 148 deletions Output/KerbalEngineer/Settings/HelpStrings.xml

Large diffs are not rendered by default.

0 comments on commit ab684cb

Please sign in to comment.