From 5fe652f98caf6b07184f63732b7bf97ba849808a Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Wed, 19 Apr 2023 10:13:02 +0200 Subject: [PATCH] add profit to search and rescue --- EliteBGS/DiscordLogGenerator.cs | 2 +- EliteBGS/LogGenerator/SearchAndRescueFormat.cs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/EliteBGS/DiscordLogGenerator.cs b/EliteBGS/DiscordLogGenerator.cs index d2d9dec..3187e53 100644 --- a/EliteBGS/DiscordLogGenerator.cs +++ b/EliteBGS/DiscordLogGenerator.cs @@ -39,7 +39,7 @@ public class DiscordLogGenerator { } if (sb.Length > 0) { - sb.Append(", "); + sb.Append("; "); } sb.Append(summary); diff --git a/EliteBGS/LogGenerator/SearchAndRescueFormat.cs b/EliteBGS/LogGenerator/SearchAndRescueFormat.cs index a5b6eb2..acd5d75 100644 --- a/EliteBGS/LogGenerator/SearchAndRescueFormat.cs +++ b/EliteBGS/LogGenerator/SearchAndRescueFormat.cs @@ -6,13 +6,17 @@ namespace EliteBGS.LogGenerator; public class SearchAndRescueFormat : GenericFormat { public override string GenerateSummary(Objective objective) { - long profit = objective + long tons = objective .EnabledOfType() .Sum(x => x.Count) ; - if (profit <= 0) { + long profit = objective + .EnabledOfType() + .Sum(x => x.Reward) + ; + if (tons <= 0) { return ""; } - return string.Format("S&R: {0}t", profit); + return string.Format("S&R: {0}t, {1} profit", tons, Credits.FormatMillions(profit)); } }