fix summary for failed missions

This commit is contained in:
Florian Stinglmayr 2023-02-26 22:03:31 +01:00
parent a13e8446d2
commit 5799b3ed16

View File

@ -43,12 +43,13 @@ public class FailedMissionFormat : LogFormatter {
int onFootFails = missions.Where(x => x.Mission.IsOnFoot).Count(); int onFootFails = missions.Where(x => x.Mission.IsOnFoot).Count();
int shipFails = missions.Where(x => !x.Mission.IsOnFoot).Count(); int shipFails = missions.Where(x => !x.Mission.IsOnFoot).Count();
sb.Append("Fails: ");
if (onFootFails > 0) { if (onFootFails > 0) {
sb.AppendFormat("Fails: {0} Ground", onFootFails); sb.AppendFormat("{0} Ground", onFootFails);
} }
if (shipFails > 0) { if (shipFails > 0) {
if (sb.Length> 0) { if (onFootFails > 0) {
sb.Append(", "); sb.Append(", ");
} }
sb.AppendFormat("{0} Ship", shipFails); sb.AppendFormat("{0} Ship", shipFails);