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.5.0.0")]
[assembly: AssemblyInformationalVersion("1.5.0")]
[assembly: AssemblyProduct("BetterUpgrades")]
[assembly: AssemblyTitle("BetterUpgrades")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.5.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.EnableTeamEnergyUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamExtraJumpUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamRangeUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamStrengthUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamHealthUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamSpeedUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamTumbleLaunchUpgradeThree.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamEnergyUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamExtraJumpUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamRangeUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamStrengthUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamHealthUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamSpeedUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.EnableTeamTumbleLaunchUpgradeTwo.Value && SemiFunc.IsMultiplayer())
{
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.5.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class BetterUpgrades : BaseUnityPlugin
{
internal class Configuration
{
public static ConfigEntry<bool> EnableCommands;
public static ConfigEntry<int> FakePlayers;
public static ConfigEntry<bool> EnableConformingUpgradeScaling;
public static ConfigEntry<bool> EnableTeamEnergyUpgradeTwo;
public static ConfigEntry<bool> EnableTeamEnergyUpgradeThree;
public static ConfigEntry<bool> EnableTeamExtraJumpUpgradeTwo;
public static ConfigEntry<bool> EnableTeamExtraJumpUpgradeThree;
public static ConfigEntry<bool> EnableTeamRangeUpgradeTwo;
public static ConfigEntry<bool> EnableTeamRangeUpgradeThree;
public static ConfigEntry<bool> EnableTeamStrengthUpgradeTwo;
public static ConfigEntry<bool> EnableTeamStrengthUpgradeThree;
public static ConfigEntry<bool> EnableTeamHealthUpgradeTwo;
public static ConfigEntry<bool> EnableTeamHealthUpgradeThree;
public static ConfigEntry<bool> EnableTeamSpeedUpgradeTwo;
public static ConfigEntry<bool> EnableTeamSpeedUpgradeThree;
public static ConfigEntry<bool> EnableTeamTumbleLaunchUpgradeTwo;
public static ConfigEntry<bool> EnableTeamTumbleLaunchUpgradeThree;
public static ConfigEntry<int> MaxInShopEnergyOne;
public static ConfigEntry<int> MaxInShopEnergyTwo;
public static ConfigEntry<int> MaxInShopEnergyThree;
public static ConfigEntry<int> MaxInShopExtraJumpOne;
public static ConfigEntry<int> MaxInShopExtraJumpTwo;
public static ConfigEntry<int> MaxInShopExtraJumpThree;
public static ConfigEntry<int> MaxInShopRangeOne;
public static ConfigEntry<int> MaxInShopRangeTwo;
public static ConfigEntry<int> MaxInShopRangeThree;
public static ConfigEntry<int> MaxInShopStrengthOne;
public static ConfigEntry<int> MaxInShopStrengthTwo;
public static ConfigEntry<int> MaxInShopStrengthThree;
public static ConfigEntry<int> MaxInShopHealthOne;
public static ConfigEntry<int> MaxInShopHealthTwo;
public static ConfigEntry<int> MaxInShopHealthThree;
public static ConfigEntry<int> MaxInShopSpeedOne;
public static ConfigEntry<int> MaxInShopSpeedTwo;
public static ConfigEntry<int> MaxInShopSpeedThree;
public static ConfigEntry<int> MaxInShopTumbleLaunchOne;
public static ConfigEntry<int> MaxInShopTumbleLaunchTwo;
public static ConfigEntry<int> MaxInShopTumbleLaunchThree;
public static ConfigEntry<int> MaxInShopPlayerCount;
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_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Expected O, but got Unknown
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Expected O, but got Unknown
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Expected O, but got Unknown
//IL_0129: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Expected O, but got Unknown
//IL_014f: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Expected O, but got Unknown
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Expected O, but got Unknown
//IL_019b: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: Expected O, but got Unknown
//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Expected O, but got Unknown
//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
//IL_01f1: Expected O, but got Unknown
//IL_020d: Unknown result type (might be due to invalid IL or missing references)
//IL_0217: Expected O, but got Unknown
//IL_0233: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Expected O, but got Unknown
//IL_0259: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Expected O, but got Unknown
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_0289: Expected O, but got Unknown
//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
//IL_02c1: Expected O, but got Unknown
//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f9: Expected O, but got Unknown
//IL_0327: Unknown result type (might be due to invalid IL or missing references)
//IL_0331: Expected O, but got Unknown
//IL_0354: Unknown result type (might be due to invalid IL or missing references)
//IL_035e: Expected O, but got Unknown
//IL_0381: Unknown result type (might be due to invalid IL or missing references)
//IL_038b: Expected O, but got Unknown
//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
//IL_03b8: Expected O, but got Unknown
//IL_03db: Unknown result type (might be due to invalid IL or missing references)
//IL_03e5: Expected O, but got Unknown
//IL_0408: Unknown result type (might be due to invalid IL or missing references)
//IL_0412: Expected O, but got Unknown
//IL_0435: Unknown result type (might be due to invalid IL or missing references)
//IL_043f: Expected O, but got Unknown
//IL_0462: Unknown result type (might be due to invalid IL or missing references)
//IL_046c: Expected O, but got Unknown
//IL_048f: Unknown result type (might be due to invalid IL or missing references)
//IL_0499: Expected O, but got Unknown
//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
//IL_04c6: Expected O, but got Unknown
//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
//IL_04f3: Expected O, but got Unknown
//IL_0516: Unknown result type (might be due to invalid IL or missing references)
//IL_0520: Expected O, but got Unknown
//IL_0543: Unknown result type (might be due to invalid IL or missing references)
//IL_054d: Expected O, but got Unknown
//IL_0570: Unknown result type (might be due to invalid IL or missing references)
//IL_057a: Expected O, but got Unknown
//IL_059d: Unknown result type (might be due to invalid IL or missing references)
//IL_05a7: Expected O, but got Unknown
//IL_05ca: Unknown result type (might be due to invalid IL or missing references)
//IL_05d4: Expected O, but got Unknown
//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0601: Expected O, but got Unknown
//IL_0624: Unknown result type (might be due to invalid IL or missing references)
//IL_062e: Expected O, but got Unknown
//IL_0651: Unknown result type (might be due to invalid IL or missing references)
//IL_065b: Expected O, but got Unknown
//IL_067e: Unknown result type (might be due to invalid IL or missing references)
//IL_0688: Expected O, but got Unknown
//IL_06ab: Unknown result type (might be due to invalid IL or missing references)
//IL_06b5: Expected O, but got Unknown
//IL_06d8: Unknown result type (might be due to invalid IL or missing references)
//IL_06e2: Expected O, but got Unknown
//IL_0705: Unknown result type (might be due to invalid IL or missing references)
//IL_070f: Expected O, but got Unknown
//IL_073d: Unknown result type (might be due to invalid IL or missing references)
//IL_0747: Expected O, but got Unknown
//IL_0775: Unknown result type (might be due to invalid IL or missing references)
//IL_077f: Expected O, but got Unknown
//IL_07ad: Unknown result type (might be due to invalid IL or missing references)
//IL_07b7: Expected O, but got Unknown
//IL_07e5: Unknown result type (might be due to invalid IL or missing references)
//IL_07ef: Expected O, but got Unknown
//IL_081d: Unknown result type (might be due to invalid IL or missing references)
//IL_0827: Expected O, but got Unknown
//IL_0855: Unknown result type (might be due to invalid IL or missing references)
//IL_085f: Expected O, but got Unknown
//IL_088d: Unknown result type (might be due to invalid IL or missing references)
//IL_0897: Expected O, but got Unknown
//IL_08c5: Unknown result type (might be due to invalid IL or missing references)
//IL_08cf: Expected O, but got Unknown
//IL_08fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0907: Expected O, but got Unknown
//IL_0935: Unknown result type (might be due to invalid IL or missing references)
//IL_093f: Expected O, but got Unknown
//IL_096d: Unknown result type (might be due to invalid IL or missing references)
//IL_0977: Expected O, but got Unknown
//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
//IL_09af: Expected O, but got Unknown
//IL_09dd: Unknown result type (might be due to invalid IL or missing references)
//IL_09e7: Expected O, but got Unknown
//IL_0a15: Unknown result type (might be due to invalid IL or missing references)
//IL_0a1f: Expected O, but got Unknown
//IL_0a4d: Unknown result type (might be due to invalid IL or missing references)
//IL_0a57: Expected O, but got Unknown
//IL_0a85: Unknown result type (might be due to invalid IL or missing references)
//IL_0a8f: Expected O, but got Unknown
//IL_0abd: Unknown result type (might be due to invalid IL or missing references)
//IL_0ac7: Expected O, but got Unknown
//IL_0af5: Unknown result type (might be due to invalid IL or missing references)
//IL_0aff: Expected O, but got Unknown
//IL_0b2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0b37: Expected O, but got Unknown
//IL_0b65: Unknown result type (might be due to invalid IL or missing references)
//IL_0b6f: Expected O, but got Unknown
//IL_0b9d: Unknown result type (might be due to invalid IL or missing references)
//IL_0ba7: Expected O, but got Unknown
//IL_0bd5: Unknown result type (might be due to invalid IL or missing references)
//IL_0bdf: Expected O, but got Unknown
//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
//IL_0c17: Expected O, but got Unknown
//IL_0c45: Unknown result type (might be due to invalid IL or missing references)
//IL_0c4f: Expected O, but got Unknown
//IL_0c7d: Unknown result type (might be due to invalid IL or missing references)
//IL_0c87: Expected O, but got Unknown
//IL_0cb5: Unknown result type (might be due to invalid IL or missing references)
//IL_0cbf: Expected O, but got Unknown
//IL_0ced: Unknown result type (might be due to invalid IL or missing references)
//IL_0cf7: Expected O, but got Unknown
//IL_0d25: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2f: Expected O, but got Unknown
//IL_0d5d: Unknown result type (might be due to invalid IL or missing references)
//IL_0d67: Expected O, but got Unknown
//IL_0d95: Unknown result type (might be due to invalid IL or missing references)
//IL_0d9f: Expected O, but got Unknown
//IL_0dcd: Unknown result type (might be due to invalid IL or missing references)
//IL_0dd7: Expected O, but got Unknown
//IL_0e05: Unknown result type (might be due to invalid IL or missing references)
//IL_0e0f: Expected O, but got Unknown
//IL_0e3d: Unknown result type (might be due to invalid IL or missing references)
//IL_0e47: Expected O, but got Unknown
//IL_0e75: Unknown result type (might be due to invalid IL or missing references)
//IL_0e7f: Expected O, but got Unknown
//IL_0ead: Unknown result type (might be due to invalid IL or missing references)
//IL_0eb7: Expected O, but got Unknown
//IL_0ee5: Unknown result type (might be due to invalid IL or missing references)
//IL_0eef: Expected O, but got Unknown
//IL_0f1d: Unknown result type (might be due to invalid IL or missing references)
//IL_0f27: Expected O, but got Unknown
//IL_0f55: Unknown result type (might be due to invalid IL or missing references)
//IL_0f5f: Expected O, but got Unknown
//IL_0f8d: Unknown result type (might be due to invalid IL or missing references)
//IL_0f97: Expected O, but got Unknown
//IL_0fc5: Unknown result type (might be due to invalid IL or missing references)
//IL_0fcf: Expected O, but got Unknown
//IL_0ffd: Unknown result type (might be due to invalid IL or missing references)
//IL_1007: Expected O, but got Unknown
//IL_1035: Unknown result type (might be due to invalid IL or missing references)
//IL_103f: Expected O, but got Unknown
//IL_106d: Unknown result type (might be due to invalid IL or missing references)
//IL_1077: Expected O, but got Unknown
//IL_10a5: Unknown result type (might be due to invalid IL or missing references)
//IL_10af: 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>()));
FakePlayers = config.Bind<int>("General", "FakePlayers", 0, new ConfigDescription("Fake the amount of players in the game (don't include you)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
EnableConformingUpgradeScaling = config.Bind<bool>("General", "EnableConformingUpgradeScaling", true, new ConfigDescription("Enable if purchasing upgrade one affects the prices of upgrade two and three", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamEnergyUpgradeTwo = config.Bind<bool>("EnergyTwo", "EnableTeamEnergyUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamEnergyUpgradeThree = config.Bind<bool>("EnergyThree", "EnableTeamEnergyUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamExtraJumpUpgradeTwo = config.Bind<bool>("ExtraJumpTwo", "EnableTeamExtraJumpUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamExtraJumpUpgradeThree = config.Bind<bool>("ExtraJumpThree", "EnableTeamExtraJumpUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamRangeUpgradeTwo = config.Bind<bool>("RangeTwo", "EnableTeamRangeUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamRangeUpgradeThree = config.Bind<bool>("RangeThree", "EnableTeamRangeUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamStrengthUpgradeTwo = config.Bind<bool>("StrengthTwo", "EnableTeamStrengthUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamStrengthUpgradeThree = config.Bind<bool>("StrengthThree", "EnableTeamStrengthUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamHealthUpgradeTwo = config.Bind<bool>("HealthTwo", "EnableTeamHealthUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamHealthUpgradeThree = config.Bind<bool>("HealthThree", "EnableTeamHealthUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamSpeedUpgradeTwo = config.Bind<bool>("SpeedTwo", "EnableTeamSpeedUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamSpeedUpgradeThree = config.Bind<bool>("SpeedThree", "EnableTeamSpeedUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamTumbleLaunchUpgradeTwo = config.Bind<bool>("TumbleLaunchTwo", "EnableTeamTumbleLaunchUpgradeTwo", true, new ConfigDescription("Enable the teamwide use of this upgrade", (AcceptableValueBase)null, Array.Empty<object>()));
EnableTeamTumbleLaunchUpgradeThree = config.Bind<bool>("TumbleLaunchThree", "EnableTeamTumbleLaunchUpgradeThree", true, new ConfigDescription("Enable the teamwide use of this upgrade", (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>()));
MaxInShopEnergyOne = config.Bind<int>("EnergyOne", "MaxInShopEnergyOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopEnergyTwo = config.Bind<int>("EnergyTwo", "MaxInShopEnergyTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopEnergyThree = config.Bind<int>("EnergyThree", "MaxInShopEnergyThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopExtraJumpOne = config.Bind<int>("ExtraJumpOne", "MaxInShopExtraJumpOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopExtraJumpTwo = config.Bind<int>("ExtraJumpTwo", "MaxInShopExtraJumpTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopExtraJumpThree = config.Bind<int>("ExtraJumpThree", "MaxInShopExtraJumpThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopRangeOne = config.Bind<int>("RangeOne", "MaxInShopRangeOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopRangeTwo = config.Bind<int>("RangeTwo", "MaxInShopRangeTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopRangeThree = config.Bind<int>("RangeThree", "MaxInShopRangeThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopStrengthOne = config.Bind<int>("StrengthOne", "MaxInShopStrengthOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopStrengthTwo = config.Bind<int>("StrengthTwo", "MaxInShopStrengthTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopStrengthThree = config.Bind<int>("StrengthThree", "MaxInShopStrengthThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopHealthOne = config.Bind<int>("HealthOne", "MaxInShopHealthOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopHealthTwo = config.Bind<int>("HealthTwo", "MaxInShopHealthTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopHealthThree = config.Bind<int>("HealthThree", "MaxInShopHealthThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopSpeedOne = config.Bind<int>("SpeedOne", "MaxInShopSpeedOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopSpeedTwo = config.Bind<int>("SpeedTwo", "MaxInShopSpeedTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopSpeedThree = config.Bind<int>("SpeedThree", "MaxInShopSpeedThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopTumbleLaunchOne = config.Bind<int>("TumbleLaunchOne", "MaxInShopTumbleLaunchOne", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopTumbleLaunchTwo = config.Bind<int>("TumbleLaunchTwo", "MaxInShopTumbleLaunchTwo", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopTumbleLaunchThree = config.Bind<int>("TumbleLaunchThree", "MaxInShopTumbleLaunchThree", 1, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
MaxInShopPlayerCount = config.Bind<int>("PlayerCount", "MaxInShopPlayerCount", 2, new ConfigDescription("Set the max amount of instances of the respective upgrade in the shop at a time", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
EnergyOnePriceMin = config.Bind<int>("EnergyOne", "EnergyOnePriceMin", 2000, 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", 2000, 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", 3000, 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", 3000, 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", 5000, 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", 5000, 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", 8000, 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", 8000, 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", 14000, 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", 14000, 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", 21000, 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", 21000, 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", 7000, 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", 7000, 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", 12000, 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", 12000, 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", 18000, 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", 18000, 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", 7000, 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", 7000, 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", 12000, 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", 12000, 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", 18000, 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", 18000, 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", 4000, 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", 4000, 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", 6000, 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", 6000, 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", 9000, 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", 9000, 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", 7000, 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", 7000, 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", 12000, 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", 12000, 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", 18000, 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", 18000, 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", 4000, 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", 4000, 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", 6000, 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", 6000, 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", 9000, 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", 9000, 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", 8000, 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", 8000, 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>(3)
{
Configuration.StrengthOnePriceMin.Value,
Configuration.StrengthOnePriceMax.Value,
Configuration.MaxInShopStrengthOne.Value
}
},
{
"Strength Upgrade Two",
new List<int>(3)
{
Configuration.StrengthTwoPriceMin.Value,
Configuration.StrengthTwoPriceMax.Value,
Configuration.MaxInShopStrengthTwo.Value
}
},
{
"Strength Upgrade Three",
new List<int>(3)
{
Configuration.StrengthThreePriceMin.Value,
Configuration.StrengthThreePriceMax.Value,
Configuration.MaxInShopStrengthThree.Value
}
},
{
"Stamina Upgrade",
new List<int>(3)
{
Configuration.EnergyOnePriceMin.Value,
Configuration.EnergyOnePriceMax.Value,
Configuration.MaxInShopEnergyOne.Value
}
},
{
"Stamina Upgrade Two",
new List<int>(3)
{
Configuration.EnergyTwoPriceMin.Value,
Configuration.EnergyTwoPriceMax.Value,
Configuration.MaxInShopEnergyTwo.Value
}
},
{
"Stamina Upgrade Three",
new List<int>(3)
{
Configuration.EnergyThreePriceMin.Value,
Configuration.EnergyThreePriceMax.Value,
Configuration.MaxInShopEnergyThree.Value
}
},
{
"Extra Jump Upgrade",
new List<int>(3)
{
Configuration.ExtraJumpOnePriceMin.Value,
Configuration.ExtraJumpOnePriceMax.Value,
Configuration.MaxInShopExtraJumpOne.Value
}
},
{
"Extra Jump Upgrade Two",
new List<int>(3)
{
Configuration.ExtraJumpTwoPriceMin.Value,
Configuration.ExtraJumpTwoPriceMax.Value,
Configuration.MaxInShopExtraJumpTwo.Value
}
},
{
"Extra Jump Upgrade Three",
new List<int>(3)
{
Configuration.ExtraJumpThreePriceMin.Value,
Configuration.ExtraJumpThreePriceMax.Value,
Configuration.MaxInShopExtraJumpThree.Value
}
},
{
"Health Upgrade",
new List<int>(3)
{
Configuration.HealthOnePriceMin.Value,
Configuration.HealthOnePriceMax.Value,
Configuration.MaxInShopHealthOne.Value
}
},
{
"Health Upgrade Two",
new List<int>(3)
{
Configuration.HealthTwoPriceMin.Value,
Configuration.HealthTwoPriceMax.Value,
Configuration.MaxInShopHealthTwo.Value
}
},
{
"Health Upgrade Three",
new List<int>(3)
{
Configuration.HealthThreePriceMin.Value,
Configuration.HealthThreePriceMax.Value,
Configuration.MaxInShopHealthThree.Value
}
},
{
"Range Upgrade",
new List<int>(3)
{
Configuration.RangeOnePriceMin.Value,
Configuration.RangeOnePriceMax.Value,
Configuration.MaxInShopRangeOne.Value
}
},
{
"Range Upgrade Two",
new List<int>(3)
{
Configuration.RangeTwoPriceMin.Value,
Configuration.RangeTwoPriceMax.Value,
Configuration.MaxInShopRangeTwo.Value
}
},
{
"Range Upgrade Three",
new List<int>(3)
{
Configuration.RangeThreePriceMin.Value,
Configuration.RangeThreePriceMax.Value,
Configuration.MaxInShopRangeThree.Value
}
},
{
"Sprint Speed Upgrade",
new List<int>(3)
{
Configuration.SpeedOnePriceMin.Value,
Configuration.SpeedOnePriceMax.Value,
Configuration.MaxInShopSpeedOne.Value
}
},
{
"Sprint Speed Upgrade Two",
new List<int>(3)
{
Configuration.SpeedTwoPriceMin.Value,
Configuration.SpeedTwoPriceMax.Value,
Configuration.MaxInShopSpeedTwo.Value
}
},
{
"Sprint Speed Upgrade Three",
new List<int>(3)
{
Configuration.SpeedThreePriceMin.Value,
Configuration.SpeedThreePriceMax.Value,
Configuration.MaxInShopSpeedThree.Value
}
},
{
"Tumble Launch Upgrade",
new List<int>(3)
{
Configuration.TumbleLaunchOnePriceMin.Value,
Configuration.TumbleLaunchOnePriceMax.Value,
Configuration.MaxInShopTumbleLaunchOne.Value
}
},
{
"Tumble Launch Upgrade Two",
new List<int>(3)
{
Configuration.TumbleLaunchTwoPriceMin.Value,
Configuration.TumbleLaunchTwoPriceMax.Value,
Configuration.MaxInShopTumbleLaunchTwo.Value
}
},
{
"Tumble Launch Upgrade Three",
new List<int>(3)
{
Configuration.TumbleLaunchThreePriceMin.Value,
Configuration.TumbleLaunchThreePriceMax.Value,
Configuration.MaxInShopTumbleLaunchThree.Value
}
},
{
"Map Player Count Upgrade",
new List<int>(3)
{
Configuration.PlayerCountPriceMin.Value,
Configuration.PlayerCountPriceMax.Value,
Configuration.MaxInShopPlayerCount.Value
}
}
};
int num = 0;
float upgradeValueIncrease = Configuration.UpgradePriceScalingIncrease.Value / 100f;
ShopManager.instance.upgradeValueIncrease = upgradeValueIncrease;
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, value[2], num);
num++;
}
Debug.Log((object)"All items patched for BetterUpgrades");
}
private static void SetItemValueMinMax(Item item, int minValue, int maxValue, string name, float basePriceMult, int maxInShop, int index)
{
if ((Object)(object)item == (Object)null)
{
Debug.LogError((object)("StatsManagerPatch: Failed to set item min max value. " + name + " is null."));
return;
}
int num = index + 1;
int num2 = num;
int num3;
int num4;
if (num2 > 1 && num2 < 4)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Grab Strength");
num4 = Configuration.StrengthOnePriceMax.Value;
}
else
{
int num5 = num2;
if (num5 > 4 && num5 < 7)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Energy");
num4 = Configuration.EnergyOnePriceMax.Value;
}
else
{
int num6 = num2;
if (num6 > 7 && num6 < 10)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Extra Jump");
num4 = Configuration.ExtraJumpOnePriceMax.Value;
}
else
{
int num7 = num2;
if (num7 > 10 && num7 < 13)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Health");
num4 = Configuration.HealthOnePriceMax.Value;
}
else
{
int num8 = num2;
if (num8 > 13 && num8 < 16)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Grab Range");
num4 = Configuration.RangeOnePriceMax.Value;
}
else
{
int num9 = num2;
if (num9 > 16 && num9 < 19)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Sprint Speed");
num4 = Configuration.SpeedOnePriceMax.Value;
}
else
{
int num10 = num2;
if (num10 > 19 && num10 < 22)
{
num3 = StatsManager.instance.GetItemsUpgradesPurchased("Item Upgrade Player Tumble Launch");
num4 = Configuration.TumbleLaunchOnePriceMax.Value;
}
else
{
num3 = 0;
num4 = 0;
}
}
}
}
}
}
}
float num11 = GameDirector.instance.PlayerList.Count - 1 + Configuration.FakePlayers.Value;
float value = Configuration.UpgradePlayerPriceScaling.Value;
if (!Configuration.EnableConformingUpgradeScaling.Value)
{
num3 = 0;
num4 = 0;
}
float num12 = value / 100f * num11;
int num13 = (int)Math.Round((double)minValue / 1000.0) * 1000 / 4;
int num14 = (int)Math.Round((double)maxValue / 1000.0) * 1000 / 4;
float num15 = (float)(num4 / 4) * ShopManager.instance.upgradeValueIncrease * (float)num3;
Value val = ScriptableObject.CreateInstance<Value>();
val.valueMin = ((float)num13 + num12 * (float)(minValue / 4)) * basePriceMult + num15;
val.valueMax = ((float)num14 + num12 * (float)(maxValue / 4)) * basePriceMult + num15;
item.value = val;
item.maxAmountInShop = maxInShop;
}
}
[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 static 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_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Expected O, but got Unknown
if (Harmony == null)
{
Harmony = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID);
}
Harmony.PatchAll();
}
internal void Unpatch()
{
Harmony? harmony = Harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
private void Update()
{
}
}
}