2022-02-11 13:01:42 +01:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using EDJournal;
|
|
|
|
|
|
|
|
|
|
namespace EliteBGS.BGS.LogGenerator {
|
|
|
|
|
public class MicroResourcesFormat : LogFormatter {
|
|
|
|
|
public string GenerateLog(Objective objective) {
|
2022-04-06 16:33:04 +02:00
|
|
|
|
var total = objective.LogEntries
|
|
|
|
|
.OfType<SellMicroResources>()
|
|
|
|
|
.Where(x => x.IsEnabled)
|
|
|
|
|
;
|
2022-02-11 13:01:42 +01:00
|
|
|
|
long sum = total.Sum(x => x.TotalSum);
|
|
|
|
|
|
|
|
|
|
if (total == null || total.Count() <= 0 || sum <= 0) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return string.Format("Sold {0} worth of Micro Resources\n",
|
|
|
|
|
Credits.FormatCredits(sum));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|