EDBGS/EDPlayerJournal/Entries/FileHeaderEntry.cs

38 lines
1.1 KiB
C#
Raw Normal View History

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