2021-09-28 14:14:16 +02:00
|
|
|
|
using System;
|
2021-09-28 14:45:39 +02:00
|
|
|
|
using System.Linq;
|
2021-09-28 14:14:16 +02:00
|
|
|
|
|
2021-11-10 21:24:39 +01:00
|
|
|
|
namespace EliteBGS.BGS {
|
2021-09-28 14:14:16 +02:00
|
|
|
|
public class CombatZone : LogEntry, IComparable {
|
|
|
|
|
public string Type { get; set; }
|
|
|
|
|
public string Grade { get; set; }
|
|
|
|
|
public int Amount { get; set; }
|
2022-07-24 13:32:03 +02:00
|
|
|
|
public DateTime Completed { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
|
|
|
|
public override string CompletedAt {
|
|
|
|
|
get {
|
|
|
|
|
return Completed.ToString("dd.MM.yyyy HH:mm UTC");
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-28 14:14:16 +02:00
|
|
|
|
|
|
|
|
|
public int CompareTo(object obj) {
|
|
|
|
|
if (obj.GetType() != typeof(CombatZone)) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var b = obj as CombatZone;
|
|
|
|
|
if (b.Faction != Faction || b.System != System) {
|
|
|
|
|
return -1; // System and faction don't match
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (b.Type != b.Type || b.Grade != b.Grade) {
|
|
|
|
|
return -1; // grade and type don't match
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString() {
|
2021-09-28 14:45:39 +02:00
|
|
|
|
return string.Format("Won {0} x {1} {2} Combat Zone(s) for {3}",
|
|
|
|
|
Amount, Grade, Type, Faction);
|
2021-09-28 14:14:16 +02:00
|
|
|
|
}
|
2021-07-09 11:03:30 +02:00
|
|
|
|
}
|
|
|
|
|
}
|