Change regions after ServerManager.LoadServers instead of on game load

This commit is contained in:
Daemon committed 2021-04-14 12:11:16 +01:00
1 parent e26fbccdb9
commit 7c1e2533b2
3 files changed
+10 -3

No files matched your search

+9
View File
@@ -84,6 +84,15 @@ namespace Unify.Patches
regionMenu.ChooseOption(newRegion);
regionMenu.Close();
}
[HarmonyPatch(typeof(ServerManager), nameof(ServerManager.LoadServers))]
public static class PatchRegionMenuPatch
{
public static void Postfix()
{
Patch();
}
}
[HarmonyPatch(typeof(RegionMenu), nameof(RegionMenu.Open))]
public static class DirectConnectButtonPatch
+1 -3
View File
@@ -40,9 +40,7 @@ namespace Unify
ConfigFile = new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
// =====================================
RegionsPatch.Patch();
// Unpatches the modded handshake, because Impostor is STILL not fully updated yet
Harmony.Unpatch(typeof(UdpConnection).GetMethod("HandleSend"), HarmonyPatchType.Prefix,
ReactorPlugin.Id);
Binary file not shown.