From 800ac73331c8e4a5d658dff955027096669150c2 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Mon, 28 Nov 2022 20:06:14 +0100 Subject: [PATCH] add GUI for optional objectives in combat zones --- EliteBGS/LogGenerator/CombatZoneFormat.cs | 10 ++- EliteBGS/MainWindow.xaml | 5 ++ EliteBGS/Objective.cs | 91 +++++++++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/EliteBGS/LogGenerator/CombatZoneFormat.cs b/EliteBGS/LogGenerator/CombatZoneFormat.cs index 825f0b5..3798a0f 100644 --- a/EliteBGS/LogGenerator/CombatZoneFormat.cs +++ b/EliteBGS/LogGenerator/CombatZoneFormat.cs @@ -19,11 +19,19 @@ class CombatZoneFormat : LogFormatter { } foreach (var log in logs) { - builder.AppendFormat("Won {0}x {1} {2} Combat Zones\n", + int optionals = log.Value + .Sum(x => x.OptionalObjectivesCompleted) + ; + builder.AppendFormat("Won {0}x {1} {2} Combat Zones", log.Value.Count, log.Key.Grade, log.Key.Type ); + + if (optionals > 0) { + builder.AppendFormat(" (with {0} optional objectives)", optionals); + } + builder.Append("\n"); } return builder.ToString().Trim(); diff --git a/EliteBGS/MainWindow.xaml b/EliteBGS/MainWindow.xaml index bf55bbf..2568068 100644 --- a/EliteBGS/MainWindow.xaml +++ b/EliteBGS/MainWindow.xaml @@ -84,6 +84,11 @@ + + + + +