Decompiled source of Brynza Emotes v1.0.2

plugins/BrynzaEmotesPlugin.dll

Decompiled 4 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EmotesAPI;
using Microsoft.CodeAnalysis;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
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.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("BrynzaEmotesPlugin")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BrynzaEmotesPlugin")]
[assembly: AssemblyTitle("BrynzaEmotesPlugin")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ExamplePlugin
{
	public static class Assets
	{
		private enum ResourceType
		{
			AssetBundle,
			SoundBank,
			DisplayRuleSetOverride,
			Other
		}

		private static readonly string[] KnownExtensions = new string[5] { "png", "exe", "txt", "xcf", "bat" };

		private static readonly List<AssetBundle> AssetBundles = new List<AssetBundle>();

		private static readonly Dictionary<string, int> AssetIndices = new Dictionary<string, int>();

		private static readonly List<string> SoundBanksToLoad = new List<string>();

		private static readonly List<string> FoundSoundBanks = new List<string>();

		private static readonly Dictionary<string, string> DisplayRuleSetOverrides = new Dictionary<string, string>();

		public static void AddBundle(string assetBundleLocation)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("BrynzaEmotesPlugin." + assetBundleLocation);
			AssetBundle val = AssetBundle.LoadFromStream(stream);
			int count = AssetBundles.Count;
			AssetBundles.Add(val);
			string[] allAssetNames = val.GetAllAssetNames();
			foreach (string text in allAssetNames)
			{
				string text2 = text.ToLower();
				if (text2.StartsWith("assets/"))
				{
					text2 = text2.Remove(0, "assets/".Length);
				}
				AssetIndices[text2] = count;
			}
		}

		internal static void PopulateAssets()
		{
			string[] manifestResourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();
			string[] array = manifestResourceNames;
			foreach (string text in array)
			{
				switch (GetResourceType(text))
				{
				case ResourceType.AssetBundle:
					LoadAssetBundle(text);
					break;
				case ResourceType.SoundBank:
					FoundSoundBanks.Add(text);
					break;
				case ResourceType.DisplayRuleSetOverride:
					DisplayRuleSetOverrides.Add(GetFileName(text).Split(new char[1] { '.' })[0], text);
					break;
				}
			}
		}

		private static string GetFileName(string resource)
		{
			string[] array = resource.Split(new char[1] { '.' });
			return array[^2] + "." + array[^1];
		}

		public static void LoadAssetBundlesFromFolder(string folderName)
		{
			folderName = Path.Combine(Path.GetDirectoryName(BrynzaEmotesPlugin.PInfo.Location), folderName);
			string[] files = Directory.GetFiles(folderName);
			foreach (string text in files)
			{
				AssetBundle val = AssetBundle.LoadFromFile(text);
				int count = AssetBundles.Count;
				AssetBundles.Add(val);
				string[] allAssetNames = val.GetAllAssetNames();
				foreach (string text2 in allAssetNames)
				{
					string text3 = text2.ToLowerInvariant();
					if (text3.StartsWith("assets/"))
					{
						text3 = text3.Remove(0, "assets/".Length);
					}
					AssetIndices[text3] = count;
				}
				DebugClass.Log((object)("Loaded AssetBundle: " + Path.GetFileName(text)));
			}
		}

		private static ResourceType GetResourceType(string resourceName)
		{
			string[] array = resourceName.Split(new char[1] { '.' });
			if (array.Length == 0)
			{
				throw new Exception("Invalid asset found: " + resourceName);
			}
			string text = array[^1];
			if (text == "bnk")
			{
				return ResourceType.SoundBank;
			}
			if (text == "drso")
			{
				return ResourceType.DisplayRuleSetOverride;
			}
			if (Array.IndexOf(KnownExtensions, text) >= 0)
			{
				return ResourceType.Other;
			}
			return ResourceType.AssetBundle;
		}

		internal static void AddSoundBank(string name)
		{
			SoundBanksToLoad.Add(name ?? "");
		}

		public static void LoadAllSoundBanksFromFolder(string folderName)
		{
			folderName = Path.Combine(Path.GetDirectoryName(BrynzaEmotesPlugin.PInfo.Location), folderName);
			string[] files = Directory.GetFiles(folderName);
			foreach (string path in files)
			{
				using FileStream fileStream = File.OpenRead(folderName + "\\" + Path.GetFileName(path));
				byte[] array = new byte[fileStream.Length];
				fileStream.Read(array, 0, array.Length);
				SoundBanks.Add(array);
				DebugClass.Log((object)("Loaded SoundBank: " + Path.GetFileName(path)));
			}
		}

		private static void LoadAssetBundle(string location)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(location);
			AssetBundle val = AssetBundle.LoadFromStream(stream);
			int count = AssetBundles.Count;
			AssetBundles.Add(val);
			string[] allAssetNames = val.GetAllAssetNames();
			foreach (string text in allAssetNames)
			{
				string text2 = text.ToLowerInvariant();
				if (text2.StartsWith("assets/"))
				{
					text2 = text2.Remove(0, "assets/".Length);
				}
				AssetIndices[text2] = count;
			}
			DebugClass.Log((object)("Loaded AssetBundle: " + location));
		}

		internal static void LoadSoundBanks()
		{
			foreach (string foundSoundBank in FoundSoundBanks)
			{
				int num = SoundBanksToLoad.IndexOf(GetFileName(foundSoundBank));
				if (num >= 0)
				{
					LoadSoundBank(foundSoundBank);
					SoundBanksToLoad.RemoveAt(num);
				}
			}
		}

		private static void LoadSoundBank(string location)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(location);
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, array.Length);
			SoundBanks.Add(array);
			DebugClass.Log((object)("Loaded SoundBank: " + location));
		}

		public static T Load<T>(string assetName) where T : Object
		{
			if (assetName.Contains(":"))
			{
				string[] array = assetName.Split(new char[1] { ':' });
				assetName = array[1].ToLower();
			}
			if (assetName.StartsWith("assets/"))
			{
				assetName = assetName.Remove(0, "assets/".Length);
			}
			int index = AssetIndices[assetName];
			return AssetBundles[index].LoadAsset<T>("assets/" + assetName);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.brynzananas.brynzaemotes", "Brynzananas Emotes", "1.0.2")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class BrynzaEmotesPlugin : BaseUnityPlugin
	{
		public const string PluginGUID = "com.brynzananas.brynzaemotes";

		public const string PluginAuthor = "Brynzananas";

		public const string PluginName = "Brynzananas Emotes";

		public const string PluginVersion = "1.0.2";

		public static ConfigEntry<KeyboardShortcut> TauntButton;

		private string currentAnim = "";

		public static BrynzaEmotesPlugin instance;

		private string[] Taunts = new string[9] { "Taunt1", "Taunt2", "Taunt3", "Taunt4", "Taunt5", "Taunt6", "Taunt7", "Taunt8", "Taunt9" };

		private int stand = -1;

		private List<BoneMapper> punchingMappers = new List<BoneMapper>();

		private int prop1 = -1;

		private CameraParamsOverrideHandle fovHandle;

		internal CharacterBody localBody = null;

		public static PluginInfo PInfo { get; private set; }

		public void Awake()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Expected O, but got Unknown
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Expected O, but got Unknown
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Expected O, but got Unknown
			instance = this;
			PInfo = ((BaseUnityPlugin)this).Info;
			Assets.LoadAssetBundlesFromFolder("assetbundles");
			Assets.LoadAllSoundBanksFromFolder("soundbanks");
			TauntButton = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Controls", "Taunt button", new KeyboardShortcut((KeyCode)116, Array.Empty<KeyCode>()), "Press to taunt");
			ModSettingsManager.AddOption((BaseOption)new KeyBindOption(TauntButton));
			ModSettingsManager.SetModIcon(Assets.Load<Sprite>("@BrynzaEmotesPlugin_brynza_emotes:assets/icon.png"));
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt1.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt2.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt3.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt4.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt5.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt6.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt7.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt8.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/taunt9.anim"), false, "Play_taunt", "Stop_taunt", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, false, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/peppinodance.anim"), true, "", "", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/3DGifRun.anim"), true, "", "", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/feastdance.anim"), true, "Play_feast", "Stop_feast", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, true, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/ballsrookie.anim"), true, "Play_metal_balls", "Stop_metal_balls", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/pootisbird.anim"), true, "Play_Heavy_needdispenser01", "Stop_Heavy_needdispenser01", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/youaresosussy.anim"), false, "Play_yoursosussy", "Stop_yoursosussy", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/caramelldansen.anim"), true, "Play_caramelldansen", "Stop_caramelldansen", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, true, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/abuenoadiosmaster.anim"), false, "Play_A_bueno_adios_m_ster", "Stop_A_bueno_adios_m_ster", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/engineerdance.anim"), false, "Play_engineer_dance", "Stop_engineer_dance", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/praisethesun.anim"), true, "", "", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, false, false);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/offtohangmyself.anim"), false, "Play_offtohangmyselfwatchandlearn", "Stop_offtohangmyselfwatchandlearn", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, false, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/invisible.anim"), true, "Play_invisible", "Stop_invisible", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, true, false, false, true, true, true);
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>("@BrynzaEmotesPlugin_brynza_emotes:assets/iwokeupinanewbugatti.anim"), true, "Play_iwokeupinanewbugatti", "Stop_iwokeupinanewbugatti", (HumanBodyBones[])null, (HumanBodyBones[])null, (AnimationClip)null, true, false, false, true, true, true);
			CustomEmotesAPI.animChanged += new AnimationChanged(CustomEmotesAPI_animChanged);
			CustomEmotesAPI.emoteSpotJoined_Body += new JoinedEmoteSpotBody(CustomEmotesAPI_emoteSpotJoined_Body);
			CustomEmotesAPI.emoteSpotJoined_Prop += new JoinedEmoteSpotProp(CustomEmotesAPI_emoteSpotJoined_Prop);
		}

		private IEnumerator WaitForSecondsThenEndEmote(BoneMapper mapper, float time, GameObject parent)
		{
			yield return (object)new WaitForSeconds(time);
			if (Object.op_Implicit((Object)(object)mapper) && (Object)(object)mapper.parentGameObject == (Object)(object)parent)
			{
				mapper.preserveProps = true;
				mapper.AssignParentGameObject(mapper.parentGameObject, false, false, true, false, false);
				mapper.preserveParent = true;
				mapper.preserveProps = true;
				mapper.PlayAnim("none", 0);
			}
		}

		internal IEnumerator WaitForSecondsThenDeleteGameObject(GameObject obj, float time)
		{
			yield return (object)new WaitForSeconds(time);
			if (Object.op_Implicit((Object)(object)obj))
			{
				Object.Destroy((Object)(object)obj);
			}
		}

		private void CustomEmotesAPI_animChanged(string newAnimation, BoneMapper mapper)
		{
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_0396: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_0449: Unknown result type (might be due to invalid IL or missing references)
			prop1 = -1;
			try
			{
				if (newAnimation != "none")
				{
					stand = mapper.currentClip.syncPos;
				}
			}
			catch (Exception)
			{
			}
			if (newAnimation == "OffToHangMyself")
			{
				prop1 = mapper.props.Count;
				mapper.props.Add(Object.Instantiate<GameObject>(Assets.Load<GameObject>("@BrynzaEmotesPlugin_brynza_emotes:assets/Prefabs/ObjectsHangCOpy.prefab")));
				mapper.props[prop1].transform.SetParent(((Component)mapper).transform.parent);
				mapper.props[prop1].transform.localEulerAngles = Vector3.zero;
				mapper.props[prop1].transform.localPosition = Vector3.zero;
				mapper.ScaleProps();
			}
			if (newAnimation == "BallsRookie")
			{
				prop1 = mapper.props.Count;
				mapper.props.Add(Object.Instantiate<GameObject>(Assets.Load<GameObject>("@BrynzaEmotesPlugin_brynza_emotes:assets/Prefabs/ballsrookie.prefab")));
				mapper.props[prop1].transform.SetParent(((Component)mapper).transform.parent);
				mapper.props[prop1].transform.localEulerAngles = Vector3.zero;
				mapper.props[prop1].transform.localPosition = Vector3.zero;
				mapper.ScaleProps();
			}
			if (newAnimation == "IWokeUpInANewBugatti")
			{
				prop1 = mapper.props.Count;
				mapper.props.Add(Object.Instantiate<GameObject>(Assets.Load<GameObject>("@BrynzaEmotesPlugin_brynza_emotes:assets/Prefabs/buggati.prefab")));
				mapper.props[prop1].transform.SetParent(((Component)mapper).transform.parent);
				mapper.props[prop1].transform.localEulerAngles = Vector3.zero;
				mapper.props[prop1].transform.localPosition = Vector3.zero;
				mapper.ScaleProps();
			}
			if (newAnimation == "SkibidiToilet")
			{
				prop1 = mapper.props.Count;
				mapper.props.Add(Object.Instantiate<GameObject>(Assets.Load<GameObject>("@BrynzaEmotesPlugin_brynza_emotes:assets/Prefabs/furnituretoilet001a.prefab")));
				mapper.props[prop1].transform.SetParent(((Component)mapper).transform.parent);
				mapper.props[prop1].transform.localEulerAngles = Vector3.zero;
				mapper.props[prop1].transform.localPosition = Vector3.zero;
				mapper.ScaleProps();
			}
			if (newAnimation == "PraiseTheSun")
			{
				prop1 = mapper.props.Count;
				mapper.props.Add(Object.Instantiate<GameObject>(Assets.Load<GameObject>("@BrynzaEmotesPlugin_brynza_emotes:assets/Prefabs/PraiseTheSun.prefab")));
				mapper.props[prop1].transform.SetParent(((Component)mapper).transform.parent);
				mapper.props[prop1].transform.localEulerAngles = Vector3.zero;
				mapper.props[prop1].transform.localPosition = Vector3.zero;
				mapper.ScaleProps();
			}
			if (Taunts.Contains(newAnimation))
			{
				prop1 = mapper.props.Count;
				mapper.props.Add(Object.Instantiate<GameObject>(Assets.Load<GameObject>("@BrynzaEmotesPlugin_brynza_emotes:assets/Prefabs/TauntBubble.prefab")));
				mapper.props[prop1].transform.SetParent(((Component)mapper).transform.parent);
				mapper.props[prop1].transform.localEulerAngles = Vector3.zero;
				mapper.props[prop1].transform.localPosition = Vector3.zero;
				mapper.ScaleProps();
			}
		}

		internal void AddAnimation(string AnimClip, string wwise, string AnimClip2ElectricBoogaloo, bool dimAudio, bool sync)
		{
			CustomEmotesAPI.AddCustomAnimation(Assets.Load<AnimationClip>(AnimClip), false, "Play_" + wwise, "Stop_" + wwise, (HumanBodyBones[])null, (HumanBodyBones[])null, Assets.Load<AnimationClip>(AnimClip2ElectricBoogaloo), dimAudio, false, false, true, sync, sync);
		}

		private void CustomEmotesAPI_emoteSpotJoined_Prop(GameObject emoteSpot, BoneMapper joiner, BoneMapper host)
		{
		}

		private void CustomEmotesAPI_emoteSpotJoined_Body(GameObject emoteSpot, BoneMapper joiner, BoneMapper host)
		{
		}

		private void Update()
		{
			if (GetKeyDown(TauntButton))
			{
				switch (Random.RandomRangeInt(0, 9))
				{
				case 0:
					CustomEmotesAPI.PlayAnimation("Taunt1", -2);
					break;
				case 1:
					CustomEmotesAPI.PlayAnimation("Taunt2", -2);
					break;
				case 2:
					CustomEmotesAPI.PlayAnimation("Taunt3", -2);
					break;
				case 3:
					CustomEmotesAPI.PlayAnimation("Taunt4", -2);
					break;
				case 4:
					CustomEmotesAPI.PlayAnimation("Taunt5", -2);
					break;
				case 5:
					CustomEmotesAPI.PlayAnimation("Taunt6", -2);
					break;
				case 6:
					CustomEmotesAPI.PlayAnimation("Taunt7", -2);
					break;
				case 7:
					CustomEmotesAPI.PlayAnimation("Taunt8", -2);
					break;
				case 8:
					CustomEmotesAPI.PlayAnimation("Taunt9", -2);
					break;
				case 9:
					CustomEmotesAPI.PlayAnimation("OffToHangMyself", -2);
					break;
				}
			}
			else if (GetKeyUp(TauntButton) && Taunts.Contains(currentAnim))
			{
				CustomEmotesAPI.PlayAnimation("none", -2);
			}
		}

		private bool GetKeyDown(ConfigEntry<KeyboardShortcut> entry)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			KeyboardShortcut value = entry.Value;
			foreach (KeyCode modifier in ((KeyboardShortcut)(ref value)).Modifiers)
			{
				if (!Input.GetKey(modifier))
				{
					return false;
				}
			}
			value = entry.Value;
			return Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey);
		}

		private bool GetKeyUp(ConfigEntry<KeyboardShortcut> entry)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			KeyboardShortcut value = entry.Value;
			foreach (KeyCode modifier in ((KeyboardShortcut)(ref value)).Modifiers)
			{
				if (Input.GetKeyUp(modifier))
				{
					return true;
				}
			}
			value = entry.Value;
			return Input.GetKeyUp(((KeyboardShortcut)(ref value)).MainKey);
		}
	}
}