EDBGS/EliteBGS/LogGenerator/MarketBuyFormat.cs

18 lines
440 B
C#
Raw Permalink Normal View History

2022-11-24 19:38:19 +01:00
using EDPlayerJournal.BGS;
using System.Linq;
2022-11-24 19:38:19 +01:00
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 "";
}
2023-04-27 16:24:48 +02:00
return string.Format("Bought: {0}t", tons);
}
2022-11-24 19:38:19 +01:00
}