diff --git a/EDPlayerJournal/BGS/TransactionParser.cs b/EDPlayerJournal/BGS/TransactionParser.cs index de70728..81aa956 100644 --- a/EDPlayerJournal/BGS/TransactionParser.cs +++ b/EDPlayerJournal/BGS/TransactionParser.cs @@ -902,10 +902,20 @@ internal class DropshipDeployParser : TransactionParserPart { } } +internal class CommanderParser : TransactionParserPart { + public void Parse(Entry entry, TransactionParserContext context, TransactionList transactions) { + // A commander entry happens when you log out, and log back in again + // for example when switching from Open, to Solo or PG. + context.DiscernCombatZone(transactions, entry); + context.ResetCombatZone(); + } +} + public class TransactionParser { private static Dictionary ParserParts { get; } = new() { { Events.CapShipBond, new CapShipBondParser() }, + { Events.Commander, new CommanderParser() }, { Events.CommitCrime, new CommitCrimeParser() }, { Events.Died, new DiedParser() }, { Events.Disembark, new EmbarkDisembarkParser() },