add the new supercruise destination drop event

This commit is contained in:
Florian Stinglmayr 2023-05-10 09:22:01 +02:00
parent 73a1975964
commit 9ffca16a78
3 changed files with 32 additions and 0 deletions

View File

@ -44,6 +44,7 @@ public class Entry {
{ Events.SellOrganicData, typeof(SellOrganicDataEntry) },
{ Events.ShieldState, typeof(ShieldStateEntry) },
{ Events.ShipTargeted, typeof(ShipTargetedEntry) },
{ Events.SupercruiseDestinationDrop, typeof(SupercruiseDestinationDrop) },
{ Events.SupercruiseEntry, typeof(SupercruiseEntryEntry) },
{ Events.SupercruiseExit, typeof(SupercruiseExitEntry) },
{ Events.UnderAttack, typeof(UnderAttackEntry) },

View File

@ -35,6 +35,7 @@ public class Events {
public static readonly string ShieldState = "ShieldState";
public static readonly string ShipTargeted = "ShipTargeted";
public static readonly string Shutdown = "Shutdown";
public static readonly string SupercruiseDestinationDrop = "SupercruiseDestinationDrop";
public static readonly string SupercruiseEntry = "SupercruiseEntry";
public static readonly string SupercruiseExit = "SupercruiseExit";
public static readonly string UnderAttack = "UnderAttack";

View File

@ -0,0 +1,30 @@
namespace EDPlayerJournal.Entries;
public class SupercruiseDestinationDrop : Entry {
/// <summary>
/// Destination type, internal string.
/// </summary>
public string? Type { get; set; } = null;
/// <summary>
/// Destination type, localised string.
/// </summary>
public string? TypeLocalised { get; set; } = null;
/// <summary>
/// Threat of the destination, if known.
/// </summary>
public long? Threat { get; set; } = null;
/// <summary>
/// Market ID if it has one.
/// </summary>
public ulong? MarketID { get; set; } = null;
protected override void Initialise() {
Type = JSON.Value<string>("Type");
TypeLocalised = JSON.Value<string>("Type_Localised");
Threat = JSON.Value<long?>("Threat");
MarketID = JSON.Value<ulong?>("MarketID");
}
}