using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using HarmonyLib;
using Il2CppGB.UI;
using Il2CppTMPro;
using IncreasedWinLimit;
using MelonLoader;
using MelonLoader.Preferences;
using Microsoft.CodeAnalysis;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle(null)]
[assembly: AssemblyDescription(null)]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("IncreasedWinLimit")]
[assembly: AssemblyCopyright("Created by TheUltimateNuke")]
[assembly: AssemblyTrademark(null)]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: MelonInfo(typeof(Mod), "IncreasedWinLimit", "1.0.0", "TheUltimateNuke", null)]
[assembly: MelonColor(255, 222, 103, 84)]
[assembly: MelonGame("Boneloaf", "Gang Beasts")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace IncreasedWinLimit
{
public static class BuildInfo
{
public const string Name = "IncreasedWinLimit";
public const string Author = "TheUltimateNuke";
public const string Description = null;
public const string Company = null;
public const string Version = "1.0.0";
public const string DownloadLink = null;
}
public class Mod : MelonMod
{
private static readonly MelonPreferences_Category _melonCat = MelonPreferences.CreateCategory("IncreasedWinLimit");
private static readonly MelonPreferences_Entry<int> _winLimit = _melonCat.CreateEntry<int>("_winLimit", 15, "Win Limit", (string)null, false, false, (ValueValidator)null, (string)null);
public static int WinLimit => _winLimit.Value;
public override void OnInitializeMelon()
{
((MelonBase)this).HarmonyInstance.PatchAll();
}
}
}
namespace IncreasedWinLimit.Patches
{
[HarmonyPatch(typeof(MenuHandlerGamemodes))]
public static class UIPatch
{
[HarmonyPatch("GenerateUI")]
[HarmonyPostfix]
private static void GenerateUI_Postfix(MenuHandlerGamemodes __instance)
{
__instance.winsSetup.UpdateAllowedValues(1, Mod.WinLimit);
}
}
[HarmonyPatch(typeof(MenuHandlerWins))]
public static class TextPatch
{
[HarmonyPatch("UpdateText")]
[HarmonyPostfix]
private static void UpdateText_Postfix(MenuHandlerWins __instance)
{
((TMP_Text)__instance.valueText).text = __instance.CurrentValue.ToString();
}
}
}