Skip to content

Commit

Permalink
Update for 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
berichan committed Nov 12, 2021
1 parent 1fa9064 commit 0a36a5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NHSE.Core/Save/Meta/RevisionChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static class RevisionChecker
new() { Major = 0x7E001, Minor = 0x7E001, HeaderRevision = 0, Unk1 = 2, SaveRevision = 20, Unk2 = 2 }, // 1.11.0
new() { Major = 0x7E001, Minor = 0x7E001, HeaderRevision = 0, Unk1 = 2, SaveRevision = 21, Unk2 = 2 }, // 1.11.1
new() { Major = 0x80009, Minor = 0x80085, HeaderRevision = 0, Unk1 = 2, SaveRevision = 22, Unk2 = 2 }, // 2.0.0
new() { Major = 0x80009, Minor = 0x80085, HeaderRevision = 0, Unk1 = 2, SaveRevision = 23, Unk2 = 2 }, // 2.0.1
};

public static readonly IReadOnlyList<SaveFileSizes> SizeInfo = new[]
Expand Down Expand Up @@ -81,6 +82,7 @@ public static class RevisionChecker
SizesByRevision[11], // 1.11.0
SizesByRevision[11], // 1.11.1
SizesByRevision[12], // 2.0.0
SizesByRevision[12], // 2.0.1
};

public static readonly IReadOnlyList<FileHashInfo> HashInfo = new[]
Expand Down Expand Up @@ -108,6 +110,7 @@ public static class RevisionChecker
REV_1110, // 1.11.0
REV_1110, // 1.11.1
REV_200, // 2.0.0
REV_200, // 2.0.1
};

public static bool IsRevisionKnown(this FileHeaderInfo info) => info.GetKnownRevisionIndex() >= 0;
Expand Down
1 change: 1 addition & 0 deletions NHSE.Core/Save/Offsets/MainSaveOffsets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static MainSaveOffsets GetOffsets(FileHeaderInfo Info)
20 => new MainSaveOffsets111(),
21 => new MainSaveOffsets111(),
22 => new MainSaveOffsets20(),
23 => new MainSaveOffsets20(),
_ => throw new IndexOutOfRangeException("Unknown revision!" + Environment.NewLine + Info),
};
}
Expand Down
1 change: 1 addition & 0 deletions NHSE.Core/Save/Offsets/PersonalOffsets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static PersonalOffsets GetOffsets(FileHeaderInfo Info)
20 => new PersonalOffsets111(),
21 => new PersonalOffsets111(),
22 => new PersonalOffsets20(),
23 => new PersonalOffsets20(),
_ => throw new IndexOutOfRangeException("Unknown revision!" + Environment.NewLine + Info),
};
}
Expand Down

0 comments on commit 0a36a5d

Please sign in to comment.