From 027f8a892dfb0f6c6b74dcede345b8e9224fe92d Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Fri, 25 Nov 2022 18:06:19 +0100 Subject: [PATCH] add function to determine whether entry is relevant --- EDPlayerJournal/BGS/TransactionParser.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/EDPlayerJournal/BGS/TransactionParser.cs b/EDPlayerJournal/BGS/TransactionParser.cs index f7220d2..bd4a46f 100644 --- a/EDPlayerJournal/BGS/TransactionParser.cs +++ b/EDPlayerJournal/BGS/TransactionParser.cs @@ -747,6 +747,17 @@ public class TransactionParser { { Events.SupercruiseEntry, new SupercruiseEntryParser() }, }; + public bool IsRelevant(string entry) { + return ParserParts.ContainsKey(entry); + } + + public bool IsRelevant(Entry e) { + if (e.Event == null) { + return false; + } + return IsRelevant(e.Event); + } + public List? Parse(IEnumerable entries) { TransactionList transactions = new(); TransactionParserContext context = new();