using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Mirror;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("NoPlayerCap")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+4bb6758d9a5449880cdfdfc1f73d9d875ee9dfcc")]
[assembly: AssemblyProduct("NoPlayerCap")]
[assembly: AssemblyTitle("NoPlayerCap")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Marioalexsan.NoPlayerCap
{
[BepInPlugin("Marioalexsan.NoPlayerCap", "Raises server max player cap to 64", "1.0.0")]
public class NoPlayerCapMod : BaseUnityPlugin
{
private Harmony _harmony;
private void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
_harmony = new Harmony("Marioalexsan.NoPlayerCap");
_harmony.PatchAll();
}
}
}
namespace Marioalexsan.NoPlayerCap.HarmonyPatches
{
[HarmonyPatch(typeof(LobbyListManager), "Awake")]
internal static class LobbyListManager_Awake
{
private static void Postfix(LobbyListManager __instance)
{
__instance._lobbyMaxConnectionSlider.maxValue = 64f;
}
}
[HarmonyPatch(typeof(ProfileDataManager), "Load_HostSettingsData")]
internal static class ProfileDataManager_Load_HostSettingsData
{
private static void Postfix(ProfileDataManager __instance)
{
if (File.Exists(__instance._dataPath + "/hostSettings.json"))
{
string text = File.ReadAllText(__instance._dataPath + "/hostSettings.json");
__instance._hostSettingsProfile = JsonUtility.FromJson<ServerHostSettings_Profile>(text);
if (__instance._hostSettingsProfile._maxAllowedConnections < 2)
{
__instance._hostSettingsProfile._maxAllowedConnections = 2;
}
if (__instance._hostSettingsProfile._maxAllowedConnections > 64)
{
__instance._hostSettingsProfile._maxAllowedConnections = 64;
}
MainMenuManager._current.Load_HostSettings();
((NetworkManager)AtlyssNetworkManager._current).maxConnections = __instance._hostSettingsProfile._maxAllowedConnections;
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}