namespace EDPlayerJournal.Entries; public class FileHeaderEntry : Entry { /// /// File part. /// public ulong Part { get; set; } = 1; /// /// Local language of the file. /// public string? Language { get; set; } /// /// Whether the file is for an Odyssey version /// public bool Odyssey { get; set; } = false; /// /// Game version in question (3.8 or 4.0) /// public string GameVersion { get; set; } = "3.8"; /// /// Build version (SVN revision number). /// public string? Build { get; set; } /// /// Returns true if the version is legacy (3.X) /// public bool IsLegacy { get { return GameVersion.StartsWith("3."); } } /// /// Returns true if the version is live (4.x) /// public bool IsLive { get { return !IsLegacy; } } protected override void Initialise() { Part = JSON.Value("part") ?? 1; Language = JSON.Value("language") ?? string.Empty; // If this entry is not there then its a legacy entry Odyssey = JSON.Value("Odyssey") ?? false; GameVersion = JSON.Value("gameversion") ?? "3.8"; Build = JSON.Value("build"); } }