handle capshipbond entries

This commit is contained in:
Florian Stinglmayr 2022-11-28 19:47:41 +01:00
parent 12ba6d4d96
commit f683bc372e

View File

@ -1,7 +1,4 @@
using EDPlayerJournal.Entries;
using System.Collections.Generic;
using System.Reflection.Metadata.Ecma335;
using System.Transactions;
namespace EDPlayerJournal.BGS;
@ -788,9 +785,20 @@ internal class ShutdownParser : TransactionParserPart {
}
}
internal class CapShipBondParser : TransactionParserPart {
public void Parse(Entry entry, TransactionParserContext context, TransactionList transactions) {
if (entry.GetType() != typeof(CapShipBondEntry)) {
return;
}
context.HaveSeenCapShip = true;
}
}
public class TransactionParser {
private static Dictionary<string, TransactionParserPart> ParserParts { get; } = new()
{
{ Events.CapShipBond, new CapShipBondParser() },
{ Events.CommitCrime, new CommitCrimeParser() },
{ Events.Disembark, new EmbarkDisembarkParser() },
{ Events.Docked, new DockedParser() },