fix log format for murders

This commit is contained in:
Florian Stinglmayr 2023-04-27 16:24:10 +02:00
parent e11572a565
commit 5487cb3d37

View File

@ -1,9 +1,7 @@
using EDPlayerJournal.BGS; using EDPlayerJournal;
using System.Collections.Generic; using EDPlayerJournal.BGS;
using System.Text; using System.Text;
using System;
using System.Linq; using System.Linq;
using EDPlayerJournal;
namespace EliteBGS.LogGenerator; namespace EliteBGS.LogGenerator;
@ -36,14 +34,14 @@ public class MurderFormat : LogFormatter {
type = "person"; type = "person";
} }
} }
builder.AppendFormat("Murdered {0} {1} (Bounties: {2}, Fines: {3})", long bounties = log.Value.Sum(x => x.Bounties);
builder.AppendFormat("Murdered {0} {1} (Bounties: {2})\n",
log.Value.Count, type, log.Value.Count, type,
log.Value.Sum(x => x.Bounties), Credits.FormatMillions(bounties)
log.Value.Sum(x => x.Fines)
); );
} }
return builder.ToString(); return builder.ToString().Trim();
} }
public string GenerateSummary(Objective objective) { public string GenerateSummary(Objective objective) {