From 2cf21f159d303961ad66adae53bacd2e26da5f20 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Wed, 17 Nov 2021 21:01:35 +0100 Subject: [PATCH] properly use Docked entry --- BGS/Report.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BGS/Report.cs b/BGS/Report.cs index 3ce65aa..dcfe7ef 100644 --- a/BGS/Report.cs +++ b/BGS/Report.cs @@ -66,9 +66,12 @@ namespace EliteBGS.BGS { bool collate = false; if (e.Is(Events.Docked)) { + DockedEntry docked = e as DockedEntry; /* gleem the current station from this message */ - current_station = (e as DockedEntry).StationName; + current_station = docked.StationName; + current_system = docked.StarSystem; + controlling_faction = docked.StationFaction; } else if (e.Is(Events.FSDJump)) { /* Gleem current system and controlling faction from this message. */ @@ -88,7 +91,10 @@ namespace EliteBGS.BGS { } } else if (e.Is(Events.MissionCompleted)) { var completed = e as MissionCompletedEntry; - entry = new MissionCompleted(completed) { System = current_system, Station = current_station }; + entry = new MissionCompleted(completed) { + System = current_system, + Station = current_station + }; if (completed.HumanReadableNameWasGenerated) { /* If the human readable name was generated, we send a log message. Because the * generated names all sort of suck, we should have more human readable names in