25 lines
779 B
C#
25 lines
779 B
C#
using System.Linq;
|
|
using System.Text;
|
|
using EDJournal;
|
|
|
|
namespace EliteBGS.BGS.LogGenerator {
|
|
public class VoucherFormat : LogFormatter {
|
|
public string GenerateLog(Objective objective) {
|
|
StringBuilder builder = new StringBuilder();
|
|
var missions = objective.LogEntries.OfType<Vouchers>();
|
|
|
|
if (missions == null || missions.Count() <= 0) {
|
|
return "";
|
|
}
|
|
|
|
foreach (var m in missions) {
|
|
builder.AppendFormat("Handed in {0} vouchers for {1}\n", m.Type, m.Faction);
|
|
builder.AppendFormat("(Total value: {0})\n", Credits.FormatCredits(m.TotalSum));
|
|
builder.AppendFormat("\n");
|
|
}
|
|
|
|
return builder.ToString();
|
|
}
|
|
}
|
|
}
|