EDBGS/EDPlayerJournal/Entries/CommitCrimeEntry.cs

23 lines
877 B
C#
Raw Normal View History

2022-11-01 18:01:28 +01:00
namespace EDPlayerJournal.Entries;
public class CommitCrimeEntry : Entry {
public string? CrimeType { get; set; }
public string? Faction { get; set; }
public string? Victim { get; set; }
public string? VictimLocalised { get; set; }
public long Bounty { get; set; }
public long Fine { get; set; }
protected override void Initialise() {
CrimeType = JSON.Value<string>("CrimeType") ?? "assault";
Faction = JSON.Value<string>("Faction") ?? "";
Victim = JSON.Value<string>("Victim") ?? "";
VictimLocalised = JSON.Value<string>("Victim_Localised") ?? "";
Bounty = JSON.Value<long?>("Bounty") ?? 0;
Fine = JSON.Value<long?>("Fine") ?? 0;
}
public bool IsMurder {
get { return CrimeType?.CompareTo(CrimeTypes.Murder) == 0 || CrimeType?.CompareTo(CrimeTypes.OnFootMurder) == 0; }
}
}