add starpos to necessary events

This commit is contained in:
Florian Stinglmayr 2022-04-26 15:18:08 +02:00
parent 1dd95aff82
commit 86bd9f76c1
2 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,8 @@ namespace EDJournal {
protected override void Initialise() {
SystemAddress = JSON.Value<ulong?>("SystemAddress") ?? 0;
StarSystem = JSON.Value<string>("StarSystem");
StarPos = JSON.Value<JArray>("StarPos").ToObject<ulong[]>();
var faction = JSON.Value<JObject>("SystemFaction");
if (faction != null) {
SystemFaction = faction.Value<string>("Name");
@ -21,6 +23,7 @@ namespace EDJournal {
}
}
}
public ulong[] StarPos { get; set; }
public string StarSystem { get; set; }
public string SystemFaction { get; set; }

View File

@ -13,6 +13,7 @@ namespace EDJournal {
public ulong SystemAddress { get; set; }
public string Body { get; set; }
public bool Docked { get; set; }
public ulong[] StarPos { get; set; }
public List<Faction> SystemFactions { get; set; } = new List<Faction>();
@ -21,6 +22,7 @@ namespace EDJournal {
SystemAddress = JSON.Value<ulong?>("SystemAddress") ?? 0;
Docked = JSON.Value<bool?>("Docked") ?? false;
StationName = JSON.Value<string>("StationName") ?? "";
StarPos = JSON.Value<JArray>("StarPos").ToObject<ulong[]>();
JObject systemfaction = JSON.Value<JObject>("SystemFaction");
if (systemfaction != null) {