complete DockedEntry

This commit is contained in:
Florian Stinglmayr 2021-11-17 20:54:58 +01:00
parent 8764139d5a
commit f4dd50c568

View File

@ -1,9 +1,18 @@
using Newtonsoft.Json; using Newtonsoft.Json.Linq;
namespace EDJournal { namespace EDJournal {
public class DockedEntry : Entry { public class DockedEntry : Entry {
public string StationName { public string StationName { get; set; }
get { return JSON.GetValue("StationName").ToString(); } public string StarSystem { get; set; }
public string StationFaction { get; set; }
protected override void Initialise() {
StationName = JSON.Value<string>("StationName") ?? "";
StarSystem = JSON.Value<string>("StarSystem") ?? "";
JObject faction = JSON.Value<JObject>("StationFaction");
if (faction != null) {
StationFaction = faction.Value<string>("Name") ?? "";
}
} }
} }
} }