46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using System.Linq;
|
|
using System.Globalization;
|
|
using EDJournal;
|
|
|
|
namespace EliteBGS.BGS {
|
|
public class FactionKillBonds : LogEntry {
|
|
public int TotalSum {
|
|
get {
|
|
return Entries
|
|
.OfType<FactionKillBondEntry>()
|
|
.Sum(x => x.Reward)
|
|
;
|
|
}
|
|
}
|
|
|
|
public string VictimFaction {
|
|
get {
|
|
return Entries
|
|
.OfType<FactionKillBondEntry>()
|
|
.First()
|
|
.VictimFaction
|
|
;
|
|
}
|
|
}
|
|
|
|
public override int CompareTo(LogEntry other) {
|
|
if (other.GetType() != typeof(FactionKillBonds)) {
|
|
return -1;
|
|
}
|
|
|
|
var b = other as FactionKillBonds;
|
|
if (b.VictimFaction == VictimFaction) {
|
|
return 0;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
|
|
public override string ToString() {
|
|
return string.Format("Faction Kill Bonds: {0} against {1}",
|
|
Credits.FormatCredits(TotalSum),
|
|
VictimFaction);
|
|
}
|
|
}
|
|
}
|