Decompiled source of LCSoundRandomizerMod v0.9.0

LCSoundRandomizerMod.dll

Decompiled a week ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LCSoundRandomizerMod.ApplyPatches;
using LCSoundRandomizerMod.Netcode;
using LCSoundRandomizerMod.NetcodePatcher;
using Microsoft.CodeAnalysis;
using STSharedAudioLib;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("LCSoundRandomizerMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Randomize the sounds and songs of tons of items and enemies!")]
[assembly: AssemblyFileVersion("0.9.0.0")]
[assembly: AssemblyInformationalVersion("0.9.0")]
[assembly: AssemblyProduct("LCSoundRandomizerMod")]
[assembly: AssemblyTitle("LCSoundRandomizerMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.9.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[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.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LCSoundRandomizerMod
{
	public class Config
	{
		public static ConfigEntry<bool> Multiplayer;

		public Config(ConfigFile cfg)
		{
			Multiplayer = cfg.Bind<bool>("Multiplayer", "Synchronize Sounds", true, "If true, will play the same random sounds for everyone. If false, everyone will get different random sounds.\nATTENTION!! If true, everyone in the lobby needs this mod and this option set to true!");
		}
	}
	[BepInPlugin("LCSoundRandomizerMod", "LCSoundRandomizerMod", "0.9.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		public static AssetBundle SoundRandomizerAssetBundle;

		public static AudioList SoundRandomizerAudioList;

		public static GameObject SoundRandomizeGameObject;

		public static Config MyConfig { get; internal set; }

		private void Awake()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			Logger = ((BaseUnityPlugin)this).Logger;
			Logger.LogInfo((object)"Plugin LCSoundRandomizerMod is loaded!");
			Harmony val = new Harmony("LCSoundRandomizerMod");
			val.PatchAll();
			MyConfig = new Config(((BaseUnityPlugin)this).Config);
			SoundRandomizerAudioList = ScriptableObject.CreateInstance<AudioList>();
			((Object)SoundRandomizerAudioList).name = "LCSoundRandomizerMod";
			if (Config.Multiplayer.Value)
			{
				NetcodePatcher();
				LoadAssetBundle();
			}
		}

		public static void SetUp()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			SoundRandomizeGameObject = new GameObject("LCSoundRandomizerMod");
			SharedAudioMethods.GetSharedAudioComponent(SoundRandomizeGameObject, false, (string)null, 100, false).allAudioLists.Add(SoundRandomizerAudioList);
		}

		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);
					}
				}
			}
		}

		public static GameObject SearchForSimonTendoNetworkHandlers()
		{
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Expected O, but got Unknown
			Logger.LogDebug((object)"Starting search for SimonTendoNetworkHandlers");
			bool flag = false;
			GameObject[] array = Object.FindObjectsOfType<GameObject>();
			GameObject[] array2 = array;
			foreach (GameObject val in array2)
			{
				if (((Object)val).name == "SimonTendoNetworkHandlers")
				{
					GameObject result = val;
					flag = true;
					Logger.LogDebug((object)("Found existing " + ((Object)val).name + ", using as parent."));
					return result;
				}
			}
			if (!flag)
			{
				GameObject result = new GameObject("SimonTendoNetworkHandlers");
				Logger.LogDebug((object)("Did not find existing NetworkHandlers, instantiating new " + ((Object)result).name));
				return result;
			}
			Logger.LogError((object)"Reached end of SearchForSimonTendoNetworkHandlers without having returned object.");
			return null;
		}

		private static void LoadAssetBundle()
		{
			Logger.LogInfo((object)"Config [Multiplayer] is set to TRUE. Randomized sounds will be synced across players, all of which need this config option set to true!");
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			SoundRandomizerAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "soundrandomizerassetbundle"));
		}

		public static AudioClip PlayRandomClipLocal(GameObject instancedObject, string fieldName)
		{
			AudioClip val = SharedAudioMethods.AudioClipGetRandomByWeight(SoundRandomizerAudioList, false);
			Logger.LogDebug((object)$"{((Object)instancedObject).name} - '{fieldName}' // now playing: {((Object)val).name} at index [{SharedAudioMethods.AudioClipGetIndex(val, SoundRandomizerAudioList, false)}]");
			return val;
		}

		public static int PlayRandomClipNetcode()
		{
			return SharedAudioMethods.AudioClipGetIndex(SharedAudioMethods.AudioClipGetRandomByWeight(SoundRandomizerAudioList, false), SoundRandomizerAudioList, false);
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "LCSoundRandomizerMod";

		public const string PLUGIN_NAME = "LCSoundRandomizerMod";

		public const string PLUGIN_VERSION = "0.9.0";
	}
}
namespace LCSoundRandomizerMod.Netcode
{
	public class GameNetworkManagerPatch
	{
		[HarmonyPatch]
		public class NetworkObjectManager
		{
			private static GameObject networkPrefab;

			[HarmonyPostfix]
			[HarmonyPatch(typeof(GameNetworkManager), "Start")]
			public static void Init()
			{
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Expected O, but got Unknown
				if (Config.Multiplayer.Value && !((Object)(object)networkPrefab != (Object)null))
				{
					networkPrefab = (GameObject)Plugin.SoundRandomizerAssetBundle.LoadAsset("Assets/SoundRandomizerNetworkHandler.prefab");
					networkPrefab.AddComponent<SoundRandomizerNetworkHandler>();
					NetworkManager.Singleton.AddNetworkPrefab(networkPrefab);
				}
			}

			[HarmonyPostfix]
			[HarmonyPatch(typeof(StartOfRound), "Awake")]
			private static void SpawnNetworkHandler()
			{
				if (Config.Multiplayer.Value && (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer))
				{
					GameObject val = Object.Instantiate<GameObject>(networkPrefab, Plugin.SearchForSimonTendoNetworkHandlers().transform, false);
					val.GetComponent<NetworkObject>().Spawn(false);
				}
			}
		}
	}
	public class PlayerControllerBPatch
	{
		[HarmonyPatch]
		public class NewPlayerControllerB
		{
			[HarmonyPostfix]
			[HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")]
			public static void ConnectClientToPlayerObjectPostfix()
			{
				if (Config.Multiplayer.Value)
				{
					SoundRandomizerNetworkHandler.instance.JoinSynchronizeSoundsServerRpc();
				}
			}
		}
	}
	public class SoundRandomizerNetworkHandler : NetworkBehaviour
	{
		public static SoundRandomizerNetworkHandler instance;

		private void Awake()
		{
			instance = this;
		}

		[ClientRpc]
		public void SynchronizeAmbienceClipClientRpc(int indexToLookFor, float soundVolume)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2984702317u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, indexToLookFor);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref soundVolume, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2984702317u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on PlaySoundAroundPlayersAsGroup() to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
					SoundManager.Instance.PlaySoundAroundPlayersAsGroup(Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip, soundVolume);
				}
			}
		}

		[ClientRpc]
		public void SynchronizeAnimatedItemClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(481641911u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 481641911u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				AnimatedItem component = ((Component)val3).GetComponent<AnimatedItem>();
				if (((Object)component).name != "RubberDucky(Clone)")
				{
					component.grabAudio = audioClip;
				}
				if (((Object)component).name == "Dentures(Clone)" || ((Object)component).name == "RubberDucky(Clone)")
				{
					component.dropAudio = audioClip;
				}
				if (((Object)component).name == "RubberDucky(Clone)")
				{
					((GrabbableObject)component).itemProperties.dropSFX = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
			}
		}

		[ClientRpc]
		public void SynchronizeAnimatedObjectTriggerClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(1524464199u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1524464199u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				switch (password)
				{
				case "DoorTrue":
				{
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					AudioClip[] boolTrueAudios = (AudioClip[])(object)new AudioClip[1] { audioClip };
					((Component)((Component)val3).gameObject.transform.GetChild(0).GetChild(1)).gameObject.GetComponentInChildren<AnimatedObjectTrigger>().boolTrueAudios = boolTrueAudios;
					break;
				}
				case "DoorFalse":
				{
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					AudioClip[] boolFalseAudios = (AudioClip[])(object)new AudioClip[1] { audioClip };
					((Component)((Component)val3).gameObject.transform.GetChild(0).GetChild(1)).gameObject.GetComponentInChildren<AnimatedObjectTrigger>().boolFalseAudios = boolFalseAudios;
					break;
				}
				case "DoorTrueFail":
					Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
					((Component)((Component)val3).gameObject.transform.GetChild(0).GetChild(1)).gameObject.GetComponentInChildren<AnimatedObjectTrigger>().boolTrueAudios = AnimatedObjectTriggerPatch.OriginalDoorBoolTrueAudios;
					break;
				case "DoorFalseFail":
					Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
					((Component)((Component)val3).gameObject.transform.GetChild(0).GetChild(1)).gameObject.GetComponentInChildren<AnimatedObjectTrigger>().boolFalseAudios = AnimatedObjectTriggerPatch.OriginalDoorBoolFalseAudios;
					break;
				default:
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
					break;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
			}
		}

		[ClientRpc]
		public void SynchronizeBaboonBirdAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(74049520u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 74049520u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				BaboonBirdAI component = ((Component)val3).GetComponent<BaboonBirdAI>();
				AudioClip[] array = (AudioClip[])(object)new AudioClip[6] { audioClip, audioClip, audioClip, audioClip, audioClip, audioClip };
				switch (password)
				{
				case "Scream":
					component.cawScreamSFX = array;
					return;
				case "Laugh":
					component.cawLaughSFX = array;
					return;
				case "AudioClips":
					((EnemyAI)component).enemyType.audioClips = array;
					return;
				}
				Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
			}
		}

		[ClientRpc]
		public void SynchronizeBlobAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(3841572418u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3841572418u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
					AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
					BlobAI component = ((Component)val3).GetComponent<BlobAI>();
					component.agitatedSFX = audioClip;
				}
				else
				{
					Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
				}
			}
		}

		[ClientRpc]
		public void SynchronizeButlerEnemyAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(797100705u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 797100705u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				ButlerEnemyAI component = ((Component)val3).GetComponent<ButlerEnemyAI>();
				if (!(password == "Pop"))
				{
					if (password == "Murder")
					{
						Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on murderMusicAudio to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
						ButlerEnemyAI.murderMusicAudio.clip = audioClip;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					component.popAudio.clip = audioClip;
					component.popAudioFar.clip = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
			}
		}

		[ClientRpc]
		public void SynchronizeCrawlerAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(3688895905u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3688895905u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				CrawlerAI component = ((Component)val3).GetComponent<CrawlerAI>();
				AudioClip[] array = (AudioClip[])(object)new AudioClip[1] { audioClip };
				if (!(password == "Roar"))
				{
					if (password == "Wall")
					{
						component.hitWallSFX = array;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					component.longRoarSFX = array;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeCentipedeAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(2618848342u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2618848342u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				CentipedeAI component = ((Component)val3).GetComponent<CentipedeAI>();
				AudioClip[] shriekClips = (AudioClip[])(object)new AudioClip[1] { audioClip };
				if (!(password == "Cling"))
				{
					if (password == "Shriek")
					{
						component.shriekClips = shriekClips;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					component.clingToPlayer3D = audioClip;
					component.clingingToPlayer2DAudio.clip = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeDocileLocustBeesAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(2449241257u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2449241257u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				AudioClip[] audioClips = (AudioClip[])(object)new AudioClip[1] { audioClip };
				DocileLocustBeesAI component = ((Component)val3).GetComponent<DocileLocustBeesAI>();
				if (!(password == "Success"))
				{
					if (password == "Fail")
					{
						Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
						((EnemyAI)component).enemyType.audioClips = EnemyAIPatch.OriginalLocustClips;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					((EnemyAI)component).enemyType.audioClips = audioClips;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
			}
		}

		[ClientRpc]
		public void SynchronizeDoorLockClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(1062760020u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1062760020u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
					AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
					DoorLock componentInChildren = ((Component)((Component)val3).gameObject.transform.GetChild(0).GetChild(1)).gameObject.GetComponentInChildren<DoorLock>();
					componentInChildren.unlockSFX = audioClip;
				}
				else
				{
					Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
				}
			}
		}

		[ClientRpc]
		public void SynchronizeDoubleWingAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(648155300u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 648155300u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				AudioClip[] audioClips = (AudioClip[])(object)new AudioClip[1] { audioClip };
				DoublewingAI component = ((Component)val3).GetComponent<DoublewingAI>();
				if (!(password == "Success"))
				{
					if (password == "Fail")
					{
						Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
						((EnemyAI)component).enemyType.audioClips = EnemyAIPatch.OriginalManticoilClips;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					((EnemyAI)component).enemyType.audioClips = audioClips;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClips");
			}
		}

		[ClientRpc]
		public void SynchronizeEventWhenDroppedItemClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(2920385684u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2920385684u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
					AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
					EventWhenDroppedItem component = ((Component)val3).GetComponent<EventWhenDroppedItem>();
					((GrabbableObject)component).itemProperties.dropSFX = audioClip;
				}
				else
				{
					Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
				}
			}
		}

		[ClientRpc]
		public void SynchronizeFlowermanAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(2830424158u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2830424158u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				FlowermanAI component = ((Component)val3).GetComponent<FlowermanAI>();
				switch (password)
				{
				case "Kill":
					component.crackNeckSFX = audioClip;
					return;
				case "Angered":
					component.creatureAngerVoice.clip = audioClip;
					return;
				case "Found":
					((Component)((Component)val3).gameObject.transform.GetChild(1).GetChild(1)).GetComponent<PlayAudioAnimationEvent>().audioClip = audioClip;
					return;
				}
				Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeFlowerSnakeEnemyClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(1422083081u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1422083081u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				FlowerSnakeEnemy component = ((Component)val3).GetComponent<FlowerSnakeEnemy>();
				if (!(password == "Success"))
				{
					if (password == "Fail")
					{
						Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
						((EnemyAI)component).enemyType.audioClips[6] = FlowerSnakeEnemyPatch.OriginalLeaps[0];
						((EnemyAI)component).enemyType.audioClips[7] = FlowerSnakeEnemyPatch.OriginalLeaps[1];
						((EnemyAI)component).enemyType.audioClips[10] = FlowerSnakeEnemyPatch.OriginalLeaps[2];
					}
					else
					{
						Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
					}
				}
				else
				{
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					((EnemyAI)component).enemyType.audioClips[6] = audioClip;
					((EnemyAI)component).enemyType.audioClips[7] = audioClip;
					((EnemyAI)component).enemyType.audioClips[10] = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeForestGiantAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(2144198120u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2144198120u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
					AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
					((Component)((Component)val3).gameObject.transform.GetChild(0).GetChild(3)).gameObject.GetComponent<PlayAudioAnimationEvent>().audioClip2 = audioClip;
				}
				else
				{
					Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
				}
			}
		}

		[ClientRpc]
		public void SynchronizeGrabbableObjectClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(3164409314u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3164409314u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				if (((Object)((Component)val3).gameObject).name == "Remote(Clone)")
				{
					RemoteProp component = ((Component)val3).GetComponent<RemoteProp>();
					component.remoteAudio.clip = audioClip;
				}
				else if (((Object)((Component)val3).gameObject).name == "WhoopieCushion(Clone)")
				{
					WhoopieCushionItem component2 = ((Component)val3).GetComponent<WhoopieCushionItem>();
					AudioClip[] fartAudios = (AudioClip[])(object)new AudioClip[1] { audioClip };
					component2.fartAudios = fartAudios;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeHoarderBugAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(3315928064u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3315928064u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				AudioClip[] array = (AudioClip[])(object)new AudioClip[1] { audioClip };
				HoarderBugAI component = ((Component)val3).GetComponent<HoarderBugAI>();
				switch (password)
				{
				case "ChitterSuccess":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					component.chitterSFX = array;
					break;
				case "ChitterFail":
					Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
					component.chitterSFX = HoarderBugAIPatch.OriginalChitters;
					break;
				case "Screech":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					((EnemyAI)component).enemyBehaviourStates[2].VoiceClip = audioClip;
					component.angryScreechSFX = array;
					break;
				default:
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
					break;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeHUDManagerClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(1370315657u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1370315657u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
					AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
					HUDManager component = ((Component)val3).GetComponent<HUDManager>();
					component.newProfitQuotaSFX = audioClip;
				}
				else
				{
					Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
				}
			}
		}

		[ClientRpc]
		public void SynchronizeJesterAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(3686432383u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3686432383u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				JesterAI component = ((Component)val3).GetComponent<JesterAI>();
				switch (password)
				{
				case "Music":
					component.popGoesTheWeaselTheme = audioClip;
					return;
				case "Pop":
					component.popUpSFX = audioClip;
					return;
				case "Kill":
					component.killPlayerSFX = audioClip;
					return;
				}
				Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeLandmineClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(789790451u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 789790451u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				Landmine component = ((Component)((Component)val3).gameObject.transform.GetChild(0)).gameObject.GetComponent<Landmine>();
				PlayAudioAnimationEvent component2 = ((Component)((Component)val3).gameObject.transform.GetChild(0)).gameObject.GetComponent<PlayAudioAnimationEvent>();
				switch (password)
				{
				case "Press":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					component.minePress = audioClip;
					break;
				case "BeepSuccess":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					component2.audioToPlay.clip = audioClip;
					component2.audioToPlay.Play();
					WalkieTalkie.TransmitOneShotAudio(component2.audioToPlay, audioClip, 1f);
					break;
				case "BeepFail":
					Plugin.Logger.LogDebug((object)("Config [Multiplayer]: received call to set sound on object " + ((Object)((Component)val3).gameObject).name + " with password " + password));
					component2.audioToPlay.clip = LandminePatch.OriginalBeep;
					component2.audioToPlay.Play();
					WalkieTalkie.TransmitOneShotAudio(component2.audioToPlay, LandminePatch.OriginalBeep, 1f);
					break;
				default:
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
					break;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeMaskedPlayerEnemyClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, int password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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(1589670u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				BytePacker.WriteValueBitPacked(val2, password);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1589670u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				NetworkObject val3 = default(NetworkObject);
				if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
				{
					indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
					MaskedPlayerEnemy component = ((Component)val3).GetComponent<MaskedPlayerEnemy>();
					((EnemyAI)component).enemyType.audioClips[password] = audioClip;
				}
				else
				{
					Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
				}
			}
		}

		[ClientRpc]
		public void SynchronizeMouthDogAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(729864852u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 729864852u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				MouthDogAI component = ((Component)val3).GetComponent<MouthDogAI>();
				if (!(password == "Suspicious"))
				{
					if (password == "Lunge")
					{
						((EnemyAI)component).enemyBehaviourStates[3].SFXClip = audioClip;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					((EnemyAI)component).enemyBehaviourStates[1].VoiceClip = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeNoisemakerPropClientRpc(NetworkObjectReference itemNOR, int indexToLookFor)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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(3842169369u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3842169369u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}]");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				NoisemakerProp component = ((Component)val3).GetComponent<NoisemakerProp>();
				component.noiseSFX[0] = audioClip;
				if (((Object)((Component)val3).gameObject).name != "CashRegisterItem(Clone)")
				{
					component.noiseSFXFar[0] = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeNutcrackerEnemyAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(1107213762u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1107213762u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				AudioClip[] torsoFinishTurningClips = (AudioClip[])(object)new AudioClip[1] { audioClip };
				NutcrackerEnemyAI component = ((Component)val3).GetComponent<NutcrackerEnemyAI>();
				switch (password)
				{
				case "Music":
					((Component)((Component)val3).gameObject.transform.GetChild(5)).gameObject.GetComponent<AudioSource>().clip = audioClip;
					return;
				case "Turn":
					component.torsoFinishTurningClips = torsoFinishTurningClips;
					return;
				case "Kick":
					component.kickSFX = audioClip;
					return;
				}
				Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizePufferAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(847676826u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 847676826u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				AudioClip[] frightenSFX = (AudioClip[])(object)new AudioClip[1] { audioClip };
				PufferAI component = ((Component)val3).GetComponent<PufferAI>();
				switch (password)
				{
				case "Frighten":
					component.frightenSFX = frightenSFX;
					return;
				case "Nervous":
					component.nervousMumbling = audioClip;
					return;
				case "Stomp":
					component.stomp = audioClip;
					return;
				case "Puff":
					component.puff = audioClip;
					return;
				case "Tail":
					component.rattleTail = audioClip;
					return;
				}
				Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeRadMechAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password, int i = -1)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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(1018761427u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				BytePacker.WriteValueBitPacked(val2, i);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1018761427u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				RadMechAI component = ((Component)val3).GetComponent<RadMechAI>();
				switch (password)
				{
				case "Broadcast":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}{i}");
					((EnemyAI)component).enemyType.audioClips[i] = audioClip;
					break;
				case "On":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					component.spotlightOnAudio.clip = audioClip;
					break;
				case "Off":
					Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
					component.spotlightOff = audioClip;
					break;
				default:
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
					break;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeSandSpiderAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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(1172357946u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref itemNOR, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, indexToLookFor);
				bool flag = password != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(password, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1172357946u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = default(NetworkObject);
			if (((NetworkObjectReference)(ref itemNOR)).TryGet(ref val3, (NetworkManager)null))
			{
				indexToLookFor = CheckValidIndexToLookFor(indexToLookFor);
				Plugin.Logger.LogDebug((object)$"Config [Multiplayer]: received call to set sound on object {((Object)((Component)val3).gameObject).name} to AudioClip with name '{((Object)Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip).name}' at index [{indexToLookFor}] with password {password}");
				AudioClip audioClip = Plugin.SoundRandomizerAudioList.weightedClipsList[indexToLookFor].audioClip;
				SandSpiderAI component = ((Component)val3).GetComponent<SandSpiderAI>();
				if (!(password == "Hit"))
				{
					if (password == "Web")
					{
						component.hitWebSFX = audioClip;
						component.breakWebSFX = audioClip;
						return;
					}
					Plugin.Logger.LogWarning((object)("!!" + MethodBase.GetCurrentMethod().Name + " called with unrecognized password " + password + "!!"));
				}
				else
				{
					component.hitSpiderSFX = audioClip;
				}
			}
			else
			{
				Plugin.Logger.LogWarning((object)"Config [Multiplayer]: failed to get NetworkObject, can't sync AudioClip");
			}
		}

		[ClientRpc]
		public void SynchronizeSandWormAIClientRpc(NetworkObjectReference itemNOR, int indexToLookFor, string password)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((Netwo