diff --git a/Core/Config/Config.cs b/Core/Config/Config.cs index bfd6f65..127b5fe 100644 --- a/Core/Config/Config.cs +++ b/Core/Config/Config.cs @@ -36,11 +36,15 @@ namespace undead_universal_patch_il2cpp.Core.Config { public static ConfigEntry CustomEmotes; public static ConfigEntry CustomPhoton; + public static ConfigEntry CustomMarquee; + public static ConfigEntry CustomKnownDlls; } public static class ServerPatchesConfigDefaults { public static bool CustomEmotes = false; public static bool CustomPhoton = false; + public static bool CustomMarquee = false; + public static bool CustomKnownDlls = false; } public static class GameManagerConfig { diff --git a/Core/Config/DediConfig.cs b/Core/Config/DediConfig.cs index 82a9a0c..9ad8b0a 100644 --- a/Core/Config/DediConfig.cs +++ b/Core/Config/DediConfig.cs @@ -37,11 +37,11 @@ public class DediConfig if (loaded) return cached; string data = GetAlways(); - cached = JsonSerializer.Deserialize(data, _options == null ? new JsonSerializerOptions() + cached = JsonSerializer.Deserialize(data, _options ?? new JsonSerializerOptions() { PropertyNameCaseInsensitive = true, AllowTrailingCommas = true - } : _options); + }); loaded = true; return cached; diff --git a/Core/Content/CustomRecNet/CheatManager/CustomCheatManager.cs b/Core/Content/CustomRecNet/CheatManager/CustomCheatManager.cs new file mode 100644 index 0000000..9e4395e --- /dev/null +++ b/Core/Content/CustomRecNet/CheatManager/CustomCheatManager.cs @@ -0,0 +1,38 @@ +using BestHTTP; +using System.Collections.Generic; +using undead_universal_patch_il2cpp.Core.Config; +using undead_universal_patch_il2cpp.Patches; +using UnityEngine; + +namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CheatManager; + +public class CustomCheatManager : MonoBehaviour +{ + + public void Start() + { + if (ServerPatchesConfig.CustomKnownDlls.Value) RecNetInteractions.postNameServerActions.Add(DownloadKnownDlls); + } + + void Patch(HTTPResponse _res, List dlls) + { + UniversalPatchPlugin.Log.LogInfo("Setting new KnownDlls (server)"); + + HilePatch.Patch([.. dlls]); + } + + void OnFailed(HTTPResponse _res) + { + if (PatchConfig.HilePatch.Value) + { + UniversalPatchPlugin.Log.LogInfo("Setting new KnownDlls (local fallback)"); + HilePatch.Patch(); + } + } + + void DownloadKnownDlls() + { + RecNetInteractions.SendRequest>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/knowndlls", Patch, OnFailed); + } + +} \ No newline at end of file diff --git a/Core/Content/CustomRecNet/CustomGameManager/CustomFreeSpawns.cs b/Core/Content/CustomRecNet/CustomGameManager/CustomFreeSpawns.cs new file mode 100644 index 0000000..46a468c --- /dev/null +++ b/Core/Content/CustomRecNet/CustomGameManager/CustomFreeSpawns.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; +using BestHTTP; +using undead_universal_patch_il2cpp.Patches.UndeadGameManager; +using UnityEngine; + +namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomGameManager; + +public class CustomFreeSpawns : MonoBehaviour +{ + public void Start() + { + RecNetInteractions.postAuthenticationActions.Add(DownloadFreeSpawns); + } + + public void OnFailed([Optional] HTTPResponse res) + { + Util.ConditionalDebug($"CustomFreeSpawns failed: HTTP Error {res.StatusCode}"); + } + + public void Finished(HTTPResponse res, List spawns) + { + FreeSpawnsPatch_Array.spawns = spawns; + } + + public void DownloadFreeSpawns() + { + RecNetInteractions.SendRequest>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/freespawns", Finished, OnFailed); + } +} \ No newline at end of file diff --git a/Core/Content/CustomRecNet/CustomGameManager/CustomGameManager.cs b/Core/Content/CustomRecNet/CustomGameManager/CustomGameManager.cs new file mode 100644 index 0000000..e5bf658 --- /dev/null +++ b/Core/Content/CustomRecNet/CustomGameManager/CustomGameManager.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Runtime.InteropServices; +using BestHTTP; +using undead_universal_patch_il2cpp.Core.Content.UndeadGameManager; +using undead_universal_patch_il2cpp.Patches.UndeadGameManager; +using UnityEngine; + +namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomGameManager; + +public class CustomGameManager : MonoBehaviour +{ + public void Start() + { + RecNetInteractions.postAuthenticationActions.Add(DownlaodGameConfigAssets); + } + + public void OnFailed([Optional] HTTPResponse res) + { + Util.ConditionalDebug($"CustomGameManager failed: HTTP Error {res.StatusCode}"); + } + + public void Finished(HTTPResponse res, Dictionary configs) + { + GameConfiguratorPatch.gameConfig = configs; + } + + public void DownlaodGameConfigAssets() + { + RecNetInteractions.SendRequest>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/gameconfigassets", Finished, OnFailed); + } +} \ No newline at end of file diff --git a/Core/Content/CustomRecNet/CustomPhoton/CustomPhoton.cs b/Core/Content/CustomRecNet/CustomPhoton/CustomPhoton.cs index f89e852..a19c710 100644 --- a/Core/Content/CustomRecNet/CustomPhoton/CustomPhoton.cs +++ b/Core/Content/CustomRecNet/CustomPhoton/CustomPhoton.cs @@ -1,6 +1,5 @@ using System; using BestHTTP; -using Il2CppInterop.Runtime; using undead_universal_patch_il2cpp.Core.Config; using undead_universal_patch_il2cpp.Patches.Photon; using UnityEngine; @@ -24,31 +23,32 @@ public class CustomPhoton : MonoBehaviour public void Start() { - RecNetInteractions.postLocalAccountActions.Add(DownloadServerConfig); + if (ServerPatchesConfig.CustomPhoton.Value) RecNetInteractions.postLocalAccountActions.Add(DownloadServerConfig); + else if (PhotonConfig.PatchPhotonIds.Value) LocalPatch(); + } + + void LocalPatch() + { + UniversalPatchPlugin.Log.LogInfo("Attempting Photon patch from local configuration"); + PhotonPatch.Patch(new PhotonConfigDTO + { + Logging = PhotonConfig.PunLogging.Value, + AppID = PhotonConfig.AppID.Value, + VoiceAppID = PhotonConfig.VoiceAppID.Value, + SelfHosted = PhotonConfig.SelfHosted.Value, + ServerAddress = PhotonConfig.ServerAddress.Value, + ServerPort = PhotonConfig.ServerPort.Value, + ConnectionProtocol = PhotonConfig.ConnectionProtocol.Value + }); } void OnServerConfigFailed(HTTPResponse res) { ServerConfigFailed = true; - if (PhotonConfig.PatchPhotonIds.Value) - { - UniversalPatchPlugin.Log.LogInfo("Attempting Photon patch from local configuration"); - PhotonPatch.Patch(new PhotonConfigDTO - { - Logging = PhotonConfig.PunLogging.Value, - AppID = PhotonConfig.AppID.Value, - VoiceAppID = PhotonConfig.VoiceAppID.Value, - SelfHosted = PhotonConfig.SelfHosted.Value, - ServerAddress = PhotonConfig.ServerAddress.Value, - ServerPort = PhotonConfig.ServerPort.Value, - ConnectionProtocol = PhotonConfig.ConnectionProtocol.Value - }); - } + if (PhotonConfig.PatchPhotonIds.Value) LocalPatch(); } void ApplyPhotonConfig(HTTPResponse res, PhotonConfigDTO photonConfig) { - if (!ServerPatchesConfig.CustomPhoton.Value) return; - try { UniversalPatchPlugin.Log.LogInfo("Attempting Photon patch from server configuration"); diff --git a/Core/Content/CustomRecNet/CustomRecNet.cs b/Core/Content/CustomRecNet/CustomRecNet.cs index f9f641a..9065b03 100644 --- a/Core/Content/CustomRecNet/CustomRecNet.cs +++ b/Core/Content/CustomRecNet/CustomRecNet.cs @@ -15,6 +15,7 @@ public class RecNetInteractions public static List postNameServerActions = []; public static List postAuthenticationActions = []; public static List postLocalAccountActions = []; + public static List onNotificationsOpen = []; public static Il2CppSystem.Uri CreateServiceUri(Service service, string pathAndQuery) { diff --git a/Core/Content/GameManager/GameConfigurator.cs b/Core/Content/GameManager/GameConfigurator.cs deleted file mode 100644 index 712755a..0000000 --- a/Core/Content/GameManager/GameConfigurator.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using undead_universal_patch_il2cpp.Core.Config; - -namespace undead_universal_patch_il2cpp.Core.Content.UndeadGameManager; - -public static class GameConfigurator -{ - static readonly string name = "GameConfigurations"; - public static DediConfig> config = new(name, "{}", null); -} \ No newline at end of file diff --git a/Core/Content/GameManager/GameManSpawns.cs b/Core/Content/GameManager/GameManSpawns.cs deleted file mode 100644 index 93f703a..0000000 --- a/Core/Content/GameManager/GameManSpawns.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using undead_universal_patch_il2cpp.Core.Config; - -namespace undead_universal_patch_il2cpp.Core.Content.UndeadGameManager; - -public static class GameFreeSpawns -{ - static readonly string name = "GameFreeSpawns"; - public static DediConfig> config = new(name, "[]", null); -} \ No newline at end of file diff --git a/Core/Init.cs b/Core/Init.cs index b275b33..21dc13d 100644 --- a/Core/Init.cs +++ b/Core/Init.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Mapster; using undead_universal_patch_il2cpp.Core.Config; +using undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CheatManager; using undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomEmotes; using undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomPhoton; using undead_universal_patch_il2cpp.Core.Content.UndeadGameManager; @@ -33,7 +35,10 @@ public class Initialization { UniversalPatchPlugin.Log.LogInfo("PATCH LIST START ========================="); foreach (var method in UniversalPatchPlugin.Instance.HarmonyInstance.GetPatchedMethods()) - UniversalPatchPlugin.Log.LogInfo($"- {method.ToString()}"); + { + var paramStr = string.Join(" ", [.. method.GetParameters().Select(param => param.ParameterType.FullName)]); + UniversalPatchPlugin.Log.LogInfo($"- {method.DeclaringType.FullName} {method.Name}({paramStr})"); + } UniversalPatchPlugin.Log.LogInfo("PATCH LIST END ========================="); } @@ -49,8 +54,6 @@ public class Initialization private static void CacheChangePatchConfigs() { - if (GameManagerConfig.AnyGameFreeSpawn.Value) GameFreeSpawns.config.Get(); - if (GameManagerConfig.StaticGameConfig.Value) GameConfigurator.config.Get(); VideoTamperPatch.config.Get(); } @@ -60,6 +63,7 @@ public class Initialization if (ServerPatchesConfig.CustomEmotes.Value) UniversalPatchPlugin.Instance.AddComponent(); UniversalPatchPlugin.Instance.AddComponent(); + if (ServerPatchesConfig.CustomKnownDlls.Value) UniversalPatchPlugin.Instance.AddComponent(); } private static void FetchConfigurations() @@ -91,11 +95,15 @@ public class Initialization "Patch Photon ServerSettings values with a configuration from the server." + "\nWhen the server fails to provide a valid configuration, values from the local config will be used." + "\nPhoton.PatchPhotonIds must be enabled for this fallback to work."); + ServerPatchesConfig.CustomMarquee = UniversalPatchPlugin.Instance.Config.Bind("ServerPatches", "CustomMarquee", ServerPatchesConfigDefaults.CustomMarquee, + "Set custom text on the ^reccenter theater marquee."); + ServerPatchesConfig.CustomKnownDlls = UniversalPatchPlugin.Instance.Config.Bind("ServerPatches", "CustomKnownDlls", ServerPatchesConfigDefaults.CustomKnownDlls, + "Add items to the list of known DLLs."); GameManagerConfig.AnyGameFreeSpawn = UniversalPatchPlugin.Instance.Config.Bind("GameManagerConfig", "AnyGameFreeSpawn", GameManagerConfigDefaults.AnyGameFreeSpawn, - $"Use patches from '{GameFreeSpawns.config.path}' to spawn in any valid player spawnpoint in specified games. See README.md"); + $"Spawn in any valid player spawnpoint in specified games. See README.md"); GameManagerConfig.StaticGameConfig = UniversalPatchPlugin.Instance.Config.Bind("GameManagerConfig", "StaticGameConfig", GameManagerConfigDefaults.StaticGameConfig, - $"Use patches from '{GameConfigurator.config.path}' to set new configurations for built-in games. See README.md"); + $"Set new configurations for built-in games. See README.md"); PhotonConfig.PatchPhotonIds = UniversalPatchPlugin.Instance.Config.Bind("Photon", "PatchPhotonIds", PhotonConfigDefaults.PatchPhotonIds, "Patch Photon configuration."); diff --git a/LICENSE.txt b/LICENSE.txt index 6bf5246..f4e6084 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 proxnet.dev +Copyright (c) 2025 proxnet.dev by @zombieb Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Patches/BestHTTP.cs b/Patches/BestHTTP.cs index 30a1e7c..98ddff8 100644 --- a/Patches/BestHTTP.cs +++ b/Patches/BestHTTP.cs @@ -1,6 +1,8 @@ using System; using System.Reflection; +using System.Security.Cryptography; using BestHTTP; +using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls; using HarmonyLib; using undead_universal_patch_il2cpp.Core; using undead_universal_patch_il2cpp.Core.Config; @@ -35,7 +37,7 @@ namespace undead_universal_patch_il2cpp.Patches ]).Success; static MethodBase TargetMethod() => patchResult.Method; - + [HarmonyPrefix] static void Prefix(ref object request) { @@ -66,7 +68,7 @@ namespace undead_universal_patch_il2cpp.Patches if (GenericConfig.LogAllRequests.Value) { - if (GenericConfig.VerboseRequestLogs.Value) UniversalPatchPlugin.Log.LogInfo("BestHTTP Request Log\n" + + if (GenericConfig.VerboseRequestLogs.Value) UniversalPatchPlugin.Log.LogInfo($"BestHTTP Request Log{(customCertProp.GetGetMethod().Invoke(request, []) == null ? "" : " (verify)")}\n" + $" URL Before : {beforeUrl}\n" + $" URL After : {(beforeUrl == afterUrl ? "(unmodified)" : afterUrl)}\n" + $" Method : {method}\n" + diff --git a/Patches/GameManager/FreeSpawns.cs b/Patches/GameManager/FreeSpawns.cs index c76f9f2..4871728 100644 --- a/Patches/GameManager/FreeSpawns.cs +++ b/Patches/GameManager/FreeSpawns.cs @@ -1,17 +1,15 @@ -using System; using System.Collections.Generic; using System.Reflection; using HarmonyLib; using undead_universal_patch_il2cpp.Core; using undead_universal_patch_il2cpp.Core.Config; -using undead_universal_patch_il2cpp.Core.Content.UndeadGameManager; namespace undead_universal_patch_il2cpp.Patches.UndeadGameManager; [HarmonyPatch] public class FreeSpawnsPatch_Array { - public static List config = GameFreeSpawns.config.Get(); + public static List spawns = null; static PatchTypesResult patchResult = Util.ConfigPreparePatchTypes( GameManagerConfig.AnyGameFreeSpawn, @@ -26,6 +24,12 @@ public class FreeSpawnsPatch_Array public static void Postfix(ref GamePlayerSpawnPoint __instance) { + if (spawns == null) + { + Util.ConditionalDebug("FreeSpawns was not yet fetched!"); + return; + } + Util.ConditionalDebug("Attempting FreeSpawns patch"); GameManager man = NetworkedSingletonMonoBehaviour.instance; @@ -39,7 +43,7 @@ public class FreeSpawnsPatch_Array Util.ConditionalDebug("CurrentGameConfiguration.configurationData was null"); return; } - if (!config.Contains(man.CurrentGameConfiguration.configurationData.Name)) + if (!spawns.Contains(man.CurrentGameConfiguration.configurationData.Name)) { Util.ConditionalDebug($"Game '{man.CurrentGameConfiguration.configurationData.Name}' is not specified by GameFreeSpawns"); return; diff --git a/Patches/GameManager/GameConfigurator.cs b/Patches/GameManager/GameConfigurator.cs index 151678a..0904150 100644 --- a/Patches/GameManager/GameConfigurator.cs +++ b/Patches/GameManager/GameConfigurator.cs @@ -13,7 +13,7 @@ namespace undead_universal_patch_il2cpp.Patches.UndeadGameManager; [HarmonyPatch] public class GameConfiguratorPatch { - static Dictionary gameConfig = GameConfigurator.config.Get(); + public static Dictionary gameConfig = null; static PatchTypesResult patchResult = Util.ConfigPreparePatchTypes( GameManagerConfig.StaticGameConfig, @@ -28,6 +28,12 @@ public class GameConfiguratorPatch public static void Prefix(ref GameConfigurationAsset config, ref bool showNotification) { + if (gameConfig == null) + { + Util.ConditionalDebug("gameconfigassets was not yet fetched!"); + return; + } + var conf = config; showNotification = GenericConfig.PatchDebug.Value; diff --git a/Patches/HilePatch.cs b/Patches/HilePatch.cs index d3ca85a..4beeee8 100644 --- a/Patches/HilePatch.cs +++ b/Patches/HilePatch.cs @@ -1,4 +1,6 @@ -using System.Reflection; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; using HarmonyLib; using undead_universal_patch_il2cpp.Core; using undead_universal_patch_il2cpp.Core.Config; @@ -22,19 +24,16 @@ namespace undead_universal_patch_il2cpp.Patches static void Prefix() { - if (PatchConfig.HilePatch.Value) HilePatch.Patch(); + if (!ServerPatchesConfig.CustomKnownDlls.Value && PatchConfig.HilePatch.Value) HilePatch.Patch(); } } public static class HilePatch { - public static void Patch() + public static void Patch([Optional] string[] dlls) { - GameObject cheatManagerObject = GameObject.Find("[CheatManager]"); - HileManager hileManager = cheatManagerObject.GetComponent(); - - PropertyInfo knownDllsProperty = AccessTools.Property(typeof(HileManager), "KnownDlls"); - knownDllsProperty.SetValue(hileManager, new Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppStringArray([ + Util.ConditionalDebug($"Patching KnownDlls with {(dlls != null ? dlls.Length : 0)} new filenames"); + string[] baseDlls = [ "GameAssembly.dll", "UnityPlayer.dll", "WinPixEventRuntime.dll", @@ -46,9 +45,16 @@ namespace undead_universal_patch_il2cpp.Patches "ddraw.dll", "dxgi.dll", "winhttp.dll" - ])); + ]; + if (dlls != null) baseDlls = baseDlls.Concat(dlls).ToArray(); - UniversalPatchPlugin.Log.LogInfo("Hile patch succeeded."); + GameObject cheatManagerObject = GameObject.Find("[CheatManager]"); + HileManager hileManager = cheatManagerObject.GetComponent(); + + PropertyInfo knownDllsProperty = AccessTools.Property(typeof(HileManager), "KnownDlls"); + knownDllsProperty.SetValue(hileManager, new Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppStringArray(baseDlls)); + + UniversalPatchPlugin.Log.LogInfo($"Hile patch succeeded: {baseDlls.Length} new KnownDlls."); } } } diff --git a/Patches/Internals/LockerroomOOBEFlow.cs b/Patches/Internals/LockerroomOOBEFlow.cs new file mode 100644 index 0000000..c0be358 --- /dev/null +++ b/Patches/Internals/LockerroomOOBEFlow.cs @@ -0,0 +1,30 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using undead_universal_patch_il2cpp.Core; +using UnityEngine; + +namespace undead_universal_patch_il2cpp.Patches.Internals +{ + [HarmonyPatch] + public class LockerroomOOBEFlow + { + static PatchTypesResult patchResult = Util.PreparePatchTypes( + "Event patch for changing marquee text in the reccenter", + "LockerroomOOBEFlow", + "Start" + ); + + static bool Prepare() => patchResult.Success; + static MethodBase TargetMethod() => patchResult.Method; + + static void Postfix() + { + + } + } +} diff --git a/Patches/Internals/NotificationTargets/MarqueeTexts.cs b/Patches/Internals/NotificationTargets/MarqueeTexts.cs new file mode 100644 index 0000000..681630c --- /dev/null +++ b/Patches/Internals/NotificationTargets/MarqueeTexts.cs @@ -0,0 +1,45 @@ +using Il2CppInterop.Runtime; +using RecNet; +using System.Collections.Generic; +using System.Linq; +using undead_universal_patch_il2cpp.Core.Config; +using undead_universal_patch_il2cpp.Core.Content.CustomRecNet; +using UnityEngine; + +namespace undead_universal_patch_il2cpp.Patches.Internals.NotificationTargets +{ + public class MarqueeTexts : MonoBehaviour + { + void Start() + { + if (ServerPatchesConfig.CustomMarquee.Value) + { + UniversalPatchPlugin.Log.LogWarning("CustomMarquee patch is unavailable at this time. A future update may resolve this."); + //RecNetInteractions.onNotificationsOpen.Add(OnSocketOpen); + } + } + + void OnSocketOpen() + { + var d = DelegateSupport.ConvertDelegate(OnTextChange); + RecNet.Notifications.RegisterHandler("MarqueeTexts", d); + } + + void OnTextChange(Dictionary args) + { + GameObject go = GameObject.Find("DynamicObjects/[RecCenter_Marquee]"); + + string[] transforms = ["Text", "Now Playing", "SubText"]; + var texts = transforms.Select(str => go.transform.Find(str).GetComponent()).ToArray(); + + foreach (var t in transforms) + { + TextMesh tm = go.transform.Find(t).GetComponent(); + args.TryGetValue(t, out string res); + tm.text = res; + } + + Core.Util.ConditionalDebug("Replaced marquee texts"); + } + } +} diff --git a/Patches/Internals/Notifications.cs b/Patches/Internals/Notifications.cs new file mode 100644 index 0000000..9f75101 --- /dev/null +++ b/Patches/Internals/Notifications.cs @@ -0,0 +1,28 @@ +using HarmonyLib; +using Il2CppInterop.Runtime; +using RecNet; +using System.Reflection; +using undead_universal_patch_il2cpp.Core; +using undead_universal_patch_il2cpp.Core.Content.CustomRecNet; + +namespace undead_universal_patch_il2cpp.Patches.Internals +{ + [HarmonyPatch] + public class Notifications + { + static PatchTypesResult patchResult = Core.Util.PreparePatchTypes( + "Event patch for notification availability", + "RecNet.Notifications", + "OnOpenInternal" + ); + + static bool Prepare() => patchResult.Success; + static MethodBase TargetMethod() => patchResult.Method; + + static void Postfix(ref SignalRHubConnection hub) + { + UniversalPatchPlugin.Log.LogInfo("Running onNotificationsOpen actions"); + foreach (var action in RecNetInteractions.onNotificationsOpen) action(); + } + } +} diff --git a/Patches/Internals/PostAuthentication.cs b/Patches/Internals/PostAuthentication.cs index dd7bef1..574a1b1 100644 --- a/Patches/Internals/PostAuthentication.cs +++ b/Patches/Internals/PostAuthentication.cs @@ -36,6 +36,5 @@ public class AuthenticationEventPatch action(); } else RanPostActions = true; - } } \ No newline at end of file diff --git a/Patches/Photon/NameserverTest.cs b/Patches/Photon/NameserverTest.cs deleted file mode 100644 index 06d53be..0000000 --- a/Patches/Photon/NameserverTest.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using HarmonyLib; -using undead_universal_patch_il2cpp.Core; - -namespace undead_universal_patch_il2cpp.Patches.Photon; - -[HarmonyPatch] -public class NameserverTest -{ - static PatchTypesResult patchTypesResult = Util.PreparePatchTypes( - "Photon nameserver test", - "NetworkingPeer", - "GetNameServerAddress" - ); - - static bool Prepare() => patchTypesResult.Success; - static MethodBase TargetMethod() => patchTypesResult.Method; -} \ No newline at end of file diff --git a/Patches/Photon/PhotonPatch.cs b/Patches/Photon/PhotonPatch.cs index 6f8b362..72839c7 100644 --- a/Patches/Photon/PhotonPatch.cs +++ b/Patches/Photon/PhotonPatch.cs @@ -37,7 +37,7 @@ public class PhotonPatch PropertyInfo voiceAppIdProperty = serverSettingsType.GetRuntimeProperty("VoiceAppID"); Util.ConditionalDebug($"New Photon AppID: '{photonConfig.AppID}'"); - Util.ConditionalDebug($"New Photon AppID: '{photonConfig.VoiceAppID}'"); + Util.ConditionalDebug($"New Photon VoiceAppID: '{photonConfig.VoiceAppID}'"); appIdProperty.SetValue(serverSettings, photonConfig.AppID); voiceAppIdProperty.SetValue(serverSettings, photonConfig.VoiceAppID); diff --git a/Plugin.cs b/Plugin.cs index 6bb4550..8486997 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -6,7 +6,7 @@ using undead_universal_patch_il2cpp.Core; namespace undead_universal_patch_il2cpp; -[BepInPlugin("dev.proxnet.recroom.universalpatch.noneac.il2cpp", "Undead Universal Patch", "2.1.1")] +[BepInPlugin("dev.proxnet.recroom.universalpatch.noneac.il2cpp", "Undead Universal Patch", "2.2.0")] public class UniversalPatchPlugin : BasePlugin { public static new readonly ManualLogSource Log = Logger.CreateLogSource("UUPatch"); diff --git a/README.md b/README.md index 0ce8d63..89df146 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,9 @@ Run BepInEx interop on your build and add the following assemblies to new folder - `BepInEx/interop/Il2CppSystem.dll` - `BepInEx/interop/Photon3Unity3D.dll` - `BepInEx/interop/RecRoom.Datastructures.Runtime` -` `BepInEx/interop/RecRoom.Promises.Runtime` +- `BepInEx/interop/RecRoom.Promises.Runtime` - `BepInEx/interop/UnityEngine.CoreModule.dll` +- `BepInEx/interop/UnityEngine.TextRenderingModule.dll` ## Dependencies diff --git a/SERVERS.md b/SERVERS.md index 7b44924..9263d07 100644 --- a/SERVERS.md +++ b/SERVERS.md @@ -32,6 +32,14 @@ Voice will go over the same gameserver port as PUN does when selfhosting. See [the source](./Core/Content/CustomRecNet/CustomPhoton/CustomPhoton.cs) for more information. +### `API: GET "/api/undead/v1/knowndlls"` (post-nameserver) +Expects: `List` + +Add custom DLL filenames to `CheatManager.KnownDlls`. `winhttp.dll` is added by default and does not need to be specified by the server. +When the server patch is enabled at the same time as the local patch (HilePatch), the local patch will be used as a fallback and will add only `winhttp.dll`. + +See [the source](./Core/Content/CustomRecNet/CheatManager/CustomCheatManager.cs) for more information. + ## DTOs ### `EmoteConfigDTO` diff --git a/undead-universal-patch-il2cpp.csproj b/undead-universal-patch-il2cpp.csproj index 2887ba1..e77502f 100644 --- a/undead-universal-patch-il2cpp.csproj +++ b/undead-universal-patch-il2cpp.csproj @@ -4,7 +4,7 @@ net6.0 undead_universal_patch_il2cpp Non-EAC, IL2CPP build patcher for Rec Room (Late 2018*-*April 2020) - 2.1.1 + 2.2.0 true latest @@ -15,6 +15,10 @@ undead_universal_patch_il2cpp + + + + @@ -42,5 +46,8 @@ AssemblyReferences\UnityEngine.CoreModule.dll + + ..\RecRoom 4766551521966830741\BepInEx\interop\UnityEngine.TextRenderingModule.dll +