using Newtonsoft.Json.Linq; namespace EDPlayerJournal.Entries; public class CarrierJump : Entry { public bool Docked { get; set; } = false; public string? StationName { get; set; } = null; public string? StationType { get; set; } = null; public string? StarSystem { get; set; } = null; public ulong SystemAddress { get; set; } = 0; public string? SystemFaction { get; set; } = null; public List SystemFactions { get; set; } = new List(); protected override void Initialise() { Docked = JSON.Value("Docked") ?? false; StarSystem = JSON.Value("StarSystem"); SystemAddress = JSON.Value("SystemAddress") ?? 0; StationName = JSON.Value("StationName"); StationType = JSON.Value("StationType"); var faction = JSON.Value("SystemFaction"); if (faction != null) { SystemFaction = faction.Value("Name"); } var factions = JSON.Value("Factions"); if (factions != null) { foreach (JObject system_faction in factions) { Faction? f = Faction.FromJSON(system_faction); if (f != null) { SystemFactions.Add(f); } } } } }