Decompiled source of BetterUpgrades v1.3.0

BetterUpgrades.dll

Decompiled 2 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using BetterUpgrades;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using REPOLib.Modules;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("Autodesk.Fbx")]
[assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")]
[assembly: IgnoresAccessChecksTo("FbxBuildTestAssets")]
[assembly: IgnoresAccessChecksTo("Klattersynth")]
[assembly: IgnoresAccessChecksTo("Photon3Unity3D")]
[assembly: IgnoresAccessChecksTo("PhotonChat")]
[assembly: IgnoresAccessChecksTo("PhotonRealtime")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Utilities")]
[assembly: IgnoresAccessChecksTo("PhotonVoice.API")]
[assembly: IgnoresAccessChecksTo("PhotonVoice")]
[assembly: IgnoresAccessChecksTo("PhotonVoice.PUN")]
[assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime")]
[assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime.Public")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Attributes")]
[assembly: IgnoresAccessChecksTo("Sirenix.Serialization.Config")]
[assembly: IgnoresAccessChecksTo("Sirenix.Serialization")]
[assembly: IgnoresAccessChecksTo("Sirenix.Utilities")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Formats.Fbx.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.Postprocessing.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Antlr3.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Core")]
[assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Flow")]
[assembly: IgnoresAccessChecksTo("Unity.VisualScripting.State")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: IgnoresAccessChecksTo("websocket-sharp")]
[assembly: AssemblyCompany("Zonk")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: AssemblyInformationalVersion("1.3.0")]
[assembly: AssemblyProduct("BetterUpgrades")]
[assembly: AssemblyTitle("BetterUpgrades")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.3.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.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;
		}
	}
	[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;
		}
	}
}
public class ItemUpgradePlayerEnergyThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerExtraJumpThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerGrabRangeThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerGrabStrengthThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerHealthThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerSprintSpeedThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerTumbleLaunchThree : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerEnergyTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerExtraJumpTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerGrabRangeTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerGrabStrengthTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerHealthTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerSprintSpeedTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
public class ItemUpgradePlayerTumbleLaunchTwo : MonoBehaviour
{
	private ItemToggle itemToggle;

	private void Start()
	{
		itemToggle = ((Component)this).GetComponent<ItemToggle>();
	}

	public void Upgrade()
	{
		if (global::BetterUpgrades.BetterUpgrades.Configuration.EnableTieredUpgradesForTeam.Value)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetAll())
			{
				PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(item));
				PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(item));
			}
			return;
		}
		PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
		PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(SemiFunc.PlayerAvatarGetFromPhotonID(itemToggle.playerTogglePhotonID)));
	}
}
namespace BetterUpgrades
{
	[BepInPlugin("Zonk.BetterUpgrades", "BetterUpgrades", "1.3.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class BetterUpgrades : BaseUnityPlugin
	{
		internal class Configuration
		{
			public static ConfigEntry<bool> EnableCommands;

			public static ConfigEntry<bool> EnableTieredUpgradesForTeam;

			public static ConfigEntry<float> UpgradePriceScalingIncrease;

			public static ConfigEntry<float> UpgradePlayerPriceScaling;

			public static ConfigEntry<float> UpgradeBasePriceMultiplier;

			public static ConfigEntry<int> EnergyOnePriceMin;

			public static ConfigEntry<int> EnergyOnePriceMax;

			public static ConfigEntry<int> EnergyTwoPriceMin;

			public static ConfigEntry<int> EnergyTwoPriceMax;

			public static ConfigEntry<int> EnergyThreePriceMin;

			public static ConfigEntry<int> EnergyThreePriceMax;

			public static ConfigEntry<int> ExtraJumpOnePriceMin;

			public static ConfigEntry<int> ExtraJumpOnePriceMax;

			public static ConfigEntry<int> ExtraJumpTwoPriceMin;

			public static ConfigEntry<int> ExtraJumpTwoPriceMax;

			public static ConfigEntry<int> ExtraJumpThreePriceMin;

			public static ConfigEntry<int> ExtraJumpThreePriceMax;

			public static ConfigEntry<int> RangeOnePriceMin;

			public static ConfigEntry<int> RangeOnePriceMax;

			public static ConfigEntry<int> RangeTwoPriceMin;

			public static ConfigEntry<int> RangeTwoPriceMax;

			public static ConfigEntry<int> RangeThreePriceMin;

			public static ConfigEntry<int> RangeThreePriceMax;

			public static ConfigEntry<int> StrengthOnePriceMin;

			public static ConfigEntry<int> StrengthOnePriceMax;

			public static ConfigEntry<int> StrengthTwoPriceMin;

			public static ConfigEntry<int> StrengthTwoPriceMax;

			public static ConfigEntry<int> StrengthThreePriceMin;

			public static ConfigEntry<int> StrengthThreePriceMax;

			public static ConfigEntry<int> HealthOnePriceMin;

			public static ConfigEntry<int> HealthOnePriceMax;

			public static ConfigEntry<int> HealthTwoPriceMin;

			public static ConfigEntry<int> HealthTwoPriceMax;

			public static ConfigEntry<int> HealthThreePriceMin;

			public static ConfigEntry<int> HealthThreePriceMax;

			public static ConfigEntry<int> SpeedOnePriceMin;

			public static ConfigEntry<int> SpeedOnePriceMax;

			public static ConfigEntry<int> SpeedTwoPriceMin;

			public static ConfigEntry<int> SpeedTwoPriceMax;

			public static ConfigEntry<int> SpeedThreePriceMin;

			public static ConfigEntry<int> SpeedThreePriceMax;

			public static ConfigEntry<int> TumbleLaunchOnePriceMin;

			public static ConfigEntry<int> TumbleLaunchOnePriceMax;

			public static ConfigEntry<int> TumbleLaunchTwoPriceMin;

			public static ConfigEntry<int> TumbleLaunchTwoPriceMax;

			public static ConfigEntry<int> TumbleLaunchThreePriceMin;

			public static ConfigEntry<int> TumbleLaunchThreePriceMax;

			public static ConfigEntry<int> PlayerCountPriceMin;

			public static ConfigEntry<int> PlayerCountPriceMax;

			public static void Init(ConfigFile config)
			{
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Expected O, but got Unknown
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Expected O, but got Unknown
				//IL_0076: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: Expected O, but got Unknown
				//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Expected O, but got Unknown
				//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f0: Expected O, but got Unknown
				//IL_011e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0128: Expected O, but got Unknown
				//IL_0156: Unknown result type (might be due to invalid IL or missing references)
				//IL_0160: Expected O, but got Unknown
				//IL_018e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0198: Expected O, but got Unknown
				//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d0: Expected O, but got Unknown
				//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0208: Expected O, but got Unknown
				//IL_0236: Unknown result type (might be due to invalid IL or missing references)
				//IL_0240: Expected O, but got Unknown
				//IL_026e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0278: Expected O, but got Unknown
				//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b0: Expected O, but got Unknown
				//IL_02de: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e8: Expected O, but got Unknown
				//IL_0316: Unknown result type (might be due to invalid IL or missing references)
				//IL_0320: Expected O, but got Unknown
				//IL_034e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0358: Expected O, but got Unknown
				//IL_0386: Unknown result type (might be due to invalid IL or missing references)
				//IL_0390: Expected O, but got Unknown
				//IL_03be: Unknown result type (might be due to invalid IL or missing references)
				//IL_03c8: Expected O, but got Unknown
				//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0400: Expected O, but got Unknown
				//IL_042e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0438: Expected O, but got Unknown
				//IL_0466: Unknown result type (might be due to invalid IL or missing references)
				//IL_0470: Expected O, but got Unknown
				//IL_049e: Unknown result type (might be due to invalid IL or missing references)
				//IL_04a8: Expected O, but got Unknown
				//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
				//IL_04e0: Expected O, but got Unknown
				//IL_050e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0518: Expected O, but got Unknown
				//IL_0546: Unknown result type (might be due to invalid IL or missing references)
				//IL_0550: Expected O, but got Unknown
				//IL_057e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0588: Expected O, but got Unknown
				//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_05c0: Expected O, but got Unknown
				//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
				//IL_05f8: Expected O, but got Unknown
				//IL_0626: Unknown result type (might be due to invalid IL or missing references)
				//IL_0630: Expected O, but got Unknown
				//IL_065e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0668: Expected O, but got Unknown
				//IL_0696: Unknown result type (might be due to invalid IL or missing references)
				//IL_06a0: Expected O, but got Unknown
				//IL_06ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_06d8: Expected O, but got Unknown
				//IL_0706: Unknown result type (might be due to invalid IL or missing references)
				//IL_0710: Expected O, but got Unknown
				//IL_073e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0748: Expected O, but got Unknown
				//IL_0776: Unknown result type (might be due to invalid IL or missing references)
				//IL_0780: Expected O, but got Unknown
				//IL_07ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_07b8: Expected O, but got Unknown
				//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_07f0: Expected O, but got Unknown
				//IL_081e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0828: Expected O, but got Unknown
				//IL_0856: Unknown result type (might be due to invalid IL or missing references)
				//IL_0860: Expected O, but got Unknown
				//IL_088e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0898: Expected O, but got Unknown
				//IL_08c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_08d0: Expected O, but got Unknown
				//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0908: Expected O, but got Unknown
				//IL_0936: Unknown result type (might be due to invalid IL or missing references)
				//IL_0940: Expected O, but got Unknown
				//IL_096e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0978: Expected O, but got Unknown
				//IL_09a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_09b0: Expected O, but got Unknown
				//IL_09de: Unknown result type (might be due to invalid IL or missing references)
				//IL_09e8: Expected O, but got Unknown
				//IL_0a16: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a20: Expected O, but got Unknown
				//IL_0a4e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a58: Expected O, but got Unknown
				//IL_0a86: Unknown result type (might be due to invalid IL or missing references)
				//IL_0a90: Expected O, but got Unknown
				EnableCommands = config.Bind<bool>("General", "EnableCommands", true, new ConfigDescription("Enable if you and your team can use developer commands /be spawn (item) and /be money (number)", (AcceptableValueBase)null, Array.Empty<object>()));
				EnableTieredUpgradesForTeam = config.Bind<bool>("General", "EnableTieredUpgradesForTeam", true, new ConfigDescription("The tiered upgrades now work for the whole team", (AcceptableValueBase)null, Array.Empty<object>()));
				UpgradePriceScalingIncrease = config.Bind<float>("General", "UpgradePriceScalingIncrease", 50f, new ConfigDescription("Vanilla: 50%, UpgradePrice + (pruchasedUpgradeCount * 0.5), Change the percent increase for every purchased upgrade", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>()));
				UpgradePlayerPriceScaling = config.Bind<float>("General", "UpgradePlayerPriceScaling", 0f, new ConfigDescription("BaseUpgradePrice + (x% * playerCount), Change the percent increase for every player", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 200f), Array.Empty<object>()));
				UpgradeBasePriceMultiplier = config.Bind<float>("General", "UpgradeBasePriceMultiplier", 1f, new ConfigDescription("UpgradePrice * x, Multiplier to the price of an item at the start of a game", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100.5f), Array.Empty<object>()));
				EnergyOnePriceMin = config.Bind<int>("EnergyOne", "EnergyOnePriceMin", 1900, new ConfigDescription("Change the min price of energyupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				EnergyOnePriceMax = config.Bind<int>("EnergyOne", "EnergyOnePriceMax", 1900, new ConfigDescription("Change the max price of energyupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				EnergyTwoPriceMin = config.Bind<int>("EnergyTwo", "EnergyTwoPriceMin", 2900, new ConfigDescription("Change the min price of energytwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				EnergyTwoPriceMax = config.Bind<int>("EnergyTwo", "EnergyTwoPriceMax", 2900, new ConfigDescription("Change the max price of energytwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				EnergyThreePriceMin = config.Bind<int>("EnergyThree", "EnergyThreePriceMin", 4900, new ConfigDescription("Change the min price of energythreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				EnergyThreePriceMax = config.Bind<int>("EnergyThree", "EnergyThreePriceMax", 4900, new ConfigDescription("Change the max price of energythreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				ExtraJumpOnePriceMin = config.Bind<int>("ExtraJumpOne", "ExtraJumpOnePriceMin", 7900, new ConfigDescription("Change the min price of extrajumpupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				ExtraJumpOnePriceMax = config.Bind<int>("ExtraJumpOne", "ExtraJumpOnePriceMax", 7900, new ConfigDescription("Change the max price of extrajumpupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				ExtraJumpTwoPriceMin = config.Bind<int>("ExtraJumpTwo", "ExtraJumpTwoPriceMin", 13900, new ConfigDescription("Change the min price of extrajumptwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				ExtraJumpTwoPriceMax = config.Bind<int>("ExtraJumpTwo", "ExtraJumpTwoPriceMax", 13900, new ConfigDescription("Change the max price of extrajumptwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				ExtraJumpThreePriceMin = config.Bind<int>("ExtraJumpThree", "ExtraJumpThreePriceMin", 20900, new ConfigDescription("Change the min price of extrajumpthreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				ExtraJumpThreePriceMax = config.Bind<int>("ExtraJumpThree", "ExtraJumpThreePriceMax", 20900, new ConfigDescription("Change the max price of extrajumpthreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				RangeOnePriceMin = config.Bind<int>("RangeOne", "RangeOnePriceMin", 6900, new ConfigDescription("Change the min price of rangeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				RangeOnePriceMax = config.Bind<int>("RangeOne", "RangeOnePriceMax", 6900, new ConfigDescription("Change the max price of rangeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				RangeTwoPriceMin = config.Bind<int>("RangeTwo", "RangeTwoPriceMin", 11900, new ConfigDescription("Change the min price of rangetwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				RangeTwoPriceMax = config.Bind<int>("RangeTwo", "RangeTwoPriceMax", 11900, new ConfigDescription("Change the max price of rangetwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				RangeThreePriceMin = config.Bind<int>("RangeThree", "RangeThreePriceMin", 17900, new ConfigDescription("Change the min price of rangethreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				RangeThreePriceMax = config.Bind<int>("RangeThree", "RangeThreePriceMax", 17900, new ConfigDescription("Change the max price of rangethreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				StrengthOnePriceMin = config.Bind<int>("StrengthOne", "StrengthOnePriceMin", 6900, new ConfigDescription("Change the min price of strengthupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				StrengthOnePriceMax = config.Bind<int>("StrengthOne", "StrengthOnePriceMax", 6900, new ConfigDescription("Change the max price of strengthupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				StrengthTwoPriceMin = config.Bind<int>("StrengthTwo", "StrengthTwoPriceMin", 11900, new ConfigDescription("Change the min price of strengthtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				StrengthTwoPriceMax = config.Bind<int>("StrengthTwo", "StrengthTwoPriceMax", 11900, new ConfigDescription("Change the max price of strengthtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				StrengthThreePriceMin = config.Bind<int>("StrengthThree", "StrengthThreePriceMin", 17900, new ConfigDescription("Change the min price of strengththreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				StrengthThreePriceMax = config.Bind<int>("StrengthThree", "StrengthThreePriceMax", 17900, new ConfigDescription("Change the max price of strengththreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				HealthOnePriceMin = config.Bind<int>("HealthOne", "HealthOnePriceMin", 3900, new ConfigDescription("Change the min price of healthupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				HealthOnePriceMax = config.Bind<int>("HealthOne", "HealthOnePriceMax", 3900, new ConfigDescription("Change the max price of healthupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				HealthTwoPriceMin = config.Bind<int>("HealthTwo", "HealthTwoPriceMin", 5900, new ConfigDescription("Change the min price of healthtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				HealthTwoPriceMax = config.Bind<int>("HealthTwo", "HealthTwoPriceMax", 5900, new ConfigDescription("Change the max price of healthtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				HealthThreePriceMin = config.Bind<int>("HealthThree", "HealthThreePriceMin", 8900, new ConfigDescription("Change the min price of healththreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				HealthThreePriceMax = config.Bind<int>("HealthThree", "HealthThreePriceMax", 8900, new ConfigDescription("Change the max price of healththreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				SpeedOnePriceMin = config.Bind<int>("SpeedOne", "SpeedOnePriceMin", 6900, new ConfigDescription("Change the min price of speedupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				SpeedOnePriceMax = config.Bind<int>("SpeedOne", "SpeedOnePriceMax", 6900, new ConfigDescription("Change the max price of speedupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				SpeedTwoPriceMin = config.Bind<int>("SpeedTwo", "SpeedTwoPriceMin", 11900, new ConfigDescription("Change the min price of speedtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				SpeedTwoPriceMax = config.Bind<int>("SpeedTwo", "SpeedTwoPriceMax", 11900, new ConfigDescription("Change the max price of speedtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				SpeedThreePriceMin = config.Bind<int>("SpeedThree", "SpeedThreePriceMin", 17900, new ConfigDescription("Change the min price of speedthreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				SpeedThreePriceMax = config.Bind<int>("SpeedThree", "SpeedThreePriceMax", 17900, new ConfigDescription("Change the max price of speedthreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				TumbleLaunchOnePriceMin = config.Bind<int>("TumbleLaunchOne", "TumbleLaunchOnePriceMin", 3900, new ConfigDescription("Change the min price of tumblelaunchupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				TumbleLaunchOnePriceMax = config.Bind<int>("TumbleLaunchOne", "TumbleLaunchOnePriceMax", 3900, new ConfigDescription("Change the max price of tumblelaunchupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				TumbleLaunchTwoPriceMin = config.Bind<int>("TumbleLaunchTwo", "TumbleLaunchTwoPriceMin", 5900, new ConfigDescription("Change the min price of tumblelaunchtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				TumbleLaunchTwoPriceMax = config.Bind<int>("TumbleLaunchTwo", "TumbleLaunchTwoPriceMax", 5900, new ConfigDescription("Change the max price of tumblelaunchtwoupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				TumbleLaunchThreePriceMin = config.Bind<int>("TumbleLaunchThree", "TumbleLaunchThreePriceMin", 8900, new ConfigDescription("Change the min price of tumblelaunchthreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				TumbleLaunchThreePriceMax = config.Bind<int>("TumbleLaunchThree", "TumbleLaunchThreePriceMax", 8900, new ConfigDescription("Change the max price of tumblelaunchthreeupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				PlayerCountPriceMin = config.Bind<int>("PlayerCount", "PlayerCountPriceMin", 7900, new ConfigDescription("Change the min price of playercountupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
				PlayerCountPriceMax = config.Bind<int>("PlayerCount", "PlayerCountPriceMax", 7900, new ConfigDescription("Change the max price of playercountupgrade in the shop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1000, 100000), Array.Empty<object>()));
			}
		}

		[HarmonyPatch(typeof(ShopManager))]
		internal static class ShopManagerPatch
		{
			[HarmonyPatch("ShopInitialize")]
			[HarmonyPostfix]
			private static void StartConfigPatch()
			{
				Dictionary<string, List<int>> dictionary = new Dictionary<string, List<int>>
				{
					{
						"Strength Upgrade",
						new List<int>(2)
						{
							Configuration.StrengthOnePriceMin.Value,
							Configuration.StrengthOnePriceMax.Value
						}
					},
					{
						"Strength Upgrade Two",
						new List<int>(2)
						{
							Configuration.StrengthTwoPriceMin.Value,
							Configuration.StrengthTwoPriceMax.Value
						}
					},
					{
						"Strength Upgrade Three",
						new List<int>(2)
						{
							Configuration.StrengthThreePriceMin.Value,
							Configuration.StrengthThreePriceMax.Value
						}
					},
					{
						"Stamina Upgrade",
						new List<int>(2)
						{
							Configuration.EnergyOnePriceMin.Value,
							Configuration.EnergyOnePriceMax.Value
						}
					},
					{
						"Stamina Upgrade Two",
						new List<int>(2)
						{
							Configuration.EnergyTwoPriceMin.Value,
							Configuration.EnergyTwoPriceMax.Value
						}
					},
					{
						"Stamina Upgrade Three",
						new List<int>(2)
						{
							Configuration.EnergyThreePriceMin.Value,
							Configuration.EnergyThreePriceMax.Value
						}
					},
					{
						"Extra Jump Upgrade",
						new List<int>(2)
						{
							Configuration.ExtraJumpOnePriceMin.Value,
							Configuration.ExtraJumpOnePriceMax.Value
						}
					},
					{
						"Extra Jump Upgrade Two",
						new List<int>(2)
						{
							Configuration.ExtraJumpTwoPriceMin.Value,
							Configuration.ExtraJumpTwoPriceMax.Value
						}
					},
					{
						"Extra Jump Upgrade Three",
						new List<int>(2)
						{
							Configuration.ExtraJumpThreePriceMin.Value,
							Configuration.ExtraJumpThreePriceMax.Value
						}
					},
					{
						"Health Upgrade",
						new List<int>(2)
						{
							Configuration.HealthOnePriceMin.Value,
							Configuration.HealthOnePriceMax.Value
						}
					},
					{
						"Health Upgrade Two",
						new List<int>(2)
						{
							Configuration.HealthTwoPriceMin.Value,
							Configuration.HealthTwoPriceMax.Value
						}
					},
					{
						"Health Upgrade Three",
						new List<int>(2)
						{
							Configuration.HealthThreePriceMin.Value,
							Configuration.HealthThreePriceMax.Value
						}
					},
					{
						"Range Upgrade",
						new List<int>(2)
						{
							Configuration.RangeOnePriceMin.Value,
							Configuration.RangeOnePriceMax.Value
						}
					},
					{
						"Range Upgrade Two",
						new List<int>(2)
						{
							Configuration.RangeTwoPriceMin.Value,
							Configuration.RangeTwoPriceMax.Value
						}
					},
					{
						"Range Upgrade Three",
						new List<int>(2)
						{
							Configuration.RangeThreePriceMin.Value,
							Configuration.RangeThreePriceMax.Value
						}
					},
					{
						"Sprint Speed Upgrade",
						new List<int>(2)
						{
							Configuration.SpeedOnePriceMin.Value,
							Configuration.SpeedOnePriceMax.Value
						}
					},
					{
						"Sprint Speed Upgrade Two",
						new List<int>(2)
						{
							Configuration.SpeedTwoPriceMin.Value,
							Configuration.SpeedTwoPriceMax.Value
						}
					},
					{
						"Sprint Speed Upgrade Three",
						new List<int>(2)
						{
							Configuration.SpeedThreePriceMin.Value,
							Configuration.SpeedThreePriceMax.Value
						}
					},
					{
						"Tumble Launch Upgrade",
						new List<int>(2)
						{
							Configuration.TumbleLaunchOnePriceMin.Value,
							Configuration.TumbleLaunchOnePriceMax.Value
						}
					},
					{
						"Tumble Launch Upgrade Two",
						new List<int>(2)
						{
							Configuration.TumbleLaunchTwoPriceMin.Value,
							Configuration.TumbleLaunchTwoPriceMax.Value
						}
					},
					{
						"Tumble Launch Upgrade Three",
						new List<int>(2)
						{
							Configuration.TumbleLaunchThreePriceMin.Value,
							Configuration.TumbleLaunchThreePriceMax.Value
						}
					},
					{
						"Map Player Count Upgrade",
						new List<int>(2)
						{
							Configuration.PlayerCountPriceMin.Value,
							Configuration.PlayerCountPriceMax.Value
						}
					}
				};
				foreach (KeyValuePair<string, List<int>> item in dictionary)
				{
					string key = item.Key;
					List<int> value = item.Value;
					SetItemValueMinMax(Items.GetItemByName(key), value[0], value[1], key, Configuration.UpgradeBasePriceMultiplier.Value);
				}
				UpdateUpgradePriceScales(Configuration.UpgradePriceScalingIncrease.Value);
				Debug.Log((object)"All items patched for BetterUpgrades");
			}

			private static void SetItemValueMinMax(Item item, int minValue, int maxValue, string name, float basePriceMult)
			{
				if ((Object)(object)item == (Object)null)
				{
					Debug.LogError((object)("StatsManagerPatch: Failed to set item min max value. " + name + "is null."));
					return;
				}
				float num = GameDirector.instance.PlayerList.Count - 1;
				float value = Configuration.UpgradePlayerPriceScaling.Value;
				Value val = ScriptableObject.CreateInstance<Value>();
				val.valueMin = ((float)((int)Math.Round((double)minValue / 1000.0) * 1000 / 4) + value / 100f * num * (float)minValue) * basePriceMult;
				val.valueMax = ((float)((int)Math.Round((double)maxValue / 1000.0) * 1000 / 4) + value / 100f * num * (float)maxValue) * basePriceMult;
				item.value = val;
			}

			private static void UpdateUpgradePriceScales(float percent)
			{
				float upgradeValueIncrease = percent / 100f;
				ShopManager.instance.upgradeValueIncrease = upgradeValueIncrease;
			}
		}

		[HarmonyPatch(typeof(ChatManager))]
		internal static class ChatManagerPatch
		{
			[HarmonyPatch("MessageSend")]
			[HarmonyPostfix]
			private static void CommandsPatch()
			{
				//IL_0186: Unknown result type (might be due to invalid IL or missing references)
				//IL_018d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0197: Unknown result type (might be due to invalid IL or missing references)
				//IL_019c: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_0220: Unknown result type (might be due to invalid IL or missing references)
				//IL_0222: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
				string text = ChatManager.instance.chatHistory[ChatManager.instance.chatHistory.Count - 1];
				if (!text.StartsWith("/") || !Configuration.EnableCommands.Value)
				{
					return;
				}
				string[] array = text.Split(new char[1] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
				if (!(array[0] == "/be"))
				{
					return;
				}
				if (SemiFunc.RunIsShop() && array[1] == "money")
				{
					if (int.TryParse(array[2], out var result) && result >= 1000)
					{
						StatsManager.instance.runStats["currency"] = StatsManager.instance.runStats["currency"] + result / 1000;
						Debug.Log((object)$"Gave you {result} currency");
					}
				}
				else
				{
					if (!(array[1] == "spawn"))
					{
						return;
					}
					string itemName = "";
					for (int i = 2; i <= array.Length - 1; i++)
					{
						itemName = itemName + " " + array[i];
					}
					itemName = itemName.Trim();
					Transform transform = ((Component)Camera.main).transform;
					Vector3 val = transform.position + transform.forward * 2f;
					Quaternion identity = Quaternion.identity;
					IReadOnlyList<Item> registeredItems = Items.RegisteredItems;
					Item val2 = ((IEnumerable<Item>)registeredItems).FirstOrDefault((Func<Item, bool>)((Item go) => string.Equals(((Object)go).name, itemName, StringComparison.OrdinalIgnoreCase)));
					if (Object.op_Implicit((Object)(object)val2))
					{
						if (SemiFunc.IsMultiplayer())
						{
							PhotonNetwork.InstantiateRoomObject("Items/" + ((Object)val2).name, val, identity, (byte)0, (object[])null);
							Debug.Log((object)(((Object)val2).name + " has been spawned"));
						}
						else
						{
							Object.Instantiate<GameObject>(val2.prefab, val, identity);
							Debug.Log((object)(((Object)val2).name + " has been spawned"));
						}
					}
				}
			}
		}

		internal AssetBundle assetBundle;

		internal static BetterUpgrades Instance { get; private set; }

		internal static ManualLogSource Logger => Instance._logger;

		private ManualLogSource _logger => ((BaseUnityPlugin)this).Logger;

		internal Harmony? Harmony { get; set; }

		private void Awake()
		{
			Instance = this;
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "betterupgrades");
			AssetBundle val = (assetBundle = AssetBundle.LoadFromFile(text));
			List<string> list = new List<string>(14)
			{
				"Item Upgrade Player Grab Strength Two", "Item Upgrade Player Grab Strength Three", "Item Upgrade Player Energy Two", "Item Upgrade Player Energy Three", "Item Upgrade Player Extra Jump Two", "Item Upgrade Player Extra Jump Three", "Item Upgrade Player Grab Range Two", "Item Upgrade Player Grab Range Three", "Item Upgrade Player Health Two", "Item Upgrade Player Health Three",
				"Item Upgrade Player Sprint Speed Two", "Item Upgrade Player Sprint Speed Three", "Item Upgrade Player Tumble Launch Two", "Item Upgrade Player Tumble Launch Three"
			};
			foreach (string item in list)
			{
				Item val2 = val.LoadAsset<Item>("Assets/Upgrades/" + item + ".asset");
				Items.RegisterItem(val2);
			}
			Configuration.Init(((BaseUnityPlugin)this).Config);
			Patch();
		}

		internal void Patch()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			//IL_0026: Expected O, but got Unknown
			if (Harmony == null)
			{
				Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID);
				Harmony val2 = val;
				Harmony = val;
			}
			Harmony.PatchAll();
		}

		internal void Unpatch()
		{
			Harmony? harmony = Harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}

		private void Update()
		{
		}
	}
}