using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Photon.Pun;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("MorePlayerCount")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MorePlayerCount")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0633e6b2-f229-4c19-bb93-9f3c5e65ee8d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("de.kesuaheli.moreplayercount", "MorePlayerCount", "1.0.1")]
public class MorePlayerCount : BaseUnityPlugin
{
private const string modGUID = "de.kesuaheli.moreplayercount";
private const string modName = "MorePlayerCount";
private const string modVersion = "1.0.1";
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("de.kesuaheli.moreplayercount");
val.PatchAll();
SceneManager.sceneLoaded += OnSceneLoaded;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Mod Loaded!");
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
if (SemiFunc.RunIsShop())
{
int num = ((!SemiFunc.IsMultiplayer()) ? 1 : PhotonNetwork.CurrentRoom.PlayerCount);
int num2 = num / 2;
GeneralExtensions.GetValueSafe<string, Item>(StatsManager.instance.itemDictionary, "Item Upgrade Map Player Count").maxAmount = num2;
GeneralExtensions.GetValueSafe<string, Item>(StatsManager.instance.itemDictionary, "Item Upgrade Map Player Count").maxPurchaseAmount = num2;
}
}
}