allow possibility to ignore influence support

This commit is contained in:
Florian Stinglmayr 2023-03-03 15:59:41 +01:00
parent b588050fb4
commit d00c8d5c06

View File

@ -8,6 +8,12 @@ public class TransactionParserOptions {
/// is true per default.
/// </summary>
public bool IgnoreExoBiology { get; set; } = true;
/// <summary>
/// Whether to ignore influence support. Usually one only cares about the
/// primary faction for the influence.
/// </summary>
public bool IgnoreInfluenceSupport { get; set; } = false;
}
internal class TransactionParserContext {
@ -584,6 +590,10 @@ internal class MissionCompletedParser : TransactionParserPart {
} else if (string.Compare(faction, source_faction_name, true) != 0 ||
(string.Compare(faction, source_faction_name) == 0 &&
system_address != accepted_location.SystemAddress)) {
// Whether we ignore influence support
if (options.IgnoreInfluenceSupport) {
continue;
}
// Source or target faction are different, and/or the system
// differs. Sometimes missions go to different systems but to
// the same faction.