diff --git a/EliteBGS/LogGenerator/MissionFormat.cs b/EliteBGS/LogGenerator/MissionFormat.cs index d42beb4..b17aad3 100644 --- a/EliteBGS/LogGenerator/MissionFormat.cs +++ b/EliteBGS/LogGenerator/MissionFormat.cs @@ -7,7 +7,8 @@ namespace EliteBGS.LogGenerator; public class MissionFormat : LogFormatter { public string GenerateLog(Objective objective) { - Dictionary> collated = new Dictionary>(); + Dictionary> collated = new(); + Dictionary passengers = new(); StringBuilder output = new StringBuilder(); int total_influence = 0; @@ -28,6 +29,15 @@ public class MissionFormat : LogFormatter { ++collated[m.MissionName][m.Influence]; total_influence += m.Influence.Length; + + if (m.AcceptedEntry != null && + m.AcceptedEntry.Mission != null && + m.AcceptedEntry.Mission.IsPassengerMission) { + if (!passengers.ContainsKey(m.MissionName)) { + passengers[m.MissionName] = 0; + } + passengers[m.MissionName] += (m.AcceptedEntry.Mission.PassengerCount ?? 0); + } } foreach (var mission in collated) { @@ -37,9 +47,15 @@ public class MissionFormat : LogFormatter { output.AppendFormat("Inf{0} x{1}, ", influence.Key, influence.Value); } output.Remove(output.Length - 2, 2); // remove last ", " - output.Append(")\n\n"); + output.Append(")"); + + if (passengers.ContainsKey(mission.Key)) { + output.AppendFormat(" ({0} Passengers)", passengers[mission.Key]); + } } + output.Append("\n\n"); + var support = objective.EnabledOfType(); foreach (InfluenceSupport inf in support) { output.Append(inf.ToString());