From 7e66691d664f5c8a990b589e36ad60f7cdd7611d Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Fri, 27 Aug 2021 20:05:31 +0200 Subject: [PATCH] handle mission abandoned --- Entry.cs | 1 + Events.cs | 1 + MissionAbandonedEntry.cs | 10 ++++++++++ edjournal.csproj | 1 + 4 files changed, 13 insertions(+) create mode 100644 MissionAbandonedEntry.cs diff --git a/Entry.cs b/Entry.cs index 1c8cd3f..508e29f 100644 --- a/Entry.cs +++ b/Entry.cs @@ -14,6 +14,7 @@ namespace EDJournal { private static readonly Dictionary classes = new Dictionary { { Events.Docked, typeof(DockedEntry) }, { Events.FSDJump, typeof(FSDJumpEntry) }, + { Events.MissionAbandoned, typeof(MissionAbandonedEntry) }, { Events.MissionAccepted, typeof(MissionAcceptedEntry) }, { Events.MissionCompleted, typeof(MissionCompletedEntry) }, { Events.MissionRedirected, typeof(MissionRedirectedEntry) }, diff --git a/Events.cs b/Events.cs index ae64482..4540b04 100644 --- a/Events.cs +++ b/Events.cs @@ -5,6 +5,7 @@ */ public static readonly string MissionCompleted = "MissionCompleted"; public static readonly string MissionAccepted = "MissionAccepted"; + public static readonly string MissionAbandoned = "MissionAbandoned"; public static readonly string Docked = "Docked"; public static readonly string FSDJump = "FSDJump"; public static readonly string MultiSellExplorationData = "MultiSellExplorationData"; diff --git a/MissionAbandonedEntry.cs b/MissionAbandonedEntry.cs new file mode 100644 index 0000000..22937c0 --- /dev/null +++ b/MissionAbandonedEntry.cs @@ -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("MissionID") ?? 0; + } + } +} diff --git a/edjournal.csproj b/edjournal.csproj index 88bc842..b2ffd89 100644 --- a/edjournal.csproj +++ b/edjournal.csproj @@ -56,6 +56,7 @@ +