handle mission abandoned

This commit is contained in:
Florian Stinglmayr 2021-08-27 20:05:31 +02:00
parent ab424b5115
commit 7e66691d66
4 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,7 @@ namespace EDJournal {
private static readonly Dictionary<string, Type> classes = new Dictionary<string, Type> { private static readonly Dictionary<string, Type> classes = new Dictionary<string, Type> {
{ Events.Docked, typeof(DockedEntry) }, { Events.Docked, typeof(DockedEntry) },
{ Events.FSDJump, typeof(FSDJumpEntry) }, { Events.FSDJump, typeof(FSDJumpEntry) },
{ Events.MissionAbandoned, typeof(MissionAbandonedEntry) },
{ Events.MissionAccepted, typeof(MissionAcceptedEntry) }, { Events.MissionAccepted, typeof(MissionAcceptedEntry) },
{ Events.MissionCompleted, typeof(MissionCompletedEntry) }, { Events.MissionCompleted, typeof(MissionCompletedEntry) },
{ Events.MissionRedirected, typeof(MissionRedirectedEntry) }, { Events.MissionRedirected, typeof(MissionRedirectedEntry) },

View File

@ -5,6 +5,7 @@
*/ */
public static readonly string MissionCompleted = "MissionCompleted"; public static readonly string MissionCompleted = "MissionCompleted";
public static readonly string MissionAccepted = "MissionAccepted"; public static readonly string MissionAccepted = "MissionAccepted";
public static readonly string MissionAbandoned = "MissionAbandoned";
public static readonly string Docked = "Docked"; public static readonly string Docked = "Docked";
public static readonly string FSDJump = "FSDJump"; public static readonly string FSDJump = "FSDJump";
public static readonly string MultiSellExplorationData = "MultiSellExplorationData"; public static readonly string MultiSellExplorationData = "MultiSellExplorationData";

10
MissionAbandonedEntry.cs Normal file
View File

@ -0,0 +1,10 @@

namespace EDJournal {
public class MissionAbandonedEntry : Entry {
private int missionid = 0;
public int MissionID => missionid;
protected override void Initialise() {
missionid = JSON.Value<int?>("MissionID") ?? 0;
}
}
}

View File

@ -56,6 +56,7 @@
<Compile Include="JournalFile.cs" /> <Compile Include="JournalFile.cs" />
<Compile Include="JournalStream.cs" /> <Compile Include="JournalStream.cs" />
<Compile Include="MarketSellEntry.cs" /> <Compile Include="MarketSellEntry.cs" />
<Compile Include="MissionAbandonedEntry.cs" />
<Compile Include="MissionAcceptedEntry.cs" /> <Compile Include="MissionAcceptedEntry.cs" />
<Compile Include="MissionCompletedEntry.cs" /> <Compile Include="MissionCompletedEntry.cs" />
<Compile Include="MissionRedirectedEntry.cs" /> <Compile Include="MissionRedirectedEntry.cs" />