split captain and correspondent to enemy/allied

This commit is contained in:
2023-06-18 14:55:22 +02:00
parent d7a1ac5ef2
commit 6b09ec4db3
4 changed files with 72 additions and 15 deletions

View File

@@ -19,14 +19,24 @@ public class CombatZone : Transaction {
public bool? SpecOps { get; set; }
/// <summary>
/// Whether captain was won
/// Whether allied captain objective was won
/// </summary>
public bool? Captain { get; set; }
public bool? AlliedCaptain { get; set; }
/// <summary>
/// Whether correspondent objective was won
/// Whether enemy captain objective was won
/// </summary>
public bool? Correspondent { get; set; }
public bool? EnemyCaptain { get; set; }
/// <summary>
/// Whether the allied correspondent objective was won
/// </summary>
public bool? AlliedCorrespondent { get; set; }
/// <summary>
/// Whether the enemy correspondent objective was won
/// </summary>
public bool? EnemyCorrespondent { get; set; }
/// <summary>
/// Whether cap ship objective was won
@@ -41,7 +51,14 @@ public class CombatZone : Transaction {
if (IsGround) {
return 0;
}
return new List<bool?>() { SpecOps, Captain, Correspondent, CapitalShip }
return new List<bool?>() {
SpecOps,
AlliedCaptain,
EnemyCaptain,
AlliedCorrespondent,
EnemyCorrespondent,
CapitalShip
}
.Where(x => x != null && x == true)
.Count()
;

View File

@@ -222,8 +222,8 @@ internal class TransactionParserContext {
// Sad truth is, if HaveSeenXXX is false, we just don't know for certain
CapitalShip = HaveSeenCapShip ? true : null,
SpecOps = HaveSeenSpecOps ? true : null,
Correspondent = HaveSeenCorrespondent ? true : null,
Captain = HaveSeenCaptain ? true : null,
EnemyCorrespondent = HaveSeenCorrespondent ? true : null,
EnemyCaptain = HaveSeenCaptain ? true : null,
};
zone.Entries.Add(e);
transactions.Add(zone);