using System;
using System.Diagnostics;
using System.Linq;
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 Multiplayer;
using TMPro;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
[assembly: AssemblyCompany("HumanMaxPlayerMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Increase max players count for Human Fall Flat")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HumanMaxPlayerMod")]
[assembly: AssemblyTitle("HumanMaxPlayerMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
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 HumanMaxPlayerMod
{
public class MultiplayerLobbySettingsMenuPatch
{
[HarmonyPatch(typeof(MultiplayerLobbySettingsMenu), "OnGotFocus")]
public static class MultiplayerLobbySettingsMenu_OnGotFocus
{
public static bool Prefix(MenuSelector ___maxPlayersSelector)
{
int num = 254;
if (___maxPlayersSelector.optionLabels.Length != num)
{
TextMeshProUGUI optionLabel = ___maxPlayersSelector.optionLabels.First();
Transform obj = ((TMP_Text)optionLabel).transform.parent.Find("Right");
obj.SetParent((Transform)null);
___maxPlayersSelector.optionLabels = Enumerable.Concat(second: Enumerable.Range(___maxPlayersSelector.optionLabels.Length + 2, num - ___maxPlayersSelector.optionLabels.Length).Select(delegate(int x)
{
TextMeshProUGUI obj2 = Object.Instantiate<TextMeshProUGUI>(optionLabel, ((TMP_Text)optionLabel).transform.parent, false);
((Object)obj2).name = x.ToString();
((TMP_Text)obj2).text = x.ToString();
return obj2;
}), first: ___maxPlayersSelector.optionLabels).ToArray();
obj.SetParent(((TMP_Text)optionLabel).transform.parent);
}
return true;
}
}
}
[BepInPlugin("HumanMaxPlayerMod", "HumanMaxPlayerMod", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null);
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin HumanMaxPlayerMod is loaded!");
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "HumanMaxPlayerMod";
public const string PLUGIN_NAME = "HumanMaxPlayerMod";
public const string PLUGIN_VERSION = "1.0.0";
}
}