Modified modded handshake disable patch

Stopped reactor handshake option getting set true automatically
This commit is contained in:
Daemon committed 2021-03-19 19:26:51 +00:00
1 parent d2a59980b0
commit c861abbb4f
3 files changed
+5

No files matched your search

+3
View File
@@ -70,6 +70,7 @@ namespace Unify.Patches
[HarmonyBefore(new string[] { "gg.reactor.api" })]
public static void Prefix()
{
if (UnifyPlugin.HandshakeDisabled) return;
if (!UnifyPlugin.NormalHandshake.Contains(ServerManager.Instance.CurrentRegion.Name)) return;
PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value = false;
@@ -77,6 +78,8 @@ namespace Unify.Patches
public static void Postfix()
{
if (UnifyPlugin.HandshakeDisabled) return;
PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value = true;
}
}
+2
View File
@@ -20,6 +20,8 @@ namespace Unify
public static readonly ConfigFile ConfigFile =
new ConfigFile(Path.Combine(Paths.ConfigPath, $"{UnifyPlugin.Id}.cfg"), true);
public static readonly bool HandshakeDisabled = !PluginSingleton<ReactorPlugin>.Instance.ModdedHandshake.Value;
public static readonly string[] NormalHandshake =
new string[] {"North America", "Europe", "Asia", "skeld.net"};
Binary file not shown.