split captain and correspondent to enemy/allied
This commit is contained in:
parent
d7a1ac5ef2
commit
6b09ec4db3
@ -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()
|
||||
;
|
||||
|
@ -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);
|
||||
|
@ -120,8 +120,10 @@
|
||||
<Expander Header="Optional Objectives" Visibility="{Binding IsShipCombatZone}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<ToggleButton x:Name="CapitalShip" Margin="2,0,2,0" Content="Capital Ship" IsChecked="{Binding HasCapitalShip, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="Captain" Margin="2,0,2,0" Content="Captain" IsChecked="{Binding HasCaptain, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="Correspondent" Margin="2,0,2,0" Content="Correspondent" IsChecked="{Binding HasCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="AlliedCaptain" Margin="2,0,2,0" Content="Allied Captain" IsChecked="{Binding HasAlliedCaptain, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="EnemyCaptain" Margin="2,0,2,0" Content="Enemy Captain" IsChecked="{Binding HasEnemyCaptain, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="AlliedCorrespondent" Margin="2,0,2,0" Content="Allied Correspondent" IsChecked="{Binding HasAlliedCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="EnemyCorrespondent" Margin="2,0,2,0" Content="Enemy Correspondent" IsChecked="{Binding HasEnemyCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="SpecOps" Margin="2,0,2,0" Content="Spec Ops" IsChecked="{Binding HasSpecOps, Mode=TwoWay}" IsThreeState="False"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
@ -120,14 +120,14 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasCaptain {
|
||||
public bool HasEnemyCaptain {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.Captain ?? false;
|
||||
return combat.EnemyCaptain ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
@ -135,18 +135,18 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.Captain = value;
|
||||
combat.EnemyCaptain = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasCorrespondent {
|
||||
public bool HasAlliedCaptain {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.Correspondent ?? false;
|
||||
return combat.AlliedCaptain ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
@ -154,7 +154,45 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.Correspondent = value;
|
||||
combat.AlliedCaptain = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasEnemyCorrespondent {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.EnemyCorrespondent ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.EnemyCorrespondent = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAlliedCorrespondent {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.AlliedCorrespondent ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.AlliedCorrespondent = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user