diff --git a/Components/JvsPatches.cs b/Components/JvsPatches.cs index cd132fe..7bafb07 100644 --- a/Components/JvsPatches.cs +++ b/Components/JvsPatches.cs @@ -210,8 +210,6 @@ private static bool getTriggerOff(ref bool __result, JvsButtonID __0) return false; } - // Use height because the touchpad is rotated - [MethodPatch(PatchType.Prefix, typeof(Jvs), "getAnalog")] private static bool getAnalog(ref float __result) { diff --git a/Components/SaveLoad/PacketPatches.cs b/Components/SaveLoad/PacketPatches.cs index 9810574..76945be 100644 --- a/Components/SaveLoad/PacketPatches.cs +++ b/Components/SaveLoad/PacketPatches.cs @@ -427,6 +427,23 @@ private static bool PacketGetUserBpBaseProc(ref Packet.State __result, ref Packe return true; } + [MethodPatch(PatchType.Prefix, typeof(PacketGetUserTechCount), "proc")] + private static bool PacketGetUserTechCountProc(ref Packet.State __result, ref PacketGetUserTechCount __instance) + { + Log.Info($"PacketGetUserTechCount proc"); + + GetUserTechCount query = __instance.query as GetUserTechCount; + + if (!FileSystem.Configuration.FileExists("UserTechCount.json")) + { + query.response_ = GetUserTechCountResponse.create(); + FileSystem.Configuration.SaveJson("UserTechCount.json", query.response_); + } + + query.response_ = FileSystem.Configuration.LoadJson("UserTechCount.json"); + return true; + } + [MethodPatch(PatchType.Prefix, typeof(PacketGameLogin), "proc")] private static bool PacketGameLoginProc(ref Packet.State __result, PacketGameLogin __instance) { diff --git a/Components/SerialPatches.cs b/Components/SerialPatches.cs index 4461e10..c304763 100644 --- a/Components/SerialPatches.cs +++ b/Components/SerialPatches.cs @@ -12,7 +12,7 @@ public static void Patch() [MethodPatch(PatchType.Prefix, typeof(SerialId), "get_Value")] private static bool GetSerialId(ref string __result) { - __result = "T3KNOG0DZ"; + __result = "T3KNOG0DZ/FLAME"; return false; } diff --git a/Components/SysConfigPatches.cs b/Components/SysConfigPatches.cs index 61507db..c46adba 100644 --- a/Components/SysConfigPatches.cs +++ b/Components/SysConfigPatches.cs @@ -1,5 +1,4 @@ using MU3; -using MU3.Sys; using System.IO; using UnityEngine; @@ -25,7 +24,6 @@ public static void Patch() Harmony.MakeRET(typeof(MU3.Sys.Config), "get_isUseNetwork", false); Harmony.MakeRET(typeof(MU3.Sys.Config), "get_isUseAllnet", false); Harmony.MakeRET(typeof(MU3.Sys.Config), "get_isUseLocalCollab", false); - Harmony.MakeRET(typeof(MU3.Sys.Config), "get_isForceLogout", false); // get_serverUri // get_cameraType Harmony.MakeRET(typeof(MU3.Sys.Config), "get_isKeyboardInput", true); @@ -74,12 +72,5 @@ static bool LogPath(ref string __result) __result = Directory.GetCurrentDirectory(); return false; } - - [MethodPatch(PatchType.Prefix, typeof(MU3.SystemUI), "initialize")] - static bool initialize() - { - Screen.fullScreen = SettingsManager.instance.settings.DisplayFullscreen; - return true; - } } } diff --git a/FileSystem.cs b/FileSystem.cs index 74a4915..9273378 100644 --- a/FileSystem.cs +++ b/FileSystem.cs @@ -36,7 +36,6 @@ public static string TimePrefix(string data) public T LoadJson(string fileName) { return JsonUtility.FromJson(File.ReadAllText($"{m_basePath}\\{fileName}")); - //return JsonConvert.DeserializeObject(File.ReadAllText($"{m_basePath}\\{fileName}")); } public T TryLoadJson(string fileName) @@ -52,7 +51,6 @@ public T TryLoadJson(string fileName) public void SaveJson(string fileName, T data) { File.WriteAllText($"{m_basePath}\\{fileName}", JsonUtility.ToJson(data, true)); - //File.WriteAllText($"{m_basePath}\\{fileName}", JsonConvert.SerializeObject(data, Formatting.Indented)); } public string LoadText(string fileName)