Browse Source

Update to work with 1.48

ghorsington 10 months ago
parent
commit
d0748cdf97
1 changed files with 1 additions and 13 deletions
  1. 1 13
      COM3D2.CacheEditMenu/Hooks.cs

+ 1 - 13
COM3D2.CacheEditMenu/Hooks.cs

@@ -29,7 +29,7 @@ namespace COM3D2.CacheEditMenu
 
     public static class Hooks
     {
-        private const int CACHE_VERSION = 1021;
+        private const int CACHE_VERSION = 1030;
 
         private static readonly Dictionary<string, MenuInfo> infoCache = new Dictionary<string, MenuInfo>();
         private static BinaryWriter cacheWriter;
@@ -206,14 +206,6 @@ namespace COM3D2.CacheEditMenu
                         return false;
                     }
 
-                    var menuFilesHashSize = br.ReadInt32();
-                    var menuFilesHash = br.ReadBytes(menuFilesHashSize);
-                    if (!menuFilesHash.SequenceEqual(HashMenus(GameUty.MenuFiles)))
-                    {
-                        Debug.LogWarning(".menu files changed, rebuilding cache...");
-                        return false;
-                    }
-                            
                     var modMenuFilesHashSize = br.ReadInt32();
                     var modMenuFilesHash = br.ReadBytes(modMenuFilesHashSize);
                     if (!modMenuFilesHash.SequenceEqual(HashMenus(GameUty.ModOnlysMenuFiles)))
@@ -260,12 +252,8 @@ namespace COM3D2.CacheEditMenu
             if (rebuildCache)
             {
                 cacheWriter.Write(CACHE_VERSION);
-                var menuHash = HashMenus(GameUty.MenuFiles);
                 var modMenuHash = HashMenus(GameUty.ModOnlysMenuFiles);
                 
-                cacheWriter.Write(menuHash.Length);
-                cacheWriter.Write(menuHash);
-                
                 cacheWriter.Write(modMenuHash.Length);
                 cacheWriter.Write(modMenuHash);