2022-11-24 19:38:19 +01:00
|
|
|
|
using EDPlayerJournal.BGS;
|
2023-04-19 10:06:10 +02:00
|
|
|
|
using System.Linq;
|
2022-11-24 19:38:19 +01:00
|
|
|
|
|
|
|
|
|
namespace EliteBGS.LogGenerator;
|
|
|
|
|
|
|
|
|
|
public class MarketBuyFormat : GenericFormat<BuyCargo> {
|
2023-04-19 10:06:10 +02:00
|
|
|
|
public override string GenerateSummary(Objective objective) {
|
|
|
|
|
long tons = objective
|
|
|
|
|
.EnabledOfType<BuyCargo>()
|
|
|
|
|
.Sum(x => x.Amount)
|
|
|
|
|
;
|
|
|
|
|
if (tons <= 0) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
2023-04-27 16:24:48 +02:00
|
|
|
|
return string.Format("Bought: {0}t", tons);
|
2023-04-19 10:06:10 +02:00
|
|
|
|
}
|
2022-11-24 19:38:19 +01:00
|
|
|
|
}
|