Decompiled source of ReindogAndFriends v2.3.2

ReindogFan1372.ReindogDLL.dll

Decompiled a month ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
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 GameNetcodeStuff;
using HarmonyLib;
using LethalLevelLoader;
using Microsoft.CodeAnalysis;
using ReindogFan1372.ReindogDLL.NetcodePatcher;
using StaticNetcodeLib;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
using UnityEngine.UI;

[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 = "")]
[assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("ClientNetworkTransform")]
[assembly: IgnoresAccessChecksTo("DissonanceVoip")]
[assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")]
[assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")]
[assembly: IgnoresAccessChecksTo("LethalLevelLoader")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.Jobs")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Relay")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: IgnoresAccessChecksTo("Xilophor.StaticNetcodeLib")]
[assembly: AssemblyCompany("ReindogFan1372.ReindogDLL")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2")]
[assembly: AssemblyProduct("ReindogDLL")]
[assembly: AssemblyTitle("ReindogFan1372.ReindogDLL")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.2.0")]
[module: UnverifiableCode]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace ReindogDLL
{
	[BepInPlugin("ReindogFan1372.ReindogDLL", "ReindogDLL", "1.1.2")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class ReindogDLL : BaseUnityPlugin
	{
		internal static AssetBundle MyCustomAssets;

		internal static Texture2D fosgreathTexture;

		internal static AudioClip fosgreathClip;

		public static Dictionary<string, LevelMatchingProperties> LevelMatchingPropertiesByName = new Dictionary<string, LevelMatchingProperties>();

		public static ReindogDLL Instance { get; private set; } = null;


		internal static ManualLogSource Logger { get; private set; } = null;


		internal static Harmony? Harmony { get; set; }

		internal static MyModConfig ReindogAndFriendsModConfig { get; private set; } = null;


		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			ReindogAndFriendsModConfig = new MyModConfig(((BaseUnityPlugin)this).Config);
			AssetBundleLoader.AddOnExtendedModLoadedListener((Action<ExtendedMod>)OnExtendedModRegistered, "ReindogFan1372", "ReindogAndFriends");
			NetcodePatcher();
			Patch();
			Logger.LogInfo((object)"ReindogAndFriends has loaded!                                                                 \r\n                                                                 \r\n                       =--.                                      \r\n                       **+=-                                     \r\n                           +=:                                   \r\n         .                  -=:                                  \r\n         -+             -=  -=+                                  \r\n        .=*             ===.-+#                                  \r\n        -*    .          :--+#.                                  \r\n        ==                =+#.                                   \r\n        =.=              -+#                                     \r\n        =:=             .+#                                      \r\n        --+     .       +#.   .--.                               \r\n        --=            =*=    -*+-:                              \r\n         -:.           +#    -*-:.=                              \r\n          --.        .:**#=::+*::=-                              \r\n           --:       :=*===++++*                                 \r\n            -==     :::---==+--                                  \r\n             ++..  .::--=++=+=-:                                 \r\n          .-: .... ::--=+++++++-::..+                            \r\n          **. .:::::--=#+*++=====--+.-                           \r\n          -:.:----:---=*%*:::---===::-                           \r\n          ==.-===-----=+=::--++=====*                            \r\n            .--=#-:...:::--=+**+===*=                            \r\n            .-:=%- ------=++****+++*                             \r\n            ..... =###+++++*-.*+***:                             \r\n            ......=##*+****:..-*=*-                              \r\n           .::=--:-=#*+**:..::-**:.                              \r\n          .--=++++===+**..::-:-#%#:..                            \r\n         .=-=+:....+**=...:---=##*-..                            \r\n            :+-..........::-=+#*#---:                            \r\n            .==-:::......-:=****--:.                             \r\n             -.=--::..:-:-=**+=:--.                              \r\n             - .*==-:::--***+:.:--..                             \r\n           . -  :**-:::-+**-...---.:                             \r\n            -:  ..:*:::+++.....--:.:.                            \r\n               ....==:=*=.....---:.:..                           \r\n               .....::*......::--::-::.                          \r\n              .......+......------:-:::.                         \r\n              :............:------:---=..                        \r\n              ............:------------.:.                       \r\n              ..........::---------:-=:--:.                      \r\n             ..........:::--------=:=-:=--.                      \r\n             ::.-:....:-:---------=---=----:                     \r\n             --::+.:=:=::-::------=---:....:                     \r\n             --::-.:--::::--------=-=-----...                    \r\n            .:-:::-+::::::------==+-=-----:..                    \r\n            .:-=-::-::::..-----===+=-------:.                    \r\n           ..:-=-:-:::- :-.----=++++:-------..                   \r\n           .:--++-----:..:-:--==+*---:---==+::                   \r\n          .::-==#+---= ...---===+*=.::--==++=.        .....      \r\n         .::-===*%+=== -:::====+*=+++:-===++=.   ....:::::::     \r\n         ::--==++##:=.:--::====++++*++:==+*+++...::----::::..    \r\n         ::-==++*#:   --=-:===+#+*##*+-++*#*+**++===+-:----:.    \r\n        .:--=++*#:   ---==:==+**+*##*+-**#**%##*****-----==-=.   \r\n        -:-==+*#:   .===+===++:++*#*+++*#%%    .-*#+======+**    \r\n       =--==+*#.     ---==+++* +++**+=*:           =++++++*#     \r\n       .=+-+#-       -=-==++#  *+*+++*             :#*####       \r\n         :          .--===*#   *+++*                             \r\n                    :#:++==      .                               \r\n                      :                                                \r\n");
		}

		internal static void OnExtendedModRegistered(ExtendedMod myMod)
		{
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Expected O, but got Unknown
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Expected O, but got Unknown
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Expected O, but got Unknown
			if ((Object)(object)myMod == (Object)null)
			{
				return;
			}
			LoadNeededAssets();
			foreach (ExtendedItem extendedItem in myMod.ExtendedItems)
			{
				if (extendedItem.Item.itemName == "Holding Pen")
				{
					extendedItem.Item.creditsWorth = ReindogAndFriendsModConfig.holdingPenCost.Value;
					continue;
				}
				int configValueForItem = GetConfigValueForItem(extendedItem.Item.itemName);
				((MatchingProperties)extendedItem.LevelMatchingProperties).modNames.Clear();
				((MatchingProperties)extendedItem.LevelMatchingProperties).modNames.TrimExcess();
				((MatchingProperties)extendedItem.LevelMatchingProperties).authorNames.Clear();
				((MatchingProperties)extendedItem.LevelMatchingProperties).authorNames.TrimExcess();
				extendedItem.LevelMatchingProperties.levelTags.Clear();
				extendedItem.LevelMatchingProperties.levelTags.TrimExcess();
				extendedItem.LevelMatchingProperties.currentRoutePrice.Clear();
				extendedItem.LevelMatchingProperties.currentRoutePrice.TrimExcess();
				extendedItem.LevelMatchingProperties.currentWeather.Clear();
				extendedItem.LevelMatchingProperties.currentWeather.TrimExcess();
				extendedItem.LevelMatchingProperties.planetNames.Clear();
				extendedItem.LevelMatchingProperties.planetNames.TrimExcess();
				StringWithRarity item = new StringWithRarity("Vanilla", configValueForItem);
				StringWithRarity item2 = new StringWithRarity("Custom", configValueForItem);
				LevelMatchingPropertiesByName.Add(extendedItem.Item.itemName, extendedItem.LevelMatchingProperties);
				if (configValueForItem > 0)
				{
					extendedItem.LevelMatchingProperties.levelTags.Add(item2);
					extendedItem.LevelMatchingProperties.levelTags.Add(item);
					LevelMatchingPropertiesByName[extendedItem.Item.itemName] = extendedItem.LevelMatchingProperties;
				}
			}
			foreach (ExtendedEnemyType extendedEnemyType in myMod.ExtendedEnemyTypes)
			{
				if (extendedEnemyType.EnemyType.enemyName == "Mario")
				{
					((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).modNames.Clear();
					((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).modNames.TrimExcess();
					((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).authorNames.Clear();
					((MatchingProperties)extendedEnemyType.InsideLevelMatchingProperties).authorNames.TrimExcess();
					extendedEnemyType.InsideLevelMatchingProperties.levelTags.Clear();
					extendedEnemyType.InsideLevelMatchingProperties.levelTags.TrimExcess();
					extendedEnemyType.InsideLevelMatchingProperties.currentRoutePrice.Clear();
					extendedEnemyType.InsideLevelMatchingProperties.currentRoutePrice.TrimExcess();
					extendedEnemyType.InsideLevelMatchingProperties.currentWeather.Clear();
					extendedEnemyType.InsideLevelMatchingProperties.currentWeather.TrimExcess();
					extendedEnemyType.InsideLevelMatchingProperties.planetNames.Clear();
					extendedEnemyType.InsideLevelMatchingProperties.planetNames.TrimExcess();
					int value = ReindogAndFriendsModConfig.marioRarity.Value;
					StringWithRarity item3 = new StringWithRarity("Vanilla", value);
					StringWithRarity item4 = new StringWithRarity("Custom", value);
					LevelMatchingPropertiesByName.Add(extendedEnemyType.EnemyType.enemyName, extendedEnemyType.InsideLevelMatchingProperties);
					if (value > 0)
					{
						extendedEnemyType.InsideLevelMatchingProperties.levelTags.Add(item4);
						extendedEnemyType.InsideLevelMatchingProperties.levelTags.Add(item3);
						extendedEnemyType.EnemyType.MaxCount = ReindogAndFriendsModConfig.marioMaxCount.Value;
						extendedEnemyType.EnemyType.PowerLevel = ReindogAndFriendsModConfig.marioPowerLevel.Value;
						LevelMatchingPropertiesByName[extendedEnemyType.EnemyType.enemyName] = extendedEnemyType.InsideLevelMatchingProperties;
					}
				}
			}
		}

		internal static void LoadNeededAssets()
		{
			if (ReindogAndFriendsModConfig.maximumFosgreathModeEnabled.Value)
			{
				fosgreathTexture = AssetBundleLoader.assetBundles["reindogandfriends.lethalbundle"].LoadAsset<Texture2D>("assets/lethalcompany/mods/reindogandfriends/items/fosgreath/data/texturegreath.jpg");
				fosgreathClip = AssetBundleLoader.assetBundles["reindogandfriends.lethalbundle"].LoadAsset<AudioClip>("assets/lethalcompany/mods/reindogandfriends/audio/clipgreath.ogg");
			}
		}

		private static int GetConfigValueForItem(string itemName)
		{
			switch (itemName)
			{
			case "Bober Kurwa":
				return ReindogAndFriendsModConfig.boberKurwaSpawnRate.Value;
			case "Mini Nuke":
				return ReindogAndFriendsModConfig.miniNukeSpawnRate.Value;
			case "Broda":
				return ReindogAndFriendsModConfig.brodaSpawnRate.Value;
			case "Chris Griffin":
				return ReindogAndFriendsModConfig.chrisGriffinSpawnRate.Value;
			case "Cid":
				return ReindogAndFriendsModConfig.cidSpawnRate.Value;
			case "Clyde":
				return ReindogAndFriendsModConfig.clydeSpawnRate.Value;
			case "Crawly":
				return ReindogAndFriendsModConfig.crawlySpawnRate.Value;
			case "Deku":
				return ReindogAndFriendsModConfig.dekuSpawnRate.Value;
			case "Fosgreath":
				return ReindogAndFriendsModConfig.fosgreathSpawnRate.Value;
			case "Frieza":
				return ReindogAndFriendsModConfig.friezaSpawnRate.Value;
			case "Golden Reindog":
				return ReindogAndFriendsModConfig.goldenReindogSpawnRate.Value;
			case "Hamster":
				return ReindogAndFriendsModConfig.hamsterSpawnRate.Value;
			case "Iron Giant":
				return ReindogAndFriendsModConfig.ironGiantSpawnRate.Value;
			case "Lebron":
				return ReindogAndFriendsModConfig.lebronSpawnRate.Value;
			case "Lightning McQueen":
				return ReindogAndFriendsModConfig.lightningMcqueenSpawnRate.Value;
			case "Monkey Cube":
				return ReindogAndFriendsModConfig.monkeyCubeSpawnRate.Value;
			case "Nerd":
				return ReindogAndFriendsModConfig.nerdSpawnRate.Value;
			case "Optimus Prime":
				return ReindogAndFriendsModConfig.optimusPrimeSpawnRate.Value;
			case "Rat":
				return ReindogAndFriendsModConfig.ratSpawnRate.Value;
			case "Reindog":
				return ReindogAndFriendsModConfig.reindogSpawnRate.Value;
			case "Saul Bigman":
				return ReindogAndFriendsModConfig.saulBigmanSpawnRate.Value;
			case "Saul Goodman":
				return ReindogAndFriendsModConfig.saulGoodmanSpawnRate.Value;
			case "Sonic":
				return ReindogAndFriendsModConfig.sonicSpawnRate.Value;
			case "Superman":
				return ReindogAndFriendsModConfig.supermanSpawnRate.Value;
			case "Swag Baby":
				return ReindogAndFriendsModConfig.babySpawnRate.Value;
			case "Rayman":
				return ReindogAndFriendsModConfig.raymanSpawnRate.Value;
			case "Shadow":
				return ReindogAndFriendsModConfig.shadowSpawnRate.Value;
			case "Remy":
				return ReindogAndFriendsModConfig.remySpawnRate.Value;
			case "Fan":
				return ReindogAndFriendsModConfig.fanSpawnRate.Value;
			case "Knuckles":
				return ReindogAndFriendsModConfig.knucklesSpawnRate.Value;
			case "1-Up Mushroom":
				return ReindogAndFriendsModConfig.mushroomSpawnRate.Value;
			default:
				Logger.LogInfo((object)("No configuration found for item type: " + itemName + ", setting spawn value to 25"));
				return 25;
			}
		}

		public static float GetGenericVolumeConfig(string itemName)
		{
			return itemName switch
			{
				"Bober Kurwa" => ReindogAndFriendsModConfig.boberKurwaGenericVolume.Value, 
				"Mini Nuke" => ReindogAndFriendsModConfig.miniNukeGenericVolume.Value, 
				"Broda" => ReindogAndFriendsModConfig.brodaGenericVolume.Value, 
				"Chris Griffin" => ReindogAndFriendsModConfig.chrisGriffinGenericVolume.Value, 
				"Cid" => ReindogAndFriendsModConfig.cidGenericVolume.Value, 
				"Clyde" => ReindogAndFriendsModConfig.clydeGenericVolume.Value, 
				"Crawly" => ReindogAndFriendsModConfig.crawlyGenericVolume.Value, 
				"Deku" => ReindogAndFriendsModConfig.dekuGenericVolume.Value, 
				"Fosgreath" => ReindogAndFriendsModConfig.fosgreathGenericVolume.Value, 
				"Frieza" => ReindogAndFriendsModConfig.friezaGenericVolume.Value, 
				"Golden Reindog" => ReindogAndFriendsModConfig.goldenReindogGenericVolume.Value, 
				"Hamster" => ReindogAndFriendsModConfig.hamsterGenericVolume.Value, 
				"Iron Giant" => ReindogAndFriendsModConfig.ironGiantGenericVolume.Value, 
				"Lebron" => ReindogAndFriendsModConfig.lebronGenericVolume.Value, 
				"Lightning McQueen" => ReindogAndFriendsModConfig.lightningMcQueenGenericVolume.Value, 
				"Monkey Cube" => ReindogAndFriendsModConfig.monkeyCubeGenericVolume.Value, 
				"Nerd" => ReindogAndFriendsModConfig.nerdGenericVolume.Value, 
				"Optimus Prime" => ReindogAndFriendsModConfig.optimusPrimeGenericVolume.Value, 
				"Rat" => ReindogAndFriendsModConfig.ratGenericVolume.Value, 
				"Reindog" => ReindogAndFriendsModConfig.reindogGenericVolume.Value, 
				"Saul Bigman" => ReindogAndFriendsModConfig.saulBigmanGenericVolume.Value, 
				"Saul Goodman" => ReindogAndFriendsModConfig.saulGoodmanGenericVolume.Value, 
				"Sonic" => ReindogAndFriendsModConfig.sonicGenericVolume.Value, 
				"Superman" => ReindogAndFriendsModConfig.supermanGenericVolume.Value, 
				"Swag Baby" => ReindogAndFriendsModConfig.babyGenericVolume.Value, 
				"Rayman" => ReindogAndFriendsModConfig.raymanGenericVolume.Value, 
				"Shadow" => ReindogAndFriendsModConfig.shadowGenericVolume.Value, 
				"Remy" => ReindogAndFriendsModConfig.remyGenericVolume.Value, 
				"Fan" => ReindogAndFriendsModConfig.fanGenericVolume.Value, 
				"Knuckles" => ReindogAndFriendsModConfig.knucklesGenericVolume.Value, 
				"1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomGenericVolume.Value, 
				"Holding Pen" => ReindogAndFriendsModConfig.holdingPenGenericVolume.Value, 
				_ => -1f, 
			};
		}

		public static float GetRoamingVolumeConfig(string itemName)
		{
			return itemName switch
			{
				"Sonic" => ReindogAndFriendsModConfig.sonicVolume.Value, 
				"Crawly" => ReindogAndFriendsModConfig.crawlyVolume.Value, 
				"Deku" => ReindogAndFriendsModConfig.dekuVolume.Value, 
				"Rayman" => ReindogAndFriendsModConfig.raymanVolume.Value, 
				"Shadow" => ReindogAndFriendsModConfig.shadowVolume.Value, 
				"Remy" => ReindogAndFriendsModConfig.remyVolume.Value, 
				"Knuckles" => ReindogAndFriendsModConfig.knucklesVolume.Value, 
				"1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomVolume.Value, 
				_ => 1f, 
			};
		}

		public static float GetSpeedConfig(string itemName)
		{
			return itemName switch
			{
				"Sonic" => ReindogAndFriendsModConfig.sonicSpeed.Value, 
				"Crawly" => ReindogAndFriendsModConfig.crawlySpeed.Value, 
				"Deku" => ReindogAndFriendsModConfig.dekuSpeed.Value, 
				"Rayman" => ReindogAndFriendsModConfig.raymanSpeed.Value, 
				"Shadow" => ReindogAndFriendsModConfig.shadowSpeed.Value, 
				"Remy" => ReindogAndFriendsModConfig.remySpeed.Value, 
				"Knuckles" => ReindogAndFriendsModConfig.knucklesSpeed.Value, 
				"1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomSpeed.Value, 
				_ => 5f, 
			};
		}

		public static int GetRoamChanceConfig(string itemName)
		{
			return itemName switch
			{
				"Sonic" => ReindogAndFriendsModConfig.sonicRoamChance.Value, 
				"Crawly" => ReindogAndFriendsModConfig.crawlyRoamChance.Value, 
				"Deku" => ReindogAndFriendsModConfig.dekuRoamChance.Value, 
				"Rayman" => ReindogAndFriendsModConfig.raymanRoamChance.Value, 
				"Shadow" => ReindogAndFriendsModConfig.shadowRoamChance.Value, 
				"Remy" => ReindogAndFriendsModConfig.remyRoamChance.Value, 
				"Knuckles" => ReindogAndFriendsModConfig.knucklesRoamChance.Value, 
				"1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomRoamChance.Value, 
				_ => 100, 
			};
		}

		public static float GetMaxHearableDistanceConfig(string itemName)
		{
			return itemName switch
			{
				"Sonic" => ReindogAndFriendsModConfig.sonicHearableDist.Value, 
				"Crawly" => ReindogAndFriendsModConfig.crawlyHearableDist.Value, 
				"Deku" => ReindogAndFriendsModConfig.dekuHearableDist.Value, 
				"Rayman" => ReindogAndFriendsModConfig.raymanHearableDist.Value, 
				"Shadow" => ReindogAndFriendsModConfig.shadowHearableDist.Value, 
				"Remy" => ReindogAndFriendsModConfig.remyHearableDist.Value, 
				"Knuckles" => ReindogAndFriendsModConfig.knucklesHearableDist.Value, 
				"1-Up Mushroom" => ReindogAndFriendsModConfig.mushroomHearableDist.Value, 
				_ => 40f, 
			};
		}

		public static int GetMusicMode(string itemName)
		{
			if (!(itemName == "Crawly"))
			{
				if (itemName == "Knuckles")
				{
					return ReindogAndFriendsModConfig.knucklesMusicMode.Value;
				}
				return -1;
			}
			return ReindogAndFriendsModConfig.crawlyMusicMode.Value;
		}

		internal static void Patch()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			if (Harmony == null)
			{
				Harmony = new Harmony("ReindogFan1372.ReindogDLL");
			}
			Logger.LogDebug((object)"Patching...");
			Harmony.PatchAll();
			Logger.LogDebug((object)"Finished patching!");
		}

		internal static void Unpatch()
		{
			Logger.LogDebug((object)"Unpatching...");
			Harmony? harmony = Harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
			Logger.LogDebug((object)"Finished unpatching!");
		}

		private static void NetcodePatcher()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}
	}
	internal class MyModConfig
	{
		public readonly ConfigEntry<int> boberKurwaSpawnRate;

		public readonly ConfigEntry<float> boberKurwaGenericVolume;

		public readonly ConfigEntry<int> miniNukeSpawnRate;

		public readonly ConfigEntry<int> miniNukeExplodeChance;

		public readonly ConfigEntry<float> timeBetweenBombActivationChecksMax;

		public readonly ConfigEntry<float> nukeDetonationTime;

		public readonly ConfigEntry<float> miniNukeGenericVolume;

		public readonly ConfigEntry<float> miniNukeBeepingVolume;

		public readonly ConfigEntry<float> miniNukeExplosionVolume;

		public readonly ConfigEntry<int> brodaSpawnRate;

		public readonly ConfigEntry<float> brodaGenericVolume;

		public readonly ConfigEntry<int> chrisGriffinSpawnRate;

		public readonly ConfigEntry<float> chrisGriffinGenericVolume;

		public readonly ConfigEntry<int> cidSpawnRate;

		public readonly ConfigEntry<float> cidGenericVolume;

		public readonly ConfigEntry<int> clydeSpawnRate;

		public readonly ConfigEntry<float> clydeGenericVolume;

		public readonly ConfigEntry<int> crawlySpawnRate;

		public readonly ConfigEntry<float> crawlyVolume;

		public readonly ConfigEntry<int> crawlyMusicMode;

		public readonly ConfigEntry<float> crawlySpeed;

		public readonly ConfigEntry<int> crawlyRoamChance;

		public readonly ConfigEntry<float> crawlyHearableDist;

		public readonly ConfigEntry<float> crawlyGenericVolume;

		public readonly ConfigEntry<bool> randomiseSize;

		public readonly ConfigEntry<float> minRandomisedSize;

		public readonly ConfigEntry<float> maxRandomisedSize;

		public readonly ConfigEntry<int> dekuSpawnRate;

		public readonly ConfigEntry<float> dekuVolume;

		public readonly ConfigEntry<float> dekuSpeed;

		public readonly ConfigEntry<int> dekuRoamChance;

		public readonly ConfigEntry<float> dekuHearableDist;

		public readonly ConfigEntry<float> dekuGenericVolume;

		public readonly ConfigEntry<int> fosgreathSpawnRate;

		public readonly ConfigEntry<float> fosgreathGenericVolume;

		public readonly ConfigEntry<int> friezaSpawnRate;

		public readonly ConfigEntry<float> friezaGenericVolume;

		public readonly ConfigEntry<int> goldenReindogSpawnRate;

		public readonly ConfigEntry<float> goldenReindogGenericVolume;

		public readonly ConfigEntry<int> hamsterSpawnRate;

		public readonly ConfigEntry<float> hamsterGenericVolume;

		public readonly ConfigEntry<int> ironGiantSpawnRate;

		public readonly ConfigEntry<float> ironGiantGenericVolume;

		public readonly ConfigEntry<int> lebronSpawnRate;

		public readonly ConfigEntry<float> lebronGenericVolume;

		public readonly ConfigEntry<int> lightningMcqueenSpawnRate;

		public readonly ConfigEntry<float> lightningMcQueenGenericVolume;

		public readonly ConfigEntry<int> monkeyCubeSpawnRate;

		public readonly ConfigEntry<float> monkeyCubeGenericVolume;

		public readonly ConfigEntry<int> nerdSpawnRate;

		public readonly ConfigEntry<float> nerdGenericVolume;

		public readonly ConfigEntry<int> optimusPrimeSpawnRate;

		public readonly ConfigEntry<float> optimusPrimeGenericVolume;

		public readonly ConfigEntry<int> ratSpawnRate;

		public readonly ConfigEntry<float> ratGenericVolume;

		public readonly ConfigEntry<int> reindogSpawnRate;

		public readonly ConfigEntry<float> reindogGenericVolume;

		public readonly ConfigEntry<int> saulBigmanSpawnRate;

		public readonly ConfigEntry<float> saulBigmanGenericVolume;

		public readonly ConfigEntry<int> saulGoodmanSpawnRate;

		public readonly ConfigEntry<float> saulGoodmanGenericVolume;

		public readonly ConfigEntry<int> sonicSpawnRate;

		public readonly ConfigEntry<float> sonicVolume;

		public readonly ConfigEntry<float> sonicSpeed;

		public readonly ConfigEntry<int> sonicRoamChance;

		public readonly ConfigEntry<float> sonicHearableDist;

		public readonly ConfigEntry<float> sonicGenericVolume;

		public readonly ConfigEntry<int> supermanSpawnRate;

		public readonly ConfigEntry<float> supermanGenericVolume;

		public readonly ConfigEntry<int> babySpawnRate;

		public readonly ConfigEntry<float> babyGenericVolume;

		public readonly ConfigEntry<int> fanSpawnRate;

		public readonly ConfigEntry<float> fanVolume;

		public readonly ConfigEntry<float> fanBlowForceMin;

		public readonly ConfigEntry<float> fanBlowForceMax;

		public readonly ConfigEntry<float> fanBlowDist;

		public readonly ConfigEntry<int> fanActivationChance;

		public readonly ConfigEntry<float> fanActivationMaxInterval;

		public readonly ConfigEntry<float> fanGenericVolume;

		public readonly ConfigEntry<int> raymanSpawnRate;

		public readonly ConfigEntry<float> raymanVolume;

		public readonly ConfigEntry<float> raymanSpeed;

		public readonly ConfigEntry<int> raymanRoamChance;

		public readonly ConfigEntry<float> raymanHearableDist;

		public readonly ConfigEntry<float> raymanGenericVolume;

		public readonly ConfigEntry<int> shadowSpawnRate;

		public readonly ConfigEntry<float> shadowVolume;

		public readonly ConfigEntry<float> shadowSpeed;

		public readonly ConfigEntry<int> shadowRoamChance;

		public readonly ConfigEntry<float> shadowHearableDist;

		public readonly ConfigEntry<float> shadowGenericVolume;

		public readonly ConfigEntry<int> knucklesSpawnRate;

		public readonly ConfigEntry<float> knucklesVolume;

		public readonly ConfigEntry<float> knucklesSpeed;

		public readonly ConfigEntry<int> knucklesRoamChance;

		public readonly ConfigEntry<float> knucklesHearableDist;

		public readonly ConfigEntry<int> knucklesMusicMode;

		public readonly ConfigEntry<float> knucklesGenericVolume;

		public readonly ConfigEntry<int> remySpawnRate;

		public readonly ConfigEntry<float> remyVolume;

		public readonly ConfigEntry<float> remySpeed;

		public readonly ConfigEntry<int> remyRoamChance;

		public readonly ConfigEntry<float> remyHearableDist;

		public readonly ConfigEntry<float> remyGenericVolume;

		public readonly ConfigEntry<bool> maximumFosgreathModeEnabled;

		public readonly ConfigEntry<string> dekuExplodeTargetPlayerName;

		public readonly ConfigEntry<int> holdingPenCost;

		public readonly ConfigEntry<float> holdingPenGenericVolume;

		public readonly ConfigEntry<bool> quicktimeEventsToggle;

		public readonly ConfigEntry<float> quicktimeEventsDropRate;

		public readonly ConfigEntry<float> quicktimeEventsIncreaseRate;

		public readonly ConfigEntry<int> quicktimeEventChance;

		public readonly ConfigEntry<float> quicktimeEventIntervalMax;

		public readonly ConfigEntry<float> quicktimeEventIntervalMin;

		public readonly ConfigEntry<int> marioRarity;

		public readonly ConfigEntry<int> marioHealth;

		public readonly ConfigEntry<float> marioSearchSpeed;

		public readonly ConfigEntry<float> marioChaseSpeed;

		public readonly ConfigEntry<float> marioChaseMusicVolume;

		public readonly ConfigEntry<int> marioDamagePerHit;

		public readonly ConfigEntry<int> mushroomSpawnRate;

		public readonly ConfigEntry<float> mushroomVolume;

		public readonly ConfigEntry<float> mushroomSpeed;

		public readonly ConfigEntry<int> mushroomRoamChance;

		public readonly ConfigEntry<float> mushroomHearableDist;

		public readonly ConfigEntry<float> mushroomGenericVolume;

		public readonly ConfigEntry<int> marioMaxHearableDistSfx;

		public readonly ConfigEntry<int> marioMaxHearableDistChaseMusic;

		public readonly ConfigEntry<int> marioMaxCount;

		public readonly ConfigEntry<int> marioPowerLevel;

		public readonly ConfigEntry<int> minNumOfMushroomsToSpawn;

		public readonly ConfigEntry<int> maxNumOfMushroomsToSpawn;

		public MyModConfig(ConfigFile cfg)
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Expected O, but got Unknown
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Expected O, but got Unknown
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Expected O, but got Unknown
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Expected O, but got Unknown
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Expected O, but got Unknown
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Expected O, but got Unknown
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Expected O, but got Unknown
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: 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_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0468: Expected O, but got Unknown
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Expected O, but got Unknown
			//IL_050a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0514: Expected O, but got Unknown
			//IL_0560: Unknown result type (might be due to invalid IL or missing references)
			//IL_056a: 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_060c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0616: Expected O, but got Unknown
			//IL_0662: Unknown result type (might be due to invalid IL or missing references)
			//IL_066c: Expected O, but got Unknown
			//IL_06b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Expected O, but got Unknown
			//IL_070e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0718: Expected O, but got Unknown
			//IL_0764: Unknown result type (might be due to invalid IL or missing references)
			//IL_076e: Expected O, but got Unknown
			//IL_07ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c4: Expected O, but got Unknown
			//IL_0810: Unknown result type (might be due to invalid IL or missing references)
			//IL_081a: Expected O, but got Unknown
			//IL_0866: Unknown result type (might be due to invalid IL or missing references)
			//IL_0870: Expected O, but got Unknown
			//IL_08bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c6: Expected O, but got Unknown
			//IL_0912: Unknown result type (might be due to invalid IL or missing references)
			//IL_091c: Expected O, but got Unknown
			//IL_0968: Unknown result type (might be due to invalid IL or missing references)
			//IL_0972: Expected O, but got Unknown
			//IL_09be: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c8: Expected O, but got Unknown
			//IL_0a14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1e: Expected O, but got Unknown
			//IL_0a49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a53: Expected O, but got Unknown
			//IL_0a9e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa8: Expected O, but got Unknown
			//IL_0ad7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae1: Expected O, but got Unknown
			//IL_0b10: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1a: Expected O, but got Unknown
			//IL_0b49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b53: Expected O, but got Unknown
			//IL_0b82: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8c: Expected O, but got Unknown
			//IL_0bbb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc5: Expected O, but got Unknown
			//IL_0bf4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfe: Expected O, but got Unknown
			//IL_0c2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c37: Expected O, but got Unknown
			//IL_0c66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c70: Expected O, but got Unknown
			//IL_0c9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca9: Expected O, but got Unknown
			//IL_0cd8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce2: Expected O, but got Unknown
			//IL_0e07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e11: Expected O, but got Unknown
			//IL_0e36: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e40: Expected O, but got Unknown
			//IL_0e65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e6f: Expected O, but got Unknown
			//IL_0e94: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e9e: Expected O, but got Unknown
			//IL_0ec3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ecd: Expected O, but got Unknown
			//IL_0ef2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0efc: Expected O, but got Unknown
			//IL_0f21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f2b: Expected O, but got Unknown
			//IL_0f50: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f5a: Expected O, but got Unknown
			//IL_1190: Unknown result type (might be due to invalid IL or missing references)
			//IL_119a: Expected O, but got Unknown
			//IL_121b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1225: Expected O, but got Unknown
			//IL_128d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1297: Expected O, but got Unknown
			//IL_12c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_12d0: Expected O, but got Unknown
			//IL_12ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_1309: Expected O, but got Unknown
			//IL_1338: Unknown result type (might be due to invalid IL or missing references)
			//IL_1342: Expected O, but got Unknown
			//IL_1367: Unknown result type (might be due to invalid IL or missing references)
			//IL_1371: Expected O, but got Unknown
			//IL_1396: Unknown result type (might be due to invalid IL or missing references)
			//IL_13a0: Expected O, but got Unknown
			//IL_13c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_13cf: Expected O, but got Unknown
			//IL_13f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_13fc: Expected O, but got Unknown
			//IL_141f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1429: Expected O, but got Unknown
			//IL_144d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1457: Expected O, but got Unknown
			//IL_1485: Unknown result type (might be due to invalid IL or missing references)
			//IL_148f: Expected O, but got Unknown
			//IL_14b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_14bd: Expected O, but got Unknown
			//IL_152c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1536: Expected O, but got Unknown
			//IL_1565: Unknown result type (might be due to invalid IL or missing references)
			//IL_156f: Expected O, but got Unknown
			//IL_15ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_15c4: Expected O, but got Unknown
			//IL_15f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_15fd: Expected O, but got Unknown
			cfg.SaveOnConfigSet = false;
			boberKurwaSpawnRate = cfg.Bind<int>("Bober Kurwa", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			boberKurwaGenericVolume = cfg.Bind<float>("Bober Kurwa", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			miniNukeSpawnRate = cfg.Bind<int>("Mini Nuke", "Item Weighting", 12, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			miniNukeGenericVolume = cfg.Bind<float>("Mini Nuke", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			brodaSpawnRate = cfg.Bind<int>("Broda", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			brodaGenericVolume = cfg.Bind<float>("Broda", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			chrisGriffinSpawnRate = cfg.Bind<int>("Chris Griffin", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			chrisGriffinGenericVolume = cfg.Bind<float>("Chris Griffin", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			cidSpawnRate = cfg.Bind<int>("Cid", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			cidGenericVolume = cfg.Bind<float>("Cid", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			clydeSpawnRate = cfg.Bind<int>("Clyde", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			clydeGenericVolume = cfg.Bind<float>("Clyde", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			crawlySpawnRate = cfg.Bind<int>("Crawly The Wizard", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			crawlyGenericVolume = cfg.Bind<float>("Crawly The Wizard", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			dekuSpawnRate = cfg.Bind<int>("Deku", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			dekuGenericVolume = cfg.Bind<float>("Deku", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			fosgreathSpawnRate = cfg.Bind<int>("Fosgreath", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			fosgreathGenericVolume = cfg.Bind<float>("Fosgreath", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			friezaSpawnRate = cfg.Bind<int>("Frieza", "Item Weighting", 35, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			friezaGenericVolume = cfg.Bind<float>("Frieza", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			goldenReindogSpawnRate = cfg.Bind<int>("GoldenReindog", "Item Weighting", 7, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			goldenReindogGenericVolume = cfg.Bind<float>("GoldenReindog", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			hamsterSpawnRate = cfg.Bind<int>("Hamster", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			hamsterGenericVolume = cfg.Bind<float>("Hamster", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ironGiantSpawnRate = cfg.Bind<int>("Iron Giant", "Item Weighting", 12, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			ironGiantGenericVolume = cfg.Bind<float>("Iron Giant", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			lebronSpawnRate = cfg.Bind<int>("LeBron", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			lebronGenericVolume = cfg.Bind<float>("Lebron", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			lightningMcqueenSpawnRate = cfg.Bind<int>("Lightning McQueen", "Item Weighting", 12, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			lightningMcQueenGenericVolume = cfg.Bind<float>("Lightning McQueen", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			monkeyCubeSpawnRate = cfg.Bind<int>("Monkey Cube", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			monkeyCubeGenericVolume = cfg.Bind<float>("Monkey Cube", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			nerdSpawnRate = cfg.Bind<int>("Nerd", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			nerdGenericVolume = cfg.Bind<float>("Nerd", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			optimusPrimeSpawnRate = cfg.Bind<int>("Optimus Prime", "Item Weighting (Default 30)", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			optimusPrimeGenericVolume = cfg.Bind<float>("Optimus Prime", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ratSpawnRate = cfg.Bind<int>("Rat", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			ratGenericVolume = cfg.Bind<float>("Rat", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			reindogSpawnRate = cfg.Bind<int>("Reindog", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			reindogGenericVolume = cfg.Bind<float>("Reindog", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			saulBigmanSpawnRate = cfg.Bind<int>("Saul Bigman", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			saulBigmanGenericVolume = cfg.Bind<float>("Saul Bigman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			saulGoodmanSpawnRate = cfg.Bind<int>("Saul Goodman", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			saulGoodmanGenericVolume = cfg.Bind<float>("Saul Goodman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			sonicSpawnRate = cfg.Bind<int>("Sonic", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			sonicGenericVolume = cfg.Bind<float>("Sonic", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			supermanSpawnRate = cfg.Bind<int>("Superman", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			supermanGenericVolume = cfg.Bind<float>("Superman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			babySpawnRate = cfg.Bind<int>("Baby", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			babyGenericVolume = cfg.Bind<float>("Baby", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			raymanSpawnRate = cfg.Bind<int>("Rayman", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			raymanGenericVolume = cfg.Bind<float>("Rayman", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			shadowSpawnRate = cfg.Bind<int>("Shadow", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			shadowGenericVolume = cfg.Bind<float>("Shadow", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			remySpawnRate = cfg.Bind<int>("Remy", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			remyGenericVolume = cfg.Bind<float>("Remy", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			fanSpawnRate = cfg.Bind<int>("Fan", "Item Weighting", 25, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			fanGenericVolume = cfg.Bind<float>("Fan", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			knucklesSpawnRate = cfg.Bind<int>("Knuckles", "Item Weighting", 20, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			knucklesGenericVolume = cfg.Bind<float>("Knuckles", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			marioRarity = cfg.Bind<int>("Mario", "Spawn Weighting", 220, new ConfigDescription("How likely this enemy is to spawn over others", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 9999), Array.Empty<object>()));
			mushroomSpawnRate = cfg.Bind<int>("Mushroom", "Item Weighting", 0, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			mushroomGenericVolume = cfg.Bind<float>("Mushroom", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			holdingPenGenericVolume = cfg.Bind<float>("Holding Pen", "Generic Volume", 1f, new ConfigDescription("Controls the volume of any sound triggered when picked up, dropped, pocketed or played", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			crawlyVolume = cfg.Bind<float>("Crawly The Wizard", "Roaming Audio Volume", 0.28f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			sonicVolume = cfg.Bind<float>("Sonic", "Roaming Audio Volume", 0.5f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			dekuVolume = cfg.Bind<float>("Deku", "Roaming Audio Volume", 0.9f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			raymanVolume = cfg.Bind<float>("Rayman", "Roaming Audio Volume", 0.8f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			shadowVolume = cfg.Bind<float>("Shadow", "Roaming Audio Volume", 0.75f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			knucklesVolume = cfg.Bind<float>("Knuckles", "Roaming Audio Volume", 0.7f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			mushroomVolume = cfg.Bind<float>("Mushroom", "Roaming Audio Volume", 0.7f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			fanVolume = cfg.Bind<float>("Fan", "Volume of the fan", 1f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			remyVolume = cfg.Bind<float>("Remy", "Roaming Audio Volume", 0.7f, new ConfigDescription("Volume of the roaming audio, set to 0 to turn off", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			sonicSpeed = cfg.Bind<float>("Sonic", "Roaming Speed (Default 16.75)", 16.75f, "How fast should they move around");
			crawlySpeed = cfg.Bind<float>("Crawly The Wizard", "Roaming Speed (Default 2.1)", 2.1f, "How fast should they move around");
			dekuSpeed = cfg.Bind<float>("Deku", "Chase Speed (Default 12.5)", 12.5f, "How fast should deku chase the player");
			raymanSpeed = cfg.Bind<float>("Rayman", "Roaming Speed (Default 9)", 9f, "How fast should they move around");
			knucklesSpeed = cfg.Bind<float>("Knuckles", "Roaming Speed (Default 12.5)", 12.5f, "How fast should they move around");
			shadowSpeed = cfg.Bind<float>("Shadow", "Roaming Speed (Default 16.5)", 16.5f, "How fast should they move around");
			remySpeed = cfg.Bind<float>("Remy", "Roaming Speed (Default 0.9)", 0.9f, "How fast should they move around");
			mushroomSpeed = cfg.Bind<float>("Mushroom", "Roaming Speed", 5.5f, "How fast should they move around");
			dekuRoamChance = cfg.Bind<int>("Deku", "Chase chance (default 50)", 50, new ConfigDescription("Chance to chase the player on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			sonicRoamChance = cfg.Bind<int>("Sonic", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			crawlyRoamChance = cfg.Bind<int>("Crawly The Wizard", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			raymanRoamChance = cfg.Bind<int>("Rayman", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			knucklesRoamChance = cfg.Bind<int>("Knuckles", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			shadowRoamChance = cfg.Bind<int>("Shadow", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			remyRoamChance = cfg.Bind<int>("Remy", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			mushroomRoamChance = cfg.Bind<int>("Mushroom", "Roam chance (default 100)", 100, new ConfigDescription("Chance to start roaming on drop", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			crawlyHearableDist = cfg.Bind<float>("Crawly The Wizard", "Max Audio Distance (default 32)", 32f, "Max distance at which audio is still audible");
			sonicHearableDist = cfg.Bind<float>("Sonic", "Max Audio Distance (default 45f)", 42f, "Max distance at which audio is still audible");
			raymanHearableDist = cfg.Bind<float>("Rayman", "Max Audio Distance (default 40f)", 40f, "Max distance at which audio is still audible");
			dekuHearableDist = cfg.Bind<float>("Deku", "Max Audio Distance (default 50f)", 50f, "Max distance at which audio is still audible");
			shadowHearableDist = cfg.Bind<float>("Shadow", "Max Audio Distance (default 45)", 42f, "Max distance at which audio is still audible");
			remyHearableDist = cfg.Bind<float>("Remy", "Max Audio Distance", 32f, "Max distance at which audio is still audible");
			mushroomHearableDist = cfg.Bind<float>("Mushroom", "Max Audio Distance", 40f, "Max distance at which audio is still audible");
			knucklesHearableDist = cfg.Bind<float>("Knuckles", "Max Audio Distance (default 45)", 45f, "Max distance at which audio is still audible");
			maximumFosgreathModeEnabled = cfg.Bind<bool>("Fosgreath", "Enable Maximum Fosgreath Mode (default false)", false, "Should Maximum Fosgreath Mode Be Enabled?");
			dekuExplodeTargetPlayerName = cfg.Bind<string>("Deku", "Target Player Name (default NULL)", "NUll", "Deku has a small chance to explode when held by the player with the specified username");
			holdingPenCost = cfg.Bind<int>("Holding Pen", "Price of the Holding Pen (default 100)", 100, "Price of the Holding Pen when purchasing from the store in the terminal");
			crawlyMusicMode = cfg.Bind<int>("Crawly The Wizard", "Roaming Audio (default standard)", 0, "Which Audio should be played whilst roaming {0 = standard, 1 = full, 2 = lyrics}");
			knucklesMusicMode = cfg.Bind<int>("Knuckles", "Roaming Audio (default standard)", 0, "Which Audio should be played whilst roaming {0 = standard, 1 = All Knuckles}");
			fanBlowForceMin = cfg.Bind<float>("Fan", "Blow Force Minimum", 3f, "How much force should the fan exert at minimum (at max distance from fan)");
			fanBlowForceMax = cfg.Bind<float>("Fan", "Blow Force Maximum", 18f, "How much force should the fan exert at maximum (close to fan)");
			fanBlowDist = cfg.Bind<float>("Fan", "Blowing Distance", 22f, "How far does the fans blow reach");
			fanActivationMaxInterval = cfg.Bind<float>("Fan", "Max Activation Interval", 7.5f, "How long should the fan wait at max before checking if it should turn on");
			fanActivationChance = cfg.Bind<int>("Fan", "Activation Chance", 10, new ConfigDescription("Chance for the fan to turn on every interval", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			quicktimeEventsToggle = cfg.Bind<bool>("Quicktime Events", "Enable Quicktime Events?", true, "Should Quicktime Events be enabled for roaming scrap?");
			quicktimeEventsDropRate = cfg.Bind<float>("Quicktime Events", "Drop Rate", 0.55f, "Rate at which the progress bar decreases");
			quicktimeEventsIncreaseRate = cfg.Bind<float>("Quicktime Events", "Increase Rate", 0.1f, "Rate at which the progress bar increase per button tap as a percent (0.1 = 10% of the bar per tap)");
			quicktimeEventChance = cfg.Bind<int>("Quicktime Events", "Drop Chance", 50, new ConfigDescription("Chance of triggering the dropping quicktime event every quicktime interval", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			quicktimeEventIntervalMin = cfg.Bind<float>("Quicktime Events", "Minimum Interval", 5f, "Minimum time holding the item before the quicktime event could possibly trigger (randomised between min and max interval)");
			quicktimeEventIntervalMax = cfg.Bind<float>("Quicktime Events", "Maximum Interval", 25f, "Maximum time holding the item before the quicktime event could possibly trigger (randomised between min and max interval)");
			marioHealth = cfg.Bind<int>("Mario", "Health", 10, new ConfigDescription("How much health should mario have", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 9999), Array.Empty<object>()));
			marioSearchSpeed = cfg.Bind<float>("Mario", "Search Speed", 2.5f, new ConfigDescription("How fast should Mario move whilst searching?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 15f), Array.Empty<object>()));
			marioChaseSpeed = cfg.Bind<float>("Mario", "Chase Speed", 3.3f, new ConfigDescription("How fast should Mario move whilst chasing a player?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 20f), Array.Empty<object>()));
			marioChaseMusicVolume = cfg.Bind<float>("Mario", "Chase Music Volume", 0.8f, new ConfigDescription("How loud should the chase music be? (0 to turn it off)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			marioDamagePerHit = cfg.Bind<int>("Mario", "Mario Damage", 45, new ConfigDescription("How much damage should be dealt when hit by Mario's Punch?", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			marioMaxHearableDistSfx = cfg.Bind<int>("Mario", "Sound Effect Distance", 40, new ConfigDescription("How many units should mario's sound effects travel?", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			marioMaxHearableDistChaseMusic = cfg.Bind<int>("Mario", "Chase Music Distance", 30, new ConfigDescription("How many units should mario's chase music travel?", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			marioMaxCount = cfg.Bind<int>("Mario", "Max Count", 2, new ConfigDescription("Max number of Mario's that can be active each round", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 5), Array.Empty<object>()));
			marioPowerLevel = cfg.Bind<int>("Mario", "Power Level", 2, new ConfigDescription("How much should Mario contribute to the rounds max power level? (for reference, 1 is the power level of a hoarding bug, 3 is a thumper)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 5), Array.Empty<object>()));
			minNumOfMushroomsToSpawn = cfg.Bind<int>("Mario", "Min Number of Mushrooms to Spawn", 1, new ConfigDescription("How many mushrooms should Mario spawn on death at minimum?)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10), Array.Empty<object>()));
			maxNumOfMushroomsToSpawn = cfg.Bind<int>("Mario", "Max Number of Mushrooms to Spawn", 3, new ConfigDescription("How many mushrooms should Mario spawn on death at maximum?)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(minNumOfMushroomsToSpawn.Value, 10), Array.Empty<object>()));
			miniNukeExplodeChance = cfg.Bind<int>("Mini Nuke", "Explosion Chance (0-100)", 2, new ConfigDescription("Chance for the explosion procedure to be triggered", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			timeBetweenBombActivationChecksMax = cfg.Bind<float>("Mini Nuke", "Activation Check Timer", 10f, "Max time for the bomb to check if it should explode (random between 0 and this value)");
			nukeDetonationTime = cfg.Bind<float>("Mini Nuke", "How Long It Takes The Nuke To Explode", 6.5f, "Once the bomb is activated, how long it will take before it explodes");
			miniNukeBeepingVolume = cfg.Bind<float>("Mini Nuke", "Beeping Volume", 1f, new ConfigDescription("How loud should this audio be?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			miniNukeExplosionVolume = cfg.Bind<float>("Mini Nuke", "Explosion Volume", 1f, new ConfigDescription("How loud should this audio be?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			randomiseSize = cfg.Bind<bool>("Randomize Size", "Enable Size Randomisation?", false, "Randomizes item sizes and scales their weight and value accordingly");
			minRandomisedSize = cfg.Bind<float>("Randomize Size", "Minimum Randomised Size Modifier", 0.25f, new ConfigDescription("Minimum value the size can randomise to", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			maxRandomisedSize = cfg.Bind<float>("Randomize Size", "Maximum Randomised Size Modifier", 3f, new ConfigDescription("Maximum value the size can randomise to", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			ClearOrphanedEntries(cfg);
			cfg.Save();
			cfg.SaveOnConfigSet = true;
		}

		private static void ClearOrphanedEntries(ConfigFile cfg)
		{
			PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries");
			Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)propertyInfo.GetValue(cfg);
			dictionary.Clear();
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "ReindogFan1372.ReindogDLL";

		public const string PLUGIN_NAME = "ReindogDLL";

		public const string PLUGIN_VERSION = "1.1.2";
	}
}
namespace ReindogDLL.Patches
{
	[HarmonyPatch(typeof(GrabbableObject))]
	public class ConfigSetter
	{
		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		private static bool SetConfigs2(GrabbableObject __instance)
		{
			if (ReindogDLL.ReindogAndFriendsModConfig.randomiseSize.Value)
			{
				RandomiseSize(__instance);
			}
			return true;
		}

		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void SetConfigs(GrabbableObject __instance)
		{
			ConfigSetterUtilities.SetAudioSourceVolumes(__instance);
		}

		private static void RandomiseSize(GrabbableObject objectToSet)
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			if (((NetworkBehaviour)objectToSet).IsServer || ((NetworkBehaviour)objectToSet).IsHost)
			{
				float num = Random.Range(ReindogDLL.ReindogAndFriendsModConfig.minRandomisedSize.Value, ReindogDLL.ReindogAndFriendsModConfig.maxRandomisedSize.Value);
				Item itemProperties = Object.Instantiate<Item>(objectToSet.itemProperties);
				objectToSet.itemProperties = itemProperties;
				Transform transform = ((Component)objectToSet).transform;
				transform.localScale *= num;
				objectToSet.SetScrapValue((int)((float)objectToSet.scrapValue * num));
				objectToSet.itemProperties.weight = (objectToSet.itemProperties.weight - 1f) * num + 1f;
				RpcCaller.SyncSizeClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)objectToSet), num);
			}
		}
	}
	[StaticNetcode]
	internal static class RpcCaller
	{
		[ServerRpc]
		public static void SyncSizeServerRpc(NetworkBehaviourReference objectToSet, float modifierValue)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			SyncSizeClientRpc(objectToSet, modifierValue);
		}

		[ClientRpc]
		public static void SyncSizeClientRpc(NetworkBehaviourReference objectToSet, float modifierValue)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			GrabbableObject val = (GrabbableObject)NetworkBehaviourReference.op_Implicit(objectToSet);
			if (!((NetworkBehaviour)val).IsServer && !((NetworkBehaviour)val).IsHost)
			{
				Item itemProperties = Object.Instantiate<Item>(val.itemProperties);
				val.itemProperties = itemProperties;
				Transform transform = ((Component)val).transform;
				transform.localScale *= modifierValue;
				val.SetScrapValue((int)((float)val.scrapValue * modifierValue));
				val.itemProperties.weight = (val.itemProperties.weight - 1f) * modifierValue + 1f;
			}
		}
	}
	internal static class ConfigSetterUtilities
	{
		internal static void SetAudioSourceVolumes(GrabbableObject objectToSet)
		{
			float genericVolumeConfig = ReindogDLL.GetGenericVolumeConfig(objectToSet.itemProperties.itemName);
			if (genericVolumeConfig != -1f)
			{
				((Component)objectToSet).GetComponent<AudioSource>().volume = genericVolumeConfig;
				Transform val = ((Component)objectToSet).transform.Find("FarAudio");
				AudioSource val2 = default(AudioSource);
				if (!((Object)(object)val == (Object)null) && ((Component)val).TryGetComponent<AudioSource>(ref val2))
				{
					val2.volume = genericVolumeConfig;
				}
			}
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	public class PlayerItemAudioFixer
	{
		private static float itemAudioDefaultVolume = 0.63f;

		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		private static void SetDefaultVolume(PlayerControllerB __instance)
		{
			itemAudioDefaultVolume = __instance.itemAudio.volume;
		}

		[HarmonyPatch("BeginGrabObject")]
		[HarmonyPostfix]
		private static void GrabObjectPostfix(PlayerControllerB __instance)
		{
			if ((Object)(object)__instance.currentlyHeldObjectServer == (Object)null)
			{
				__instance.itemAudio.volume = itemAudioDefaultVolume;
				return;
			}
			float genericVolumeConfig = ReindogDLL.GetGenericVolumeConfig(__instance.currentlyHeldObjectServer.itemProperties.itemName);
			if (genericVolumeConfig == -1f)
			{
				__instance.itemAudio.volume = itemAudioDefaultVolume;
			}
			else
			{
				__instance.itemAudio.volume = itemAudioDefaultVolume * genericVolumeConfig;
			}
		}

		[HarmonyPatch("GrabObjectClientRpc")]
		[HarmonyPrefix]
		private static bool GrabObjectClientRpcPrefix(bool grabValidated, ref NetworkObjectReference grabbedObject, PlayerControllerB __instance)
		{
			NetworkObject val = default(NetworkObject);
			if (!((NetworkObjectReference)(ref grabbedObject)).TryGet(ref val, (NetworkManager)null))
			{
				__instance.itemAudio.volume = itemAudioDefaultVolume;
				return true;
			}
			float genericVolumeConfig = ReindogDLL.GetGenericVolumeConfig(((Component)val).gameObject.GetComponentInChildren<GrabbableObject>().itemProperties.itemName);
			if (genericVolumeConfig == -1f)
			{
				__instance.itemAudio.volume = itemAudioDefaultVolume;
				return true;
			}
			__instance.itemAudio.volume = itemAudioDefaultVolume * genericVolumeConfig;
			return true;
		}
	}
	public class ExplosiveItem : GrabbableObject
	{
		private enum BombState
		{
			Inate,
			PreparingToExplode,
			Sizzling,
			Exploding
		}

		private float timer = 0f;

		[SerializeField]
		private AudioSource bombAudioSource;

		[SerializeField]
		private AudioClip explosionClip;

		[SerializeField]
		private AudioClip sizzleClip;

		private BombState bombState;

		private float timeBetweenActivationChecks;

		private float bombActivationCheckTimer = 0f;

		private float playerHoldingObjectHealthLastFrame = 100f;

		private Random noiseRandomSeed;

		[SerializeField]
		private float noiseRange = 80f;

		private float minLoudness = 0.95f;

		private float maxLoudness = 1f;

		private void Awake()
		{
			bombState = BombState.Inate;
			timeBetweenActivationChecks = Random.Range(0f, ReindogDLL.ReindogAndFriendsModConfig.timeBetweenBombActivationChecksMax.Value);
		}

		public override void Start()
		{
			((GrabbableObject)this).Start();
			noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85);
		}

		public override void Update()
		{
			Explosive();
			((GrabbableObject)this).Update();
		}

		private void Explosive()
		{
			if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || !StartOfRound.Instance.shipHasLanded)
			{
				return;
			}
			if ((base.isHeld || base.isPocketed) && bombState == BombState.Inate)
			{
				bombActivationCheckTimer += Time.deltaTime;
				if (bombActivationCheckTimer >= timeBetweenActivationChecks)
				{
					bombActivationCheckTimer = 0f;
					timeBetweenActivationChecks = Random.Range(0f, ReindogDLL.ReindogAndFriendsModConfig.timeBetweenBombActivationChecksMax.Value);
					if (Random.Range(0, 101) <= ReindogDLL.ReindogAndFriendsModConfig.miniNukeExplodeChance.Value)
					{
						bombState = BombState.PreparingToExplode;
					}
				}
				if ((float)base.playerHeldBy.health < playerHoldingObjectHealthLastFrame)
				{
					bombState = BombState.PreparingToExplode;
				}
				playerHoldingObjectHealthLastFrame = base.playerHeldBy.health;
			}
			if (bombState == BombState.PreparingToExplode)
			{
				timer += Time.deltaTime;
				if (timer > ReindogDLL.ReindogAndFriendsModConfig.nukeDetonationTime.Value - sizzleClip.length)
				{
					bombState = BombState.Sizzling;
					PlaySizzleSoundClientRpc();
				}
			}
			if (bombState == BombState.Sizzling)
			{
				timer += Time.deltaTime;
				if (timer > ReindogDLL.ReindogAndFriendsModConfig.nukeDetonationTime.Value)
				{
					bombActivationCheckTimer = 0f;
					timer = 0f;
					bombState = BombState.Inate;
					ExplodeBombClientRpc();
				}
			}
		}

		[ClientRpc]
		private void PlaySizzleSoundClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(148881451u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 148881451u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				bombAudioSource.PlayOneShot(sizzleClip, ReindogDLL.ReindogAndFriendsModConfig.miniNukeBeepingVolume.Value);
				float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f;
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
				if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null)
				{
					base.playerHeldBy.timeSinceMakingLoudNoise = 0f;
				}
			}
		}

		[ClientRpc]
		private void ExplodeBombClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: 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_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0210: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(715212118u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 715212118u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				bombAudioSource.PlayOneShot(explosionClip, ReindogDLL.ReindogAndFriendsModConfig.miniNukeExplosionVolume.Value);
				float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f;
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
				if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null)
				{
					base.playerHeldBy.timeSinceMakingLoudNoise = 0f;
				}
				Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up, true, 10f, 12.5f, 50, 0f, (GameObject)null, false);
				Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(5.5f, 0f, 0f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false);
				Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(-5.5f, 0f, 0f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false);
				Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(0f, 0f, 5.5f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false);
				Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up + new Vector3(0f, 0f, -5.5f), true, 10f, 12.5f, 50, 0f, (GameObject)null, false);
				((GrabbableObject)this).DestroyObjectInHand(base.playerHeldBy);
			}
		}

		protected override void __initializeVariables()
		{
			((GrabbableObject)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_ExplosiveItem()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(148881451u, new RpcReceiveHandler(__rpc_handler_148881451));
			NetworkManager.__rpc_func_table.Add(715212118u, new RpcReceiveHandler(__rpc_handler_715212118));
		}

		private static void __rpc_handler_148881451(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((ExplosiveItem)(object)target).PlaySizzleSoundClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_715212118(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((ExplosiveItem)(object)target).ExplodeBombClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "ExplosiveItem";
		}
	}
	public class Frieza : GrabbableObject
	{
		[SerializeField]
		private AudioSource audio;

		[SerializeField]
		private AudioClip brolyLook;

		[SerializeField]
		private AudioClip vineBoom;

		[SerializeField]
		private uint chance = 2u;

		[SerializeField]
		private float timeBetweenActivationChecksMax = 1f;

		private float timeBetweenActivationChecks;

		private float checkTimer = 0f;

		[SerializeField]
		private Sprite[] sprites;

		[SerializeField]
		private GameObject uiCanvasPrefab;

		private GameObject uiCanvas;

		private Image imageOnCanvas;

		private bool isOnCooldown = false;

		private float cooldownTime = 5f;

		private PlayerControllerB playerWhoTriggeredFrieza;

		private Random noiseRandomSeed;

		[SerializeField]
		private float noiseRange = 70f;

		private float minLoudness = 0.99f;

		private float maxLoudness = 1f;

		private void Awake()
		{
			timeBetweenActivationChecks = Random.Range(0f, timeBetweenActivationChecksMax);
		}

		public override void Start()
		{
			((GrabbableObject)this).Start();
			noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85);
		}

		public override void OnNetworkSpawn()
		{
			((NetworkBehaviour)this).OnNetworkSpawn();
			uiCanvas = Object.Instantiate<GameObject>(uiCanvasPrefab);
			uiCanvas.SetActive(false);
			imageOnCanvas = uiCanvas.GetComponentInChildren<Image>();
		}

		public override void Update()
		{
			DoFriezaChecks();
			((GrabbableObject)this).Update();
		}

		private void DoFriezaChecks()
		{
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || (!base.isHeld && !base.isPocketed) || isOnCooldown)
			{
				return;
			}
			checkTimer += Time.deltaTime;
			if (checkTimer >= timeBetweenActivationChecks)
			{
				checkTimer = 0f;
				timeBetweenActivationChecks = Random.Range(0f, timeBetweenActivationChecksMax);
				if (Random.Range(0, 101) <= chance)
				{
					isOnCooldown = true;
					((MonoBehaviour)this).Invoke("ResetCooldown", cooldownTime);
					ActivateFriezaAudioBrolyLookClientRpc();
					ClientRpcParams val = default(ClientRpcParams);
					val.Send = new ClientRpcSendParams
					{
						TargetClientIds = new ulong[1] { base.playerHeldBy.actualClientId }
					};
					ClientRpcParams clientRpcParams = val;
					DisplayImageClientRpc(clientRpcParams);
				}
			}
		}

		[ClientRpc]
		private void ActivateFriezaAudioBrolyLookClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3762915186u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3762915186u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				audio.PlayOneShot(brolyLook);
				float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f;
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
				if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null)
				{
					base.playerHeldBy.timeSinceMakingLoudNoise = 0f;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void ActivateFriezaAudioVineBoomServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2223191387u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2223191387u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ActivateFriezaAudioVineBoomClientRpc();
				}
			}
		}

		[ClientRpc]
		private void ActivateFriezaAudioVineBoomClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(500400452u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 500400452u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				audio.PlayOneShot(vineBoom);
				float num = (float)noiseRandomSeed.Next((int)(minLoudness * 100f), (int)(maxLoudness * 100f)) / 100f;
				RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, noiseRange, num, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0);
				if (minLoudness >= 0.5f && (Object)(object)base.playerHeldBy != (Object)null)
				{
					base.playerHeldBy.timeSinceMakingLoudNoise = 0f;
				}
			}
		}

		[ClientRpc]
		private void DisplayImageClientRpc(ClientRpcParams clientRpcParams = default(ClientRpcParams))
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1545275795u, clientRpcParams, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val, 1545275795u, clientRpcParams, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StartCoroutine(FriezaActivated());
				}
			}
		}

		private IEnumerator FriezaActivated()
		{
			playerWhoTriggeredFrieza = base.playerHeldBy;
			yield return (object)new WaitForSeconds(brolyLook.length - 0.1f);
			imageOnCanvas.sprite = sprites[Random.Range(0, sprites.Length)];
			uiCanvas.SetActive(true);
			Color imageColor = ((Graphic)imageOnCanvas).color;
			imageColor.a = 0f;
			float fadeTime = 0.15f;
			float timePassed2 = 0f;
			ActivateFriezaAudioVineBoomServerRpc();
			playerWhoTriggeredFrieza.JumpToFearLevel(0.9f, true);
			while (imageColor.a < 0.95f)
			{
				timePassed2 += Time.deltaTime;
				imageColor.a = Mathf.Lerp(imageColor.a, 1f, timePassed2 / fadeTime);
				((Graphic)imageOnCanvas).color = imageColor;
				yield return (object)new WaitForSeconds(Time.deltaTime);
			}
			timePassed2 = 0f;
			imageColor.a = 1f;
			((Graphic)imageOnCanvas).color = imageColor;
			yield return (object)new WaitForSeconds(0.3f);
			while ((double)imageColor.a > 0.05)
			{
				timePassed2 += Time.deltaTime;
				imageColor.a = Mathf.Lerp(imageColor.a, 0f, timePassed2 / fadeTime);
				((Graphic)imageOnCanvas).color = imageColor;
				yield return (object)new WaitForSeconds(Time.deltaTime);
			}
			imageColor.a = 0f;
			((Graphic)imageOnCanvas).color = imageColor;
			uiCanvas.SetActive(false);
		}

		private void ResetCooldown()
		{
			isOnCooldown = false;
		}

		protected override void __initializeVariables()
		{
			((GrabbableObject)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_Frieza()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3762915186u, new RpcReceiveHandler(__rpc_handler_3762915186));
			NetworkManager.__rpc_func_table.Add(2223191387u, new RpcReceiveHandler(__rpc_handler_2223191387));
			NetworkManager.__rpc_func_table.Add(500400452u, new RpcReceiveHandler(__rpc_handler_500400452));
			NetworkManager.__rpc_func_table.Add(1545275795u, new RpcReceiveHandler(__rpc_handler_1545275795));
		}

		private static void __rpc_handler_3762915186(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Frieza)(object)target).ActivateFriezaAudioBrolyLookClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2223191387(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((Frieza)(object)target).ActivateFriezaAudioVineBoomServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_500400452(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((Frieza)(object)target).ActivateFriezaAudioVineBoomClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1545275795(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references