diff --git a/README.md b/README.md index 472b8a0..b5ba8b8 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ Other mods can add regions via the > If you are still using 2021.3.5s and Reactor fails to load, try using the Reactor version located > here: https://github.com/NuclearPowered/Reactor/actions/runs/636023321. -1. Ensure that BepInEx and Reactor are installed ([installation guide](INSTALLATION.md)). +1. Ensure that BepInEx and Reactor (Reactor is not required for pre releases) are installed + ([installation guide](INSTALLATION.md)). 2. Download the latest mod on the [releases](https://github.com/DaemonBeast/Unify/releases) page for the version of Among Us you are using. 3. Move the mod to the `(Among Us game files)/BepInEx/plugins` folder. diff --git a/Unify/Patches/Regions.cs b/Unify/Patches/Regions.cs index 44652a7..25f2ad6 100644 --- a/Unify/Patches/Regions.cs +++ b/Unify/Patches/Regions.cs @@ -31,7 +31,7 @@ namespace Unify.Patches public static void Patch() { - ServerManager serverManager = ServerManager.Instance; + ServerManager serverManager = ServerManager.CHNDKKBEIDG; IRegionInfo[] patchedRegions = _oldRegions .AddRangeToArray(_newRegions) @@ -40,8 +40,7 @@ namespace Unify.Patches if (DirectRegion != null) patchedRegions = patchedRegions.AddToArray(DirectRegion); ServerManager.DefaultRegions = patchedRegions; - serverManager.AvailableRegions = patchedRegions; - serverManager.SaveServers(); + serverManager.AGFAPIKFOFF = patchedRegions; } private static IRegionInfo[] LoadCustomUserRegions() @@ -86,7 +85,7 @@ namespace Unify.Patches } [HarmonyPatch(typeof(ServerManager), nameof(ServerManager.LoadServers))] - public static class PatchRegionMenuPatch + public static class LoadCustomServersPatch { public static void Postfix() { @@ -99,8 +98,8 @@ namespace Unify.Patches { public static void Postfix() { - JoinGameButton joinGameButton = DestroyableSingleton.Instance; - RegionMenu regionMenu = DestroyableSingleton.Instance; + JoinGameButton joinGameButton = DestroyableSingleton.CHNDKKBEIDG; + RegionMenu regionMenu = DestroyableSingleton.CHNDKKBEIDG; DirectConnect = Object.Instantiate(joinGameButton.GameIdText, regionMenu.transform); DirectConnect.gameObject.SetActive(false); diff --git a/Unify/Unify.cs b/Unify/Unify.cs index 63af2e7..0d91709 100644 --- a/Unify/Unify.cs +++ b/Unify/Unify.cs @@ -6,16 +6,12 @@ using BepInEx; using BepInEx.Configuration; using BepInEx.IL2CPP; using HarmonyLib; -using Hazel.Udp; -using Reactor; using Unify.Patches; namespace Unify { [BepInPlugin(Id, Name, Version)] [BepInProcess("Among Us.exe")] - [BepInDependency(ReactorPlugin.Id)] - [ReactorPluginSide(PluginSide.ClientOnly)] public class UnifyPlugin : BasePlugin { public const string Id = "daemon.unify"; @@ -40,7 +36,7 @@ namespace Unify ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true); // ===================================== - + // Unpatches the modded handshake, because Impostor is STILL not fully updated yet Harmony.Unpatch(typeof(UdpConnection).GetMethod("HandleSend"), HarmonyPatchType.Prefix, ReactorPlugin.Id); @@ -50,7 +46,7 @@ namespace Unify public static IRegionInfo AddRegion(string name, string ip) { - if (Uri.CheckHostName(ip) != UriHostNameType.IPv4) return ServerManager.Instance.CurrentRegion; + if (Uri.CheckHostName(ip) != UriHostNameType.IPv4) return ServerManager.CHNDKKBEIDG.HMIJGFFKBNN; IRegionInfo existingRegion = ServerManager.DefaultRegions.ToArray().FirstOrDefault(region => region.PingServer == ip); diff --git a/Unify/Unify.csproj b/Unify/Unify.csproj index 47e2a6b..cf77728 100644 --- a/Unify/Unify.csproj +++ b/Unify/Unify.csproj @@ -19,18 +19,308 @@ - + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\0Harmony.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Apple.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\AppleCore.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\AppleMacos.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Assembly-CSharp.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Assembly-CSharp-firstpass.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\BepInEx.Core.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\BepInEx.IL2CPP.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\FacebookStore.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Hazel.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppMono.Security.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2Cppmscorlib.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Configuration.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Core.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Data.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Net.Http.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Numerics.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Runtime.Serialization.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Xml.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Il2CppSystem.Xml.Linq.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Newtonsoft.Json.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Purchasing.Common.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\QRCoder.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Rewired_Core.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Rewired_Windows.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Security.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Stores.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\core\UnhollowerBaseLib.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.Addressables.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.Analytics.DataPrivacy.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.ResourceManager.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\Unity.TextMeshPro.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AccessibilityModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AIModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AndroidJNIModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AnimationModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ARModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AssetBundleModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.AudioModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ClothModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ClusterInputModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ClusterRendererModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.CoreModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.CrashReportingModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.DirectorModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.DSPGraphModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.GameCenterModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.GIModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.GridModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.HotReloadModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ImageConversionModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.IMGUIModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.InputLegacyModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.InputModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.JSONSerializeModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.LocalizationModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ParticleSystemModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.PerformanceReportingModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.Physics2DModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.PhysicsModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ProfilerModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.Purchasing.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.ScreenCaptureModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SharedInternalsModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SpriteMaskModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SpriteShapeModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.StreamingModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SubstanceModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.SubsystemsModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TerrainModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TerrainPhysicsModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TextCoreModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TextRenderingModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TilemapModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.TLSModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UI.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UIElementsModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UIElementsNativeModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UIModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UmbraModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UNETModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityAnalyticsModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityConnectModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityCurlModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityTestProtocolModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestAssetBundleModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestAudioModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestTextureModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.UnityWebRequestWWWModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VehiclesModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VFXModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VideoModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VirtualTexturingModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.VRModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.WindModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\UnityEngine.XRModule.dll + + + ..\..\..\Program Files\SteamLibrary\steamapps\common\Among Us\BepInEx\unhollowed\winrt.dll + - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - \ No newline at end of file