add station state to the journal

This commit is contained in:
Florian Stinglmayr 2022-12-03 20:34:16 +01:00
parent 3df82af239
commit eaeaa5e0b4

View File

@ -2,15 +2,36 @@
namespace EDPlayerJournal.Entries;
public class DockedEntry : Entry {
/// <summary>
/// Name of the station
/// </summary>
public string? StationName { get; set; }
/// <summary>
/// Star system of the station
/// </summary>
public string? StarSystem { get; set; }
/// <summary>
/// System address
/// </summary>
public ulong? SystemAddress { get; set; }
/// <summary>
/// Faction owning the station.
/// </summary>
public string? StationFaction { get; set; }
/// <summary>
/// State of the station, new in Update 14
/// </summary>
public string? StationState { get; set; }
protected override void Initialise() {
StationName = JSON.Value<string>("StationName");
StarSystem = JSON.Value<string>("StarSystem");
SystemAddress = JSON.Value<ulong?>("SystemAddress");
StationState = JSON.Value<string>("StationState");
JObject? faction = JSON.Value<JObject>("StationFaction");
if (faction != null) {
StationFaction = faction.Value<string>("Name") ?? "";