using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EDJournal { public class ShipTargetedEntry : Entry { private string ship = null; private string pilot = null; private string rank = null; private double shield = 0.0; private double hull = 0.0; private int bounty = 0; private string legalstatus = null; private string faction = null; public string Ship => ship; public string Pilot => pilot; public string Rank => rank; public double ShieldHealth => shield; public double HullHealth => hull; public int Bounty => bounty; public string LegalStatus => legalstatus; public string Faction => faction; protected override void Initialise() { ship = JSON.Value("Ship_Localised") ?? ""; pilot = JSON.Value("PilotName_Localised") ?? ""; rank = JSON.Value("PilotRank") ?? ""; shield = JSON.Value("ShieldHealth") ?? 0.0; hull = JSON.Value("HullHealth") ?? 0.0; bounty = JSON.Value("Bounty") ?? 0; legalstatus = JSON.Value("LegalStatus") ?? "Clean"; faction = JSON.Value("Faction") ?? ""; } } }