mirror of
https://github.com/djdevin/recnet-plugin.git
synced 2026-09-09 07:01:29 -07:00
add advanced settings
This commit is contained in:
@@ -55,15 +55,34 @@ public class Photon_AppSettings_Patch
|
||||
private static void Postfix(ref AppSettings __result)
|
||||
{
|
||||
Plugin.Log.LogInfo("okay im patching now");
|
||||
__result = new()
|
||||
|
||||
if (Plugin.EnableAdvancedSettings.Value)
|
||||
{
|
||||
AppVersion = __result?.AppVersion,
|
||||
AppIdRealtime = Plugin.AppIdRT.Value,
|
||||
AppIdVoice = Plugin.AppIdVoice.Value,
|
||||
AppIdChat = Plugin.AppIdChat.Value,
|
||||
FixedRegion = "us",
|
||||
UseNameServer = true,
|
||||
Protocol = ConnectionProtocol.Udp,
|
||||
};
|
||||
__result = new()
|
||||
{
|
||||
AppVersion = __result?.AppVersion,
|
||||
AppIdRealtime = Plugin.AppIdRT.Value,
|
||||
AppIdVoice = Plugin.AppIdVoice.Value,
|
||||
AppIdChat = Plugin.AppIdChat.Value,
|
||||
FixedRegion = "us",
|
||||
UseNameServer = true,
|
||||
Protocol = ConnectionProtocol.Udp,
|
||||
Server = Plugin.PhotonHostname.Value,
|
||||
Port = Plugin.PhotonPort.Value == 0 ? 4533 : Plugin.PhotonPort.Value
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
__result = new()
|
||||
{
|
||||
AppVersion = __result?.AppVersion,
|
||||
AppIdRealtime = Plugin.AppIdRT.Value,
|
||||
AppIdVoice = Plugin.AppIdVoice.Value,
|
||||
AppIdChat = Plugin.AppIdChat.Value,
|
||||
FixedRegion = "us",
|
||||
UseNameServer = true,
|
||||
Protocol = ConnectionProtocol.Udp
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user