From 22f6b727c706dd319350ccc6da362a4a3a3c607e Mon Sep 17 00:00:00 2001 From: Tyler Camp Date: Mon, 8 Jul 2024 08:37:19 -0400 Subject: [PATCH] Bugfix - Handle UInt32 properties in new saves --- PalCalc.SaveReader/FArchive/FArchiveReader.cs | 11 +++++++++++ PalCalc.SaveReader/FArchive/IVisitor.cs | 1 + 2 files changed, 12 insertions(+) diff --git a/PalCalc.SaveReader/FArchive/FArchiveReader.cs b/PalCalc.SaveReader/FArchive/FArchiveReader.cs index 4eee0785..b35b4077 100644 --- a/PalCalc.SaveReader/FArchive/FArchiveReader.cs +++ b/PalCalc.SaveReader/FArchive/FArchiveReader.cs @@ -240,6 +240,17 @@ public IProperty ReadProperty(string typeName, ulong size, string path, string n return res; } + case "UInt32Property": + { + var res = LiteralProperty.Create(path, ReadOptionalGuid(), ReadUInt32()); + foreach (var v in pathVisitors) + { + v.VisitLiteralProperty(path, res); + v.VisitUInt32(path, (UInt32)res.Value); + } + return res; + } + case "Int64Property": { var res = LiteralProperty.Create(path, ReadOptionalGuid(), ReadInt64()); diff --git a/PalCalc.SaveReader/FArchive/IVisitor.cs b/PalCalc.SaveReader/FArchive/IVisitor.cs index 38254fb9..ccfe9060 100644 --- a/PalCalc.SaveReader/FArchive/IVisitor.cs +++ b/PalCalc.SaveReader/FArchive/IVisitor.cs @@ -46,6 +46,7 @@ public virtual void Exit() } public virtual void VisitInt(string path, int value) { } + public virtual void VisitUInt32(string path, uint value) { } public virtual void VisitInt64(string path, long value) { } public virtual void VisitDouble(string path, int value) { } // ?????????????? public virtual void VisitFloat(string path, float value) { }