edjournal/CommitCrimeEntry.cs

20 lines
718 B
C#

namespace EDJournal {
public class CommitCrimeEntry : Entry {
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;
}
public bool IsMurder {
get { return CrimeType?.CompareTo(CrimeTypes.Murder) == 0 || CrimeType?.CompareTo(CrimeTypes.OnFootMurder) == 0; }
}
}
}