add settlements for ground CZs to the combat log
This commit is contained in:
48
EDPlayerJournal/Entries/ApproachSettlementEntry.cs
Normal file
48
EDPlayerJournal/Entries/ApproachSettlementEntry.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
namespace EDPlayerJournal.Entries;
|
||||
|
||||
public class ApproachSettlementEntry : Entry {
|
||||
/// <summary>
|
||||
/// Settlement name
|
||||
/// </summary>
|
||||
public string? Name { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Market ID of the settlement
|
||||
/// </summary>
|
||||
public long? MarketID { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// System ID
|
||||
/// </summary>
|
||||
public long? SystemAddress { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Body ID
|
||||
/// </summary>
|
||||
public long? BodyID { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Name of the planet
|
||||
/// </summary>
|
||||
public string? BodyName { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Planet latitude
|
||||
/// </summary>
|
||||
public double Latitude { get; set; } = 0.0;
|
||||
|
||||
/// <summary>
|
||||
/// Planet longitude
|
||||
/// </summary>
|
||||
public double Longitude { get; set; } = 0.0;
|
||||
|
||||
protected override void Initialise() {
|
||||
Name = JSON.Value<string?>("Name");
|
||||
MarketID = JSON.Value<long?>("MarketID");
|
||||
SystemAddress = JSON.Value<long?>("SystemID");
|
||||
BodyID = JSON.Value<long?>("BodyID");
|
||||
BodyName = JSON.Value<string?>("BodyName");
|
||||
Longitude = JSON.Value<double?>("Longitude") ?? 0.0;
|
||||
Latitude = JSON.Value<double?>("Latitude") ?? 0.0;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace EDPlayerJournal.Entries;
|
||||
/// </summary>
|
||||
public class Entry {
|
||||
private static readonly Dictionary<string, Type> classes = new Dictionary<string, Type> {
|
||||
{ Events.ApproachSettlement, typeof(ApproachSettlementEntry) },
|
||||
{ Events.Bounty, typeof(BountyEntry) },
|
||||
{ Events.CapShipBond, typeof(CapShipBondEntry) },
|
||||
{ Events.Commander, typeof(CommanderEntry) },
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
namespace EDPlayerJournal.Entries;
|
||||
|
||||
public class Events {
|
||||
public static readonly string ApproachSettlement = "ApproachSettlement";
|
||||
public static readonly string Bounty = "Bounty";
|
||||
public static readonly string CapShipBond = "CapShipBond";
|
||||
public static readonly string Commander = "Commander";
|
||||
|
||||
Reference in New Issue
Block a user