edjournal/ShipTargetedEntry.cs

32 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
namespace EDJournal {
public class ShipTargetedEntry : Entry {
public string Ship { get; set; }
public long ScanStage { get; set; }
public string PilotName { get; set; }
public string PilotNameLocalised { get; set; }
public string PilotRank { get; set; }
public double ShieldHealth { get; set; }
public double HullHealth { get; set; }
public long Bounty { get; set; }
public string LegalStatus { get; set; }
public string Faction { get; set; }
public string Power { get; set; }
protected override void Initialise() {
ScanStage = JSON.Value<long?>("ScanStage") ?? 0;
Ship = JSON.Value<string>("Ship_Localised") ?? "";
PilotName = JSON.Value<string>("PilotName") ?? "";
PilotNameLocalised = JSON.Value<string>("PilotName_Localised") ?? "";
PilotRank = JSON.Value<string>("PilotRank") ?? "";
ShieldHealth = JSON.Value<double?>("ShieldHealth") ?? 0.0;
HullHealth = JSON.Value<double?>("HullHealth") ?? 0.0;
Bounty = JSON.Value<long?>("Bounty") ?? 0;
LegalStatus = JSON.Value<string>("LegalStatus") ?? "Clean";
Faction = JSON.Value<string>("Faction") ?? "";
Power = JSON.Value<string>("Power") ?? "";
}
}
}