Decompiled source of ReindogAndFriends v2.3.8

ReindogFan1372.ReindogDLL.dll

Decompiled 4 months 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.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalLevelLoader;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using ReindogDLL.Patches;
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("LethalLib")]
[assembly: IgnoresAccessChecksTo("MoreSuits")]
[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.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class ReindogDLL : BaseUnityPlugin
	{
		public static class MoreSuitsCompat
		{
			public static bool Enabled => Chainloader.PluginInfos.ContainsKey("x753.More_Suits");
		}

		internal static AssetBundle MyCustomAssets;

		internal static Texture2D fosgreathTexture;

		internal static AudioClip fosgreathClip;

		public static bool modLoaded;

		public static ReindogDLL Instance { get; private set; }

		internal static ManualLogSource Logger { get; private set; }

		internal static Harmony? Harmony { get; set; }

		internal static MyModConfig ReindogAndFriendsModConfig { get; private set; }

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			ReindogAndFriendsModConfig = new MyModConfig(((BaseUnityPlugin)this).Config);
			AssetBundleLoader.AddOnExtendedModLoadedListener((Action<ExtendedMod>)OnExtendedModRegistered, "ReindogFan1372", "ReindogAndFriends");
			AssetBundleLoader.AddOnLethalBundleLoadedListener((Action<AssetBundle>)OnAssetBundleLoaded, "reindogandfriends.lethalbundle");
			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_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Expected O, but got Unknown
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Expected O, but got Unknown
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Expected O, but got Unknown
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Expected O, but got Unknown
			if ((Object)(object)myMod == (Object)null || modLoaded)
			{
				return;
			}
			modLoaded = true;
			foreach (ExtendedItem extendedItem in myMod.ExtendedItems)
			{
				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);
				if (configValueForItem > 0)
				{
					extendedItem.LevelMatchingProperties.levelTags.Add(item2);
					extendedItem.LevelMatchingProperties.levelTags.Add(item);
				}
			}
			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);
					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;
					}
				}
			}
		}

		public static void OnAssetBundleLoaded(AssetBundle myAssetBundle)
		{
			int value = ReindogAndFriendsModConfig.holdingPenCost.Value;
			Item val = myAssetBundle.LoadAsset<Item>("assets/lethalcompany/mods/reindogandfriends/items/holdingpen/data/holdingpenitem.asset");
			NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
			TerminalNode val2 = myAssetBundle.LoadAsset<TerminalNode>("assets/lethalcompany/mods/reindogandfriends/items/holdingpen/data/terminal/shoppendata.asset");
			Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, value);
			ReindogTemple reindogTemple = myAssetBundle.LoadAsset<ReindogTemple>("assets/lethalcompany/mods/reindogandfriends/items/goldenreindog/goldentemple.prefab");
			NetworkPrefabs.RegisterNetworkPrefab(myAssetBundle.LoadAsset<GameObject>("assets/lethalcompany/mods/reindogandfriends/items/goldenreindog/goldentemple.prefab"));
			CheeseLovingMouse cheeseLovingMouse = myAssetBundle.LoadAsset<CheeseLovingMouse>("assets/lethalcompany/mods/reindogandfriends/items/cheese/mouse/mouseprefab.prefab");
			NetworkPrefabs.RegisterNetworkPrefab(myAssetBundle.LoadAsset<GameObject>("assets/lethalcompany/mods/reindogandfriends/items/cheese/mouse/mouseprefab.prefab"));
			if (ReindogAndFriendsModConfig.maximumFosgreathModeEnabled.Value)
			{
				fosgreathTexture = myAssetBundle.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;
			case "Herlock Sholmes":
				return ReindogAndFriendsModConfig.sholmesSpawnRate.Value;
			case "Barok Van Zieks":
				return ReindogAndFriendsModConfig.barokSpawnRate.Value;
			case "Cheese":
				return ReindogAndFriendsModConfig.cheeseSpawnRate.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, 
				"Herlock Sholmes" => ReindogAndFriendsModConfig.sholmesGenericVolume.Value, 
				"Barok Van Zieks" => ReindogAndFriendsModConfig.barokGenericVolume.Value, 
				"Cheese" => ReindogAndFriendsModConfig.cheeseGenericVolume.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> barokSpawnRate;

		public readonly ConfigEntry<float> barokGenericVolume;

		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> cheeseSpawnRate;

		public readonly ConfigEntry<float> cheeseGenericVolume;

		public readonly ConfigEntry<float> cheeseMouseSpawnDelayMin;

		public readonly ConfigEntry<float> cheeseMouseSpawnDelayMax;

		public readonly ConfigEntry<int> cheeseMaxNumOfMiceGroups;

		public readonly ConfigEntry<int> cheeseMouseSpawnChance;

		public readonly ConfigEntry<float> cheeseMouseSqueakVolume;

		public readonly ConfigEntry<float> cheeseMouseAgentSpeed;

		public readonly ConfigEntry<float> cheeseMouseSqueakDelayMin;

		public readonly ConfigEntry<float> cheeseMouseSqueakDelayMax;

		public readonly ConfigEntry<bool> cheeseMouseSqueakWhilstIdle;

		public readonly ConfigEntry<bool> cheeseOnlySpawnMiceWhilstHeld;

		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> sholmesSpawnRate;

		public readonly ConfigEntry<float> sholmesGenericVolume;

		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 readonly ConfigEntry<int> reindogTriggerChance;

		public readonly ConfigEntry<float> reindogAmbientAudioVol;

		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_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Expected O, but got Unknown
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Expected O, but got Unknown
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Expected O, but got Unknown
			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Expected O, but got Unknown
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Expected O, but got Unknown
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Expected O, but got Unknown
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Expected O, but got Unknown
			//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Expected O, but got Unknown
			//IL_0447: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Expected O, but got Unknown
			//IL_049d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Expected O, but got Unknown
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fd: Expected O, but got Unknown
			//IL_0549: Unknown result type (might be due to invalid IL or missing references)
			//IL_0553: Expected O, but got Unknown
			//IL_059f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a9: Expected O, but got Unknown
			//IL_05f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ff: Expected O, but got Unknown
			//IL_064b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0655: Expected O, but got Unknown
			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06aa: Expected O, but got Unknown
			//IL_06f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0700: Expected O, but got Unknown
			//IL_074c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0756: Expected O, but got Unknown
			//IL_07a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ac: Expected O, but got Unknown
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0802: Expected O, but got Unknown
			//IL_084e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0858: Expected O, but got Unknown
			//IL_08a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ae: Expected O, but got Unknown
			//IL_08fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0904: Expected O, but got Unknown
			//IL_0950: Unknown result type (might be due to invalid IL or missing references)
			//IL_095a: Expected O, but got Unknown
			//IL_09a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b0: Expected O, but got Unknown
			//IL_09d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09df: Expected O, but got Unknown
			//IL_0a0e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a18: Expected O, but got Unknown
			//IL_0a64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6e: Expected O, but got Unknown
			//IL_0aba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac4: 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_0b66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b70: Expected O, but got Unknown
			//IL_0bbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc6: Expected O, but got Unknown
			//IL_0c12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c1c: Expected O, but got Unknown
			//IL_0c68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c72: Expected O, but got Unknown
			//IL_0cbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc8: Expected O, but got Unknown
			//IL_0d14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1e: Expected O, but got Unknown
			//IL_0d6a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d74: Expected O, but got Unknown
			//IL_0d9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da9: Expected O, but got Unknown
			//IL_0df4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dfe: Expected O, but got Unknown
			//IL_0e2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e37: Expected O, but got Unknown
			//IL_0e66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e70: Expected O, but got Unknown
			//IL_0e9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea9: Expected O, but got Unknown
			//IL_0ed8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee2: Expected O, but got Unknown
			//IL_0f11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1b: Expected O, but got Unknown
			//IL_0f4a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f54: Expected O, but got Unknown
			//IL_0f83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f8d: Expected O, but got Unknown
			//IL_0fbc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc6: Expected O, but got Unknown
			//IL_0ff5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fff: Expected O, but got Unknown
			//IL_102e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1038: Expected O, but got Unknown
			//IL_115d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1167: Expected O, but got Unknown
			//IL_118c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1196: Expected O, but got Unknown
			//IL_11bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_11c5: Expected O, but got Unknown
			//IL_11ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f4: Expected O, but got Unknown
			//IL_1219: Unknown result type (might be due to invalid IL or missing references)
			//IL_1223: Expected O, but got Unknown
			//IL_1248: Unknown result type (might be due to invalid IL or missing references)
			//IL_1252: Expected O, but got Unknown
			//IL_1277: Unknown result type (might be due to invalid IL or missing references)
			//IL_1281: Expected O, but got Unknown
			//IL_12a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_12b0: Expected O, but got Unknown
			//IL_14e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_14f0: Expected O, but got Unknown
			//IL_1571: Unknown result type (might be due to invalid IL or missing references)
			//IL_157b: Expected O, but got Unknown
			//IL_15e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_15ed: Expected O, but got Unknown
			//IL_161c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1626: Expected O, but got Unknown
			//IL_1655: Unknown result type (might be due to invalid IL or missing references)
			//IL_165f: Expected O, but got Unknown
			//IL_168e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1698: Expected O, but got Unknown
			//IL_16bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_16c7: Expected O, but got Unknown
			//IL_16ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_16f6: Expected O, but got Unknown
			//IL_171b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1725: Expected O, but got Unknown
			//IL_1748: Unknown result type (might be due to invalid IL or missing references)
			//IL_1752: Expected O, but got Unknown
			//IL_1775: Unknown result type (might be due to invalid IL or missing references)
			//IL_177f: Expected O, but got Unknown
			//IL_17a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_17ad: Expected O, but got Unknown
			//IL_17db: Unknown result type (might be due to invalid IL or missing references)
			//IL_17e5: Expected O, but got Unknown
			//IL_1809: Unknown result type (might be due to invalid IL or missing references)
			//IL_1813: Expected O, but got Unknown
			//IL_1882: Unknown result type (might be due to invalid IL or missing references)
			//IL_188c: Expected O, but got Unknown
			//IL_18bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_18c5: Expected O, but got Unknown
			//IL_1910: Unknown result type (might be due to invalid IL or missing references)
			//IL_191a: Expected O, but got Unknown
			//IL_1949: Unknown result type (might be due to invalid IL or missing references)
			//IL_1953: 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>()));
			barokSpawnRate = cfg.Bind<int>("Barok Van Zieks", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			barokGenericVolume = cfg.Bind<float>("Barok Van Zieks", "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>()));
			sholmesSpawnRate = cfg.Bind<int>("Herlock Sholmes", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			sholmesGenericVolume = cfg.Bind<float>("Herlock Sholmes", "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>()));
			cheeseSpawnRate = cfg.Bind<int>("Cheese", "Item Weighting", 30, "Rarity of the item, 30-40 is roughly normal vanilla weighting for standard scrap");
			cheeseGenericVolume = cfg.Bind<float>("Cheese", "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>()));
			cheeseMouseSpawnChance = cfg.Bind<int>("Cheese", "Mouse Spawn Chance", 15, new ConfigDescription("Percent chance for a mouse to spawn", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			cheeseMouseSpawnDelayMin = cfg.Bind<float>("Cheese", "Mouse Spawn Delay Min", 5f, new ConfigDescription("Minimum Delay Before Another Mouse Can Spawn (in seconds)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 300f), Array.Empty<object>()));
			cheeseMouseSpawnDelayMax = cfg.Bind<float>("Cheese", "Mouse Spawn Delay Max", 5f, new ConfigDescription("Maximum Delay Before Another Mouse Can Spawn (in seconds)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 300f), Array.Empty<object>()));
			cheeseMaxNumOfMiceGroups = cfg.Bind<int>("Cheese", "Max Number of Mice Groups Per Cheese", 10, new ConfigDescription("Maximum Number of Mice Groups That Can Spawn Per Cheese (the higher the value, the more intensive it will be)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			cheeseMouseSqueakVolume = cfg.Bind<float>("Cheese", "Mouse Squeak Volume", 1f, new ConfigDescription("Mouse Squeak Volume", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			cheeseMouseSqueakDelayMin = cfg.Bind<float>("Cheese", "Mouse Squeak Delay Min", 3f, new ConfigDescription("Minimum Delay Before The Mouse Can Squeak Again", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 300f), Array.Empty<object>()));
			cheeseMouseSqueakDelayMax = cfg.Bind<float>("Cheese", "Mouse Squeak Delay Max", 9f, new ConfigDescription("Maximum Delay Before The Mouse Can Squeak Again", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 300f), Array.Empty<object>()));
			cheeseMouseAgentSpeed = cfg.Bind<float>("Cheese", "Mouse Speed", 7f, new ConfigDescription("How Fast The Mice Move", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 30f), Array.Empty<object>()));
			cheeseMouseSqueakWhilstIdle = cfg.Bind<bool>("Cheese", "Squeak Whilst Idle?", true, "Should the mice squeak whilst they are idle as well as whilst they are chasing?");
			cheeseOnlySpawnMiceWhilstHeld = cfg.Bind<bool>("Cheese", "Only Spawn Mice Whilst Held?", false, "Should the mice only spawn if the cheese is currently being held or pocketed by a player?");
			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", 0, "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>()));
			reindogTriggerChance = cfg.Bind<int>("Reindog", "Activation Chance", 10, new ConfigDescription("Chance to trigger Reindogs teleportation", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			reindogAmbientAudioVol = cfg.Bind<float>("Reindog", "Realm Audio", 1f, new ConfigDescription("Controls the volume of the audio that plays in Reindog's Realm", (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
{
	public class CheeseItem : GrabbableObject
	{
		public GameObject mousePrefab;

		private int mouseSpawnChance = 15;

		private float mouseSpawnDelayMin = 5f;

		private float mouseSpawnDelayMax = 10f;

		private float mouseSpawnDelay = 100f;

		private bool isOnCooldown = false;

		private int maxNumOfMice = 20;

		private int numOfMiceSpawned = 0;

		[HideInInspector]
		public float spawnDistFromCheese = 15f;

		private void Awake()
		{
			mouseSpawnChance = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSpawnChance.Value;
			mouseSpawnDelayMin = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSpawnDelayMin.Value;
			mouseSpawnDelayMax = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSpawnDelayMax.Value;
			maxNumOfMice = ReindogDLL.ReindogAndFriendsModConfig.cheeseMaxNumOfMiceGroups.Value;
		}

		public override void LateUpdate()
		{
			((GrabbableObject)this).LateUpdate();
			if ((!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost) || !StartOfRound.Instance.shipHasLanded || !StartOfRound.Instance.currentLevel.planetHasTime || isOnCooldown)
			{
				return;
			}
			if (ReindogDLL.ReindogAndFriendsModConfig.cheeseOnlySpawnMiceWhilstHeld.Value)
			{
				if (base.isHeld || base.isPocketed)
				{
					CheckToSpawnMouseServerRpc();
				}
			}
			else
			{
				CheckToSpawnMouseServerRpc();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void CheckToSpawnMouseServerRpc()
		{
			//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_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(777328361u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 777328361u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				isOnCooldown = true;
				mouseSpawnDelay = Random.Range(mouseSpawnDelayMin, mouseSpawnDelayMax);
				((MonoBehaviour)this).Invoke("ResetMouseSpawnCooldown", mouseSpawnDelay);
				if (Random.Range(0, 100) <= mouseSpawnChance && numOfMiceSpawned < maxNumOfMice)
				{
					NavMeshHit val3 = default(NavMeshHit);
					Vector3 val4 = ((!NavMesh.SamplePosition(((Component)this).transform.position + Random.insideUnitSphere * spawnDistFromCheese, ref val3, spawnDistFromCheese / 2f, mousePrefab.GetComponent<NavMeshAgent>().areaMask)) ? base.targetFloorPosition : ((NavMeshHit)(ref val3)).position);
					GameObject val5 = Object.Instantiate<GameObject>(mousePrefab, val4, Quaternion.identity);
					val5.GetComponent<NetworkObject>().Spawn(false);
					val5.GetComponent<CheeseLovingMouse>().SetMouseAgentTarget(((Component)this).transform);
					numOfMiceSpawned++;
				}
			}
		}

		private void ResetMouseSpawnCooldown()
		{
			isOnCooldown = false;
		}

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

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_CheeseItem()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(777328361u, new RpcReceiveHandler(__rpc_handler_777328361));
		}

		private static void __rpc_handler_777328361(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;
				((CheeseItem)(object)target).CheckToSpawnMouseServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "CheeseItem";
		}
	}
	internal class CheeseLovingMouse : NetworkBehaviour
	{
		private enum CheeseState
		{
			Chasing,
			Idle
		}

		public AudioClip[] squeakNoises;

		public AudioSource audioSource;

		private RaycastHit doorHit;

		private NavMeshHit navmeshHit;

		private NavMeshAgent agent;

		private bool navMeshAvailable;

		private Animator[] mouseAnimators;

		private Transform targetCheese;

		private Vector3 targetPos = Vector3.zero;

		private float minSqueakDelay = 3f;

		private float maxSqueakDelay = 9f;

		private float squeakDelay = 1f;

		private bool onSqueakCooldown = false;

		private bool checkToDestroyCalled = false;

		private CheeseState currentCheeseState = CheeseState.Idle;

		private CheeseState lastCheeseState = CheeseState.Idle;

		[SerializeField]
		private LayerMask interactablesLayer;

		private CheeseItem _cheeseScript;

		private float distFromCheeseWhilstHeld = 2f;

		private float distFromCheeseWhilstGrounded = 1f;

		private float aiUpdateInterval = 0.08f;

		private float aiUpdateTimer = 0f;

		private Color32[] mouseColors = (Color32[])(object)new Color32[5]
		{
			new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue),
			new Color32((byte)87, (byte)78, (byte)72, byte.MaxValue),
			new Color32((byte)128, (byte)77, (byte)44, byte.MaxValue),
			new Color32((byte)212, (byte)193, (byte)181, byte.MaxValue),
			new Color32((byte)212, (byte)212, (byte)212, byte.MaxValue)
		};

		private Random noiseRandomSeed;

		[SerializeField]
		private float noiseRange = 35f;

		private float minLoudness = 0.6f;

		private float maxLoudness = 1f;

		private void Awake()
		{
			agent = ((Component)this).GetComponent<NavMeshAgent>();
			noiseRandomSeed = new Random(StartOfRound.Instance.randomMapSeed + 85);
			distFromCheeseWhilstHeld = Random.Range(0.75f, 1.5f);
			distFromCheeseWhilstGrounded = Random.Range(0.5f, 1f);
			audioSource.volume = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakVolume.Value;
			if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost)
			{
				agent.speed = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseAgentSpeed.Value;
				agent.speed = Random.Range(agent.speed - 0.75f, agent.speed + 0.75f);
				minSqueakDelay = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakDelayMin.Value;
				minSqueakDelay = ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakDelayMax.Value;
			}
		}

		public override void OnNetworkSpawn()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			((NetworkBehaviour)this).OnNetworkSpawn();
			if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost)
			{
				return;
			}
			int num = Random.Range(1, ((Component)this).transform.childCount + 1);
			int childCount = ((Component)this).transform.childCount;
			for (int i = 1; i <= childCount; i++)
			{
				if (i <= num)
				{
					Transform child = ((Component)this).transform.GetChild(i - 1);
					child.localPosition += new Vector3(Random.Range(-0.1f, 0.1f), 0f, Random.Range(-0.1f, 0.1f));
					SyncMousePositionClientRpc(i - 1, ((Component)this).transform.GetChild(i - 1).localPosition);
				}
				else
				{
					((Component)((Component)this).transform.GetChild(i - 1)).gameObject.SetActive(false);
					SyncMouseActiveStateClientRpc(i - 1);
				}
			}
			mouseAnimators = ((Component)this).GetComponentsInChildren<Animator>(false);
			SyncMouseAnimatorsClientRpc();
			for (int j = 0; j < mouseAnimators.Length; j++)
			{
				mouseAnimators[j].speed = Random.Range(0.65f, 1.35f);
				float num2 = 1f + (1f - mouseAnimators[j].speed);
				Transform transform = ((Component)mouseAnimators[j]).transform;
				transform.localScale *= num2;
				Color32 val = mouseColors[Random.Range(0, mouseColors.Length)];
				((Renderer)((Component)((Component)mouseAnimators[j]).transform.GetChild(0)).GetComponent<SkinnedMeshRenderer>()).material.color = Color32.op_Implicit(val);
				SyncMouseAnimatorValuesClientRpc(j, mouseAnimators[j].speed, num2, val);
			}
		}

		private void Update()
		{
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04df: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Unknown result type (might be due to invalid IL or missing references)
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Unknown result type (might be due to invalid IL or missing references)
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			if (!((NetworkBehaviour)this).IsServer && !((NetworkBehaviour)this).IsHost)
			{
				return;
			}
			if ((Object)(object)targetCheese == (Object)null && !checkToDestroyCalled)
			{
				((Component)((Component)this).transform.GetChild(0)).gameObject.SetActive(false);
				((MonoBehaviour)this).Invoke("CheckToDestroy", 2f);
				checkToDestroyCalled = true;
			}
			if ((Object)(object)targetCheese == (Object)null || checkToDestroyCalled)
			{
				return;
			}
			if (!StartOfRound.Instance.shipHasLanded || !StartOfRound.Instance.currentLevel.planetHasTime)
			{
				if ((Object)(object)((Component)this).transform.parent != (Object)null)
				{
					return;
				}
				((Component)this).transform.parent = StartOfRound.Instance.elevatorTransform;
				SyncParentToShipClientRpc();
				if (currentCheeseState != CheeseState.Idle)
				{
					currentCheeseState = CheeseState.Idle;
					Animator[] array = mouseAnimators;
					foreach (Animator val in array)
					{
						val.SetBool("isIdle", true);
						val.SetBool("isChasing", false);
					}
					((Behaviour)agent).enabled = false;
					SwitchToIdleClientRpc();
				}
				return;
			}
			if ((Object)(object)((Component)this).transform.parent != (Object)null)
			{
				((Component)this).transform.parent = null;
				SyncParentToNoneClientRpc();
			}
			if (aiUpdateTimer < aiUpdateInterval)
			{
				aiUpdateTimer += Time.deltaTime;
				return;
			}
			aiUpdateTimer -= aiUpdateInterval;
			NavMeshHit val2 = default(NavMeshHit);
			navMeshAvailable = NavMesh.SamplePosition(((Component)this).transform.position, ref val2, 40f, agent.areaMask);
			if (!navMeshAvailable)
			{
				if (currentCheeseState != CheeseState.Idle)
				{
					currentCheeseState = CheeseState.Idle;
					Animator[] array2 = mouseAnimators;
					foreach (Animator val3 in array2)
					{
						val3.SetBool("isIdle", true);
						val3.SetBool("isChasing", false);
					}
					((Behaviour)agent).enabled = false;
					SwitchToIdleClientRpc();
				}
				return;
			}
			float num = ((((GrabbableObject)_cheeseScript).isHeld || ((GrabbableObject)_cheeseScript).isPocketed) ? distFromCheeseWhilstHeld : distFromCheeseWhilstGrounded);
			NavMesh.SamplePosition(targetCheese.position + num * Random.insideUnitSphere, ref navmeshHit, 25f, agent.areaMask);
			targetPos = ((NavMeshHit)(ref navmeshHit)).position;
			if (Vector3.Distance(((Component)this).transform.position, targetPos) < num)
			{
				currentCheeseState = CheeseState.Idle;
			}
			else if (Vector3.Distance(((Component)this).transform.position, targetPos) > 6f)
			{
				currentCheeseState = CheeseState.Chasing;
			}
			if (lastCheeseState != currentCheeseState)
			{
				switch (currentCheeseState)
				{
				case CheeseState.Idle:
				{
					Animator[] array4 = mouseAnimators;
					foreach (Animator val5 in array4)
					{
						val5.SetBool("isIdle", true);
						val5.SetBool("isChasing", false);
					}
					((Behaviour)agent).enabled = false;
					SwitchToIdleClientRpc();
					break;
				}
				case CheeseState.Chasing:
				{
					Animator[] array3 = mouseAnimators;
					foreach (Animator val4 in array3)
					{
						val4.SetBool("isChasing", true);
						val4.SetBool("isIdle", false);
					}
					EnableAgent();
					if (agent.isOnNavMesh || agent.isOnOffMeshLink)
					{
						agent.SetDestination(targetPos);
					}
					SwitchToChasingClientRpc(targetPos);
					break;
				}
				}
			}
			if (currentCheeseState == CheeseState.Chasing)
			{
				if (agent.isOnNavMesh || agent.isOnOffMeshLink)
				{
					agent.SetDestination(targetPos);
					SyncAgentDestinationClientRpc(targetPos);
				}
				if (Vector3.Distance(((Component)this).transform.position, targetPos) > 45f && NavMesh.SamplePosition(targetPos + Random.insideUnitSphere * 3f, ref navmeshHit, 40f, agent.areaMask))
				{
					agent.Warp(((NavMeshHit)(ref navmeshHit)).position);
				}
				TryAndOpenDoor();
				if (!onSqueakCooldown)
				{
					int num2 = Random.Range(0, squeakNoises.Length);
					audioSource.PlayOneShot(squeakNoises[num2]);
					SqueakClientRpc(num2);
					SyncDetectNoiseClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)_cheeseScript), ((GrabbableObject)_cheeseScript).isInElevator && currentCheeseState == CheeseState.Idle);
					squeakDelay = Random.Range(minSqueakDelay, maxSqueakDelay);
					onSqueakCooldown = true;
					((MonoBehaviour)this).Invoke("ResetSqueakCooldown", squeakDelay);
				}
			}
			if (ReindogDLL.ReindogAndFriendsModConfig.cheeseMouseSqueakWhilstIdle.Value && currentCheeseState == CheeseState.Idle && !onSqueakCooldown)
			{
				int num3 = Random.Range(0, squeakNoises.Length);
				audioSource.PlayOneShot(squeakNoises[num3]);
				SqueakClientRpc(num3);
				SyncDetectNoiseClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)_cheeseScript), ((GrabbableObject)_cheeseScript).isInElevator && currentCheeseState == CheeseState.Idle);
				squeakDelay = Random.Range(minSqueakDelay, maxSqueakDelay);
				onSqueakCooldown = true;
				((MonoBehaviour)this).Invoke("ResetSqueakCooldown", squeakDelay);
			}
			lastCheeseState = currentCheeseState;
		}

		public void SetMouseAgentTarget(Transform _cheese)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			targetCheese = _cheese;
			_cheeseScript = ((Component)targetCheese).GetComponent<CheeseItem>();
			EnableAgent();
			if (NavMesh.SamplePosition(targetCheese.position + Random.insideUnitSphere * _cheeseScript.spawnDistFromCheese, ref navmeshHit, 45f, agent.areaMask))
			{
				agent.Warp(((NavMeshHit)(ref navmeshHit)).position);
			}
			if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost)
			{
				int num = Random.Range(0, squeakNoises.Length);
				audioSource.PlayOneShot(squeakNoises[num]);
				SqueakClientRpc(num);
				SyncDetectNoiseClientRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)_cheeseScript), ((GrabbableObject)_cheeseScript).isInElevator && currentCheeseState == CheeseState.Idle);
			}
		}

		[ClientRpc]
		private void SwitchToIdleClientRpc()
		{
			//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)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2926805633u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2926805633u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsServer)
			{
				Animator[] array = mouseAnimators;
				foreach (Animator val3 in array)
				{
					val3.SetBool("isIdle", true);
					val3.SetBool("isChasing", false);
				}
				((Behaviour)agent).enabled = false;
			}
		}

		[ClientRpc]
		private void SwitchToChasingClientRpc(Vector3 newDestination)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: 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)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4183928397u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref newDestination);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4183928397u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((NetworkBehaviour)this).IsServer)
			{
				Animator[] array = mouseAnimators;
				foreach (Animator val3 in array)
				{
					val3.SetBool("isChasing", true);
					val3.SetBool("isIdle", false);
				}
				EnableAgent();
				if (agent.isOnNavMesh || agent.isOnOffMeshLink)
				{
					agent.SetDestination(newDestination);
				}
			}
		}

		[ClientRpc]
		private void SyncAgentDestinationClientRpc(Vector3 newDestination)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or mi