update crime entry
This commit is contained in:
parent
98d7900fce
commit
96dc1a5c2f
@ -1,20 +1,19 @@
|
||||
namespace EDJournal {
|
||||
public class CommitCrimeEntry : Entry {
|
||||
private string crimetype = "assault";
|
||||
private string faction;
|
||||
private string victim;
|
||||
private int bounty = 0;
|
||||
|
||||
public string CrimeType => crimetype;
|
||||
public string Faction => faction;
|
||||
public string Victim => victim;
|
||||
public int Bounty => bounty;
|
||||
public string CrimeType { get; set; }
|
||||
public string Faction { get; set; }
|
||||
public string Victim { get; set; }
|
||||
public long Bounty { get; set; }
|
||||
|
||||
protected override void Initialise() {
|
||||
crimetype = JSON.Value<string>("CrimeType") ?? "assault";
|
||||
faction = JSON.Value<string>("Faction") ?? "";
|
||||
victim = JSON.Value<string>("Victim") ?? "";
|
||||
bounty = JSON.Value<int?>("Bounty") ?? 0;
|
||||
CrimeType = JSON.Value<string>("CrimeType") ?? "assault";
|
||||
Faction = JSON.Value<string>("Faction") ?? "";
|
||||
Victim = JSON.Value<string>("Victim") ?? "";
|
||||
Bounty = JSON.Value<int?>("Bounty") ?? 0;
|
||||
}
|
||||
|
||||
public bool IsMurder {
|
||||
get { return CrimeType?.CompareTo(CrimeTypes.Murder) == 0 || CrimeType?.CompareTo(CrimeTypes.OnFootMurder) == 0; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
11
CrimeTypes.cs
Normal file
11
CrimeTypes.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace EDJournal {
|
||||
public class CrimeTypes {
|
||||
public static readonly string Assault = "assault";
|
||||
public static readonly string Murder = "murder";
|
||||
public static readonly string OnFootArcCutterUse = "onFoot_arcCutterUse";
|
||||
public static readonly string OnFootDataTransfer = "onFoot_dataTransfer";
|
||||
public static readonly string OnFootIdentityTheft = "onFoot_identityTheft";
|
||||
public static readonly string OnFootMurder = "onFoot_murder";
|
||||
public static readonly string Piracy = "piracy";
|
||||
}
|
||||
}
|
@ -44,6 +44,7 @@
|
||||
<Compile Include="BountyEntry.cs" />
|
||||
<Compile Include="CommitCrimeEntry.cs" />
|
||||
<Compile Include="Credits.cs" />
|
||||
<Compile Include="CrimeTypes.cs" />
|
||||
<Compile Include="DiedEntry.cs" />
|
||||
<Compile Include="DockedEntry.cs" />
|
||||
<Compile Include="EliteDangerous.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user