diff --git a/DockedEntry.cs b/DockedEntry.cs index 814f263..a1c0c42 100644 --- a/DockedEntry.cs +++ b/DockedEntry.cs @@ -1,9 +1,18 @@ -using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace EDJournal { public class DockedEntry : Entry { - public string StationName { - get { return JSON.GetValue("StationName").ToString(); } + public string StationName { get; set; } + public string StarSystem { get; set; } + public string StationFaction { get; set; } + + protected override void Initialise() { + StationName = JSON.Value("StationName") ?? ""; + StarSystem = JSON.Value("StarSystem") ?? ""; + JObject faction = JSON.Value("StationFaction"); + if (faction != null) { + StationFaction = faction.Value("Name") ?? ""; + } } } }