From d79b26e5c9b401e31a3057e6b5c373b12004b722 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Wed, 9 Feb 2022 09:49:56 +0100 Subject: [PATCH] add credit value to search and rescue entry --- BGS/SearchAndRescue.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/BGS/SearchAndRescue.cs b/BGS/SearchAndRescue.cs index 1795841..041cf81 100644 --- a/BGS/SearchAndRescue.cs +++ b/BGS/SearchAndRescue.cs @@ -17,6 +17,12 @@ namespace EliteBGS.BGS { } } + public long Reward { + get { + return Entries.OfType().Sum(x => x.Reward); + } + } + public string NameLocalised { get { return Entries.OfType().First().NameLocalised; @@ -41,7 +47,11 @@ namespace EliteBGS.BGS { } public override string ToString() { - return string.Format("Contributed {0} {1} to Search and Rescue", Count, NameLocalised); + return string.Format("Contributed {0} {1} to Search and Rescue ({2})", + Count, + NameLocalised, + Credits.FormatCredits(Reward) + ); } public override bool OnlyControllingFaction => true;