add credit value to search and rescue entry

This commit is contained in:
Florian Stinglmayr 2022-02-09 09:49:56 +01:00
parent 55e5ba4f1b
commit d79b26e5c9

View File

@ -17,6 +17,12 @@ namespace EliteBGS.BGS {
}
}
public long Reward {
get {
return Entries.OfType<SearchAndRescueEntry>().Sum(x => x.Reward);
}
}
public string NameLocalised {
get {
return Entries.OfType<SearchAndRescueEntry>().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;