From 91bca70168f9ea2674e85ba06a60e8b1c4fbfdcd Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Mon, 28 Nov 2022 20:08:04 +0100 Subject: [PATCH] ground combat zones don't have objectives --- EDPlayerJournal/BGS/CombatZone.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/EDPlayerJournal/BGS/CombatZone.cs b/EDPlayerJournal/BGS/CombatZone.cs index e6bb31a..d1d8c66 100644 --- a/EDPlayerJournal/BGS/CombatZone.cs +++ b/EDPlayerJournal/BGS/CombatZone.cs @@ -43,6 +43,9 @@ public class CombatZone : Transaction { /// public int OptionalObjectivesCompleted { get { + if (IsGround) { + return 0; + } return new List() { SpecOps, Captain, Correspondent, CapitalShip } .Where(x => x != null && x == true) .Count() @@ -50,6 +53,20 @@ public class CombatZone : Transaction { } } + /// + /// Returns true if it is an on foot/ground combat zone + /// + public bool IsGround { + get { return string.Compare(Type, "On Foot") == 0; } + } + + /// + /// Returns true if it is an on foot combat zone + /// + public bool IsShip { + get { return string.Compare(Type, "Ship") == 0; } + } + public override int CompareTo(Transaction? obj) { if (obj == null || obj.GetType() != typeof(CombatZone)) { return -1;