add properties for IsLive and IsLegacy

This commit is contained in:
2022-11-28 13:32:54 +01:00
parent d2aadf9882
commit bb74d72b13
2 changed files with 20 additions and 0 deletions

View File

@@ -26,6 +26,22 @@ public class FileHeaderEntry : Entry {
/// </summary>
public string? Build { get; set; }
/// <summary>
/// Returns true if the version is legacy (3.X)
/// <summary>
public bool IsLegacy {
get {
return GameVersion.StartsWith("3.");
}
}
/// <summary>
/// Returns true if the version is live (4.x)
/// </summary>
public bool IsLive {
get { return !IsLegacy; }
}
protected override void Initialise() {
Part = JSON.Value<ulong?>("part") ?? 1;
Language = JSON.Value<string?>("language") ?? string.Empty;