edjournal/CommitCrimeEntry.cs

20 lines
718 B
C#
Raw Normal View History

2021-09-02 16:18:02 +02:00
namespace EDJournal {
public class CommitCrimeEntry : Entry {
2022-01-23 16:43:16 +01:00
public string CrimeType { get; set; }
public string Faction { get; set; }
public string Victim { get; set; }
public long Bounty { get; set; }
2021-09-02 16:18:02 +02:00
protected override void Initialise() {
2022-01-23 16:43:16 +01:00
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; }
2021-09-02 16:18:02 +02:00
}
}
}