add option to ignore powerplay for now

This commit is contained in:
Florian Stinglmayr 2024-11-14 13:33:49 +01:00
parent aeaa6b5220
commit 2905696641
2 changed files with 14 additions and 6 deletions

View File

@ -16,6 +16,7 @@ internal class PowerplayParser : ITransactionParserPart {
context.CurrentMerits = p.Merits;
if (context.LastMerits != context.CurrentMerits) {
if (!options.IgnorePowerplay) {
transactions.Add(new MeritsGained(entry) {
Merits = ((long)(context.CurrentMerits - context.LastMerits)),
Power = p.Power,
@ -23,6 +24,7 @@ internal class PowerplayParser : ITransactionParserPart {
Faction = p.Power,
});
}
}
context.LastMerits = context.CurrentMerits;
}

View File

@ -16,6 +16,12 @@ public class TransactionParserOptions {
/// </summary>
public bool IgnoreInfluenceSupport { get; set; } = false;
/// <summary>
/// Whether we ignore power play and merits gained for now. Support for this
/// is experimental at the moment, so that is why it ist `true`.
/// </summary>
public bool IgnorePowerplay { get; set; } = true;
/// <summary>
/// Whether to ignore market buy. Buying from a market gives a small amount
/// of INF if it is sold to a high demand market, but generally one buys from