add option to ignore market buy
This commit is contained in:
parent
5c9d9c9153
commit
d6acbda55c
@ -14,6 +14,14 @@ public class TransactionParserOptions {
|
||||
/// primary faction for the influence.
|
||||
/// </summary>
|
||||
public bool IgnoreInfluenceSupport { get; set; } = false;
|
||||
|
||||
/// <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
|
||||
/// a market to aid the faction the stuff is being sold to. So allow it to be
|
||||
/// disabled.
|
||||
/// </summary>
|
||||
public bool IgnoreMarketBuy { get; set; } = false;
|
||||
}
|
||||
|
||||
public class TransactionList : List<Transaction> {
|
||||
@ -627,6 +635,10 @@ internal class SearchAndRescueParser : TransactionParserPart {
|
||||
|
||||
internal class MarketBuyParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
if (options.IgnoreMarketBuy) {
|
||||
return;
|
||||
}
|
||||
|
||||
MarketBuyEntry? entry = e as MarketBuyEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
|
Loading…
Reference in New Issue
Block a user