EDBGS/EliteBGS/LogGenerator/MarketBuyFormat.cs

18 lines
447 B
C#

using EDPlayerJournal.BGS;
using System.Linq;
namespace EliteBGS.LogGenerator;
public class MarketBuyFormat : GenericFormat<BuyCargo> {
public override string GenerateSummary(Objective objective) {
long tons = objective
.EnabledOfType<BuyCargo>()
.Sum(x => x.Amount)
;
if (tons <= 0) {
return "";
}
return string.Format("Market: {0}t bought", tons);
}
}