Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6e2280a00 | |||
| 160f4f8370 | |||
| 4400418d30 | |||
| 43037b0a5b | |||
| afc831cf31 | |||
| 4ab54ee576 | |||
| d6842115c5 |
@@ -64,7 +64,15 @@ public class Entry {
|
||||
public static Entry? Parse(string journalline) {
|
||||
using (JsonReader reader = new JsonTextReader(new StringReader(journalline))) {
|
||||
reader.DateParseHandling = DateParseHandling.None;
|
||||
var json = JObject.Load(reader);
|
||||
JObject? json = null;
|
||||
try {
|
||||
json = JObject.Load(reader);
|
||||
} catch (Exception e) {
|
||||
throw new InvalidJournalEntryException(
|
||||
"invalid JSON journal entry: " + journalline,
|
||||
e
|
||||
);
|
||||
}
|
||||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
public class InvalidJournalEntryException : Exception {
|
||||
public InvalidJournalEntryException() { }
|
||||
public InvalidJournalEntryException(string message) : base(message) { }
|
||||
public InvalidJournalEntryException(string message, Exception inner) : base(message, inner) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,6 +17,11 @@ public class JournalFile : IComparable<JournalFile>
|
||||
private static Regex update11regex = new Regex("Journal\\.([^\\.]+)\\.(\\d+).log");
|
||||
private static string iso8601 = "yyyyMMddTHHmmss";
|
||||
|
||||
/// <summary>
|
||||
/// A public list of errors encountered while parsing the journal files
|
||||
/// </summary>
|
||||
public List<Exception> Errors { get; private set; } = new List<Exception>();
|
||||
|
||||
public static bool VerifyFile(string path) {
|
||||
string filename = Path.GetFileName(path);
|
||||
|
||||
@@ -125,15 +130,20 @@ public class JournalFile : IComparable<JournalFile>
|
||||
}
|
||||
|
||||
entries.Clear();
|
||||
Errors.Clear();
|
||||
foreach (var line in lines) {
|
||||
// Skip empty lines
|
||||
if (line.Trim().Length == 0) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
Entry? entry = Entry.Parse(line);
|
||||
if (entry != null) {
|
||||
entries.Add(entry);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Errors.Add(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,12 @@ public class PlayerJournal {
|
||||
ScanFiles();
|
||||
}
|
||||
|
||||
public List<Exception> AllErrors {
|
||||
get {
|
||||
return Files.SelectMany(x => x.Errors).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public List<JournalFile> Files {
|
||||
get { return journalfiles; }
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ public enum ThargoidVessel {
|
||||
/// Thargoid drone
|
||||
/// </summary>
|
||||
Revenant = 8,
|
||||
/// <summary>
|
||||
/// New thargoid drone in U17
|
||||
/// </summary>
|
||||
Banshee = 9,
|
||||
}
|
||||
|
||||
public class Thargoid {
|
||||
@@ -24,6 +28,8 @@ public class Thargoid {
|
||||
{ 25000, ThargoidVessel.Revenant },
|
||||
{ 65000, ThargoidVessel.Scout },
|
||||
{ 75000, ThargoidVessel.Scout },
|
||||
// New in Update 17
|
||||
{ 100000, ThargoidVessel.Banshee },
|
||||
// New in Update 15
|
||||
{ 4500000, ThargoidVessel.Hunter },
|
||||
{ 6500000, ThargoidVessel.Cyclops },
|
||||
@@ -47,7 +53,7 @@ public class Thargoid {
|
||||
};
|
||||
|
||||
public static Dictionary<ThargoidVessel, string?> VesselNames { get; } = new() {
|
||||
{ ThargoidVessel.Unknown, null },
|
||||
{ ThargoidVessel.Unknown, "(Unknown)" },
|
||||
{ ThargoidVessel.Revenant, "Revenant" },
|
||||
{ ThargoidVessel.Scout, "Scout" },
|
||||
{ ThargoidVessel.Orthrus, "Orthrus" },
|
||||
@@ -56,6 +62,7 @@ public class Thargoid {
|
||||
{ ThargoidVessel.Medusa, "Medusa" },
|
||||
{ ThargoidVessel.Hydra, "Hydra" },
|
||||
{ ThargoidVessel.Hunter, "Hunter" },
|
||||
{ ThargoidVessel.Banshee, "Banshee" },
|
||||
};
|
||||
|
||||
public static ThargoidVessel GetVesselByPayout(ulong payout) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<Version>0.3.5</Version>
|
||||
<Version>0.3.6</Version>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
|
||||
@@ -233,6 +233,12 @@ public partial class MainWindow : MetroWindow {
|
||||
|
||||
HandleEntries(entries, start, end);
|
||||
GenerateLog();
|
||||
|
||||
var errors = journal.AllErrors;
|
||||
foreach (var error in errors) {
|
||||
Log("An error has occured in the Journal file, please send this to CMDR Hekateh:");
|
||||
Log(error.ToString());
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
Log("Something went terribly wrong while parsing the E:D player journal.");
|
||||
Log("Please send this to CMDR Hekateh:");
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
@@ -51,5 +49,5 @@ using System.Windows;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.3.5.0")]
|
||||
[assembly: AssemblyFileVersion("0.3.5.0")]
|
||||
[assembly: AssemblyVersion("0.3.6.0")]
|
||||
[assembly: AssemblyFileVersion("0.3.6.0")]
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# EliteBGS changelog
|
||||
|
||||
# 0.3.6 on 25.10.2023
|
||||
|
||||
* U17 introduced invalid JSON into the player journal. EliteBGS can now skip over
|
||||
those and keep processing. This way players won't have to delete lines in their
|
||||
journals anymore to keep using the tool.
|
||||
* Banshee has been added.
|
||||
|
||||
## 0.3.5 on 11.09.2023
|
||||
|
||||
* Small bounty voucher formats are no longer suppressed.
|
||||
|
||||
@@ -20,13 +20,13 @@ command line:
|
||||
winget install Microsoft.DotNet.DesktopRuntime.7
|
||||
```
|
||||
|
||||
You can download the **latest** version **0.3.5** at CodeBerg:
|
||||
You can download the **latest** version **0.3.6** at CodeBerg:
|
||||
|
||||
* [https://codeberg.org/nola/EDBGS/releases](https://codeberg.org/nola/EDBGS/releases)
|
||||
|
||||
Or alternatively from my server:
|
||||
|
||||
* [https://bgs.n0la.org/elitebgs-0.3.5.zip](https://bgs.n0la.org/elitebgs-0.3.5.zip)
|
||||
* [https://bgs.n0la.org/elitebgs-0.3.6.zip](https://bgs.n0la.org/elitebgs-0.3.6.zip)
|
||||
|
||||
## Old Versions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user