2023-04-19 10:06:10 +02:00
|
|
|
|
using EDPlayerJournal;
|
|
|
|
|
using EDPlayerJournal.BGS;
|
|
|
|
|
using System.Linq;
|
2022-11-24 19:38:19 +01:00
|
|
|
|
|
|
|
|
|
namespace EliteBGS.LogGenerator;
|
|
|
|
|
|
|
|
|
|
public class SearchAndRescueFormat : GenericFormat<SearchAndRescue> {
|
2023-04-19 10:06:10 +02:00
|
|
|
|
public override string GenerateSummary(Objective objective) {
|
2023-04-19 10:13:02 +02:00
|
|
|
|
long tons = objective
|
2023-04-19 10:06:10 +02:00
|
|
|
|
.EnabledOfType<SearchAndRescue>()
|
|
|
|
|
.Sum(x => x.Count)
|
|
|
|
|
;
|
2023-04-19 10:13:02 +02:00
|
|
|
|
long profit = objective
|
|
|
|
|
.EnabledOfType<SearchAndRescue>()
|
|
|
|
|
.Sum(x => x.Reward)
|
|
|
|
|
;
|
|
|
|
|
if (tons <= 0) {
|
2023-04-19 10:06:10 +02:00
|
|
|
|
return "";
|
|
|
|
|
}
|
2023-04-19 10:13:02 +02:00
|
|
|
|
return string.Format("S&R: {0}t, {1} profit", tons, Credits.FormatMillions(profit));
|
2023-04-19 10:06:10 +02:00
|
|
|
|
}
|
2022-11-24 19:38:19 +01:00
|
|
|
|
}
|