mirror of
https://github.com/MoltenMods/Unify.git
synced 2026-10-19 17:56:57 +00:00
Modified modded handshake disable patch
Stopped reactor handshake option getting set true automatically
This commit is contained in:
1 parent
d2a59980b0
commit
c861abbb4f
3 files changed
+5
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
Reference in new issue
Block a user