diff --git a/BGS/GenericDiscordLog.cs b/BGS/GenericDiscordLog.cs index 0d06747..f865dbc 100644 --- a/BGS/GenericDiscordLog.cs +++ b/BGS/GenericDiscordLog.cs @@ -115,12 +115,14 @@ namespace EliteBGS.BGS { foreach (MissionFailed failed in missions) { MissionFailedEntry f = failed.Failed; builder.AppendFormat("Failed {0} mission(s) \"{1}\" targeting {2}\n", - failed.Entries.Count, + failed.Amount, f.HumanReadableName == null ? f.Name : f.HumanReadableName, failed.Faction ); } + builder.Append("\n"); + return builder.ToString(); } diff --git a/BGS/MissionFailed.cs b/BGS/MissionFailed.cs index 4462acb..969ce9b 100644 --- a/BGS/MissionFailed.cs +++ b/BGS/MissionFailed.cs @@ -29,6 +29,9 @@ namespace EliteBGS.BGS { return -1; } + // +1 since the other entries are just copies of the one we have in our properties + public int Amount => Entries.Count + 1; + public override string ToString() { StringBuilder builder = new StringBuilder(); @@ -37,8 +40,7 @@ namespace EliteBGS.BGS { } builder.AppendFormat("{0}x Mission failed: \"{1}\"", - // +1 since the other entries are just copies of the one we have in our properties - Entries.Count + 1, + Amount, Failed.HumanReadableName != null ? Failed.HumanReadableName : Failed.Name ); diff --git a/BGS/NonaDiscordLog.cs b/BGS/NonaDiscordLog.cs index 5fbd3d4..45f7a36 100644 --- a/BGS/NonaDiscordLog.cs +++ b/BGS/NonaDiscordLog.cs @@ -244,12 +244,14 @@ namespace EliteBGS.BGS { foreach (MissionFailed failed in missions) { MissionFailedEntry f = failed.Failed; builder.AppendFormat("Failed {0} mission(s) \"{1}\" targeting {2}\n", - failed.Entries.Count, + failed.Amount, f.HumanReadableName == null ? f.Name : f.HumanReadableName, failed.Faction ); } + builder.Append("\n"); + return builder.ToString(); }