refactor ShipTargeted for murders
This commit is contained in:
parent
be1f0b72e3
commit
5b9213cc92
@ -1,38 +1,31 @@
|
||||
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;
|
||||
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() {
|
||||
ship = JSON.Value<string>("Ship_Localised") ?? "";
|
||||
pilot = JSON.Value<string>("PilotName_Localised") ?? "";
|
||||
rank = JSON.Value<string>("PilotRank") ?? "";
|
||||
shield = JSON.Value<double?>("ShieldHealth") ?? 0.0;
|
||||
hull = JSON.Value<double?>("HullHealth") ?? 0.0;
|
||||
bounty = JSON.Value<int?>("Bounty") ?? 0;
|
||||
legalstatus = JSON.Value<string>("LegalStatus") ?? "Clean";
|
||||
faction = JSON.Value<string>("Faction") ?? "";
|
||||
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") ?? "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user