Decompiled source of Splatoon Emote Pack v1.0.2

plugins/splatoon/Splatoon_Emotes.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using CustomEmotesAPI_Template_Mod;
using EmotesAPI;
using LethalEmotesAPI.ImportV2;
using Lethal_Company_CustomEmotesAPI_Template_Mod;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Lethal Company CustomEmotesAPI Template Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lethal Company CustomEmotesAPI Template Mod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("199912ba-43b6-4276-b420-7bfaa3eedbe5")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[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 Lethal_Company_CustomEmotesAPI_Template_Mod
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Segtendo.Splatoon_Emotes", "Splatoon_Emotes", "1.0.1")]
	public class Splatoon_Emotes : BaseUnityPlugin
	{
		public const string PluginGUID = "com.Segtendo.Splatoon_Emotes";

		public const string PluginName = "Splatoon_Emotes";

		public const string PluginVersion = "1.0.1";

		public static Splatoon_Emotes instance;

		public static PluginInfo PInfo { get; private set; }

		public void Awake()
		{
			instance = this;
			PInfo = ((BaseUnityPlugin)this).Info;
			Assets.LoadAssetBundlesFromFolder("assetbundles");
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win21 - Adoring Crowd/AdoringCrowd.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win21 - Adoring Crowd/AdoringCrowd_Wait.anim") }, sync: false, "Adoring Crowd", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Shivering00 - All Chill/AllChill.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Shivering00 - All Chill/AllChill_Wait.anim") }, sync: false, "All Chill", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win09 - Backflip Atcha/BackflipAtcha.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win09 - Backflip Atcha/BackflipAtcha_Wait.anim") }, sync: false, "Backflip Atcha", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Idol01 - Bait the Hook/BaitTheHook.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Idol01 - Bait the Hook/BaitTheHook_Wait.anim") }, sync: false, "Bait the Hook", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win19 - Bashful Brag/BashfulBrag.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win19 - Bashful Brag/BashfulBrag_Wait.anim") }, sync: false, "Bashful Brag", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win08 - Breakin/Breakin.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win08 - Breakin/Breakin_Wait.anim") }, sync: false, "Breakin'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win23 - Bursting Out/BurstingOut.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win23 - Bursting Out/BurstingOut_Wait.anim") }, sync: false, "Bursting Out'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_NwBtl00 - Card Shark/CardShark.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_NwBtl00 - Card Shark/CardShark_Wait.anim") }, sync: false, "Card Shark", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Idol02 - Deepest Cut/DeepestCut.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Idol02 - Deepest Cut/DeepestCut_Wait.anim") }, sync: false, "Deepest Cut", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win15 - Double-Cross Dab/DoubleCrossDab.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win15 - Double-Cross Dab/DoubleCrossDab_Wait.anim") }, sync: false, "Double-Cross Dab", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win36 - Down-Rock Pop/DownRockPop.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win36 - Down-Rock Pop/DownRockPop_Wait.anim") }, sync: false, "Down-Rock Pop", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win11 - Easy Kneesy/EasyKneesy.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win11 - Easy Kneesy/EasyKneesy_Wait.anim") }, sync: false, "Easy Kneesy", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win39 - Flowing Form/FlowingForm.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win39 - Flowing Form/FlowingForm_Wait.anim") }, sync: false, "Flowing Form", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win37 - Just Playin'/JustPlayin.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win37 - Just Playin'/JustPlayin_Wait.anim") }, sync: false, "Just Playin'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win12 - Landed It/LandedIt.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win12 - Landed It/LandedIt_Wait.anim") }, sync: false, "Landed It", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win10 - Later, Undulator/LaterUndulator.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win10 - Later, Undulator/LaterUndulator_Wait.anim") }, sync: false, "Later, Undulator", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win31 - Makin' Waves/MakinWaves.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win31 - Makin' Waves/MakinWaves_Wait.anim") }, sync: false, "Makin' Waves", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win17 - MVPleased/MVPleased.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win17 - MVPleased/MVPleased_Wait.anim") }, sync: false, "MVPleased", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_FeelingWarm00 - No Chill/NoChill.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_FeelingWarm00 - No Chill/NoChill_Wait.anim") }, sync: false, "No Chill", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win30 - Nowhere Fast/NowhereFast.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win30 - Nowhere Fast/NowhereFast_Wait.anim") }, sync: false, "Nowhere Fast", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win33 - Perfect Pirouette/PerfectPirouette.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win33 - Perfect Pirouette/PerfectPirouette_Wait.anim") }, sync: false, "Perfect Pirouette", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Yancha - Ready for Action/ReadyForAction.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Yancha - Ready for Action/ReadyForAction_Wait.anim") }, sync: false, "Ready for Action", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win16 - Robo-Flow/RoboFlow.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win16 - Robo-Flow/RoboFlow_Wait.anim") }, sync: false, "Robo-Flow", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win26 - Rootin' Tootin'/RootinTootin.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win26 - Rootin' Tootin'/RootinTootin_Wait.anim") }, sync: false, "Rootin' Tootin'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win32 - Roundhouse Ballerina/RoundhouseBallerina.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win32 - Roundhouse Ballerina/RoundhouseBallerina_Wait.anim") }, sync: false, "Roundhouse Ballerina", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win35 - Routine Victory/RoutineVictory.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win35 - Routine Victory/RoutineVictory_Wait.anim") }, sync: false, "Routine Victory", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win22 - Sarcastic Salute/SarcasticSalute.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win22 - Sarcastic Salute/SarcasticSalute_Wait.anim") }, sync: false, "Sarcastic Salute", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win34 - Shot Caller/ShotCaller.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win34 - Shot Caller/ShotCaller_Wait.anim") }, sync: false, "Shot Caller", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Idol00 - Sisters Style/SistersStyle.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Idol00 - Sisters Style/SistersStyle_Wait.anim") }, sync: false, "Sisters Style", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win24 - Spinnin' Salute/SpinninSalute.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win24 - Spinnin' Salute/SpinninSalute_Wait.anim") }, sync: false, "Spinnin' Salute", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_BigJump00 - Spring-Loaded/SpringLoaded.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_BigJump00 - Spring-Loaded/SpringLoaded_Wait.anim") }, sync: false, "Spring-Loaded", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_IkachanDance - Squiddin' Around/SquiddinAround.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_IkachanDance - Squiddin' Around/SquiddinAround_Wait.anim") }, sync: false, "Squiddin' Around'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win38 - Strings Attached/StringsAttached.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win38 - Strings Attached/StringsAttached_Wait.anim") }, sync: false, "Strings Attached'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win28 - Stance Up/StanceUp.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win28 - Stance Up/StanceUp_Wait.anim") }, sync: false, "Stance Up'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win04 - Stuntin'/Stuntin.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win04 - Stuntin'/Stuntin_Wait.anim") }, sync: false, "Stuntin'", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Crouching00 - The Lowdown/TheLowdown.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Crouching00 - The Lowdown/TheLowdown_Wait.anim") }, sync: false, "The Lowdown", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win18 - Twirl Power/TwirlPower.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win18 - Twirl Power/TwirlPower_Wait.anim") }, sync: false, "Twirl Power", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win25 - Upperkick Crouch/UpperkickCrouch.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win25 - Upperkick Crouch/UpperkickCrouch_Wait.anim") }, sync: false, "Upperkick Crouch", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win13 - Victory Strut/VictoryStrut.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win13 - Victory Strut/VictoryStrut_Wait.anim") }, sync: false, "Victory Strut", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_WaveHands - Wave 'Em Off/WaveEmOff.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_WaveHands - Wave 'Em Off/WaveEmOff_Wait.anim") }, sync: false, "Wave 'Em Off", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_SittingCrossedLegs - Who's Next/WhosNext.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_SittingCrossedLegs - Who's Next/WhosNext_Wait.anim") }, sync: false, "Who's Next?", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win27 - Windmill Whip/WindmillWhip.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win27 - Windmill Whip/WindmillWhip_Wait.anim") }, sync: false, "Windmill Whip", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_BlowKiss - XOXO/XOXO.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_BlowKiss - XOXO/XOXO_Wait.anim") }, sync: false, "XOXO", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win20 - You're Welcome/YoureWelcome.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win20 - You're Welcome/YoureWelcome_Wait.anim") }, sync: false, "You're Welcome", cantMove: false, thirdPerson: true);
			ImportAnimation((AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win14 - Your Move/YourMove.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("Emote_Win14 - Your Move/YourMove_Wait.anim") }, sync: false, "Your Move", cantMove: false, thirdPerson: true);
		}

		private void CustomEmotesAPI_animChanged(string newAnimation, BoneMapper mapper)
		{
			if (newAnimation.StartsWith("com.Segtendo.Splatoon_Emotes"))
			{
				newAnimation = newAnimation.Split("__")[1];
			}
		}

		public void ImportAnimation(AnimationClip[] primaryClips, AnimationClip[] secondaryClips, bool sync, string customName, bool cantMove, bool thirdPerson)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Expected O, but got Unknown
			CustomEmoteParams val = new CustomEmoteParams();
			val.primaryAnimationClips = primaryClips;
			val.secondaryAnimationClips = secondaryClips;
			val.audioLoops = true;
			val.primaryAudioClips = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("splat2win.ogg") };
			val.secondaryAudioClips = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("splat2win_loop.ogg") };
			val.primaryDMCAFreeAudioClips = null;
			val.secondaryDMCAFreeAudioClips = null;
			val.visible = true;
			val.syncAnim = sync;
			val.syncAudio = sync;
			val.startPref = -1;
			val.joinPref = -1;
			val.joinSpots = null;
			val.internalName = customName;
			val.lockType = (LockType)1;
			val.willGetClaimedByDMCA = false;
			val.audioLevel = 0.3f;
			val.rootBonesToIgnore = null;
			val.soloBonesToIgnore = null;
			val.stopWhenMove = cantMove;
			val.thirdPerson = thirdPerson;
			val.displayName = customName;
			EmoteImporter.ImportEmote(val);
			CustomEmotesAPI.animChanged += new AnimationChanged(CustomEmotesAPI_animChanged);
		}
	}
}
namespace CustomEmotesAPI_Template_Mod
{
	internal static class Assets
	{
		internal static readonly List<AssetBundle> AssetBundles = new List<AssetBundle>();

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

		internal static void LoadAssetBundlesFromFolder(string folderName)
		{
			folderName = Path.Combine(Path.GetDirectoryName(Splatoon_Emotes.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)));
			}
		}

		internal static T Load<T>(string assetName) where T : Object
		{
			try
			{
				assetName = assetName.ToLowerInvariant();
				if (assetName.Contains(":"))
				{
					string[] array = assetName.Split(':');
					assetName = array[1].ToLowerInvariant();
				}
				if (assetName.StartsWith("assets/"))
				{
					assetName = assetName.Remove(0, "assets/".Length);
				}
				int index = AssetIndices[assetName];
				return AssetBundles[index].LoadAsset<T>("assets/" + assetName);
			}
			catch (Exception arg)
			{
				DebugClass.Log((object)$"Couldn't load asset [{assetName}] reason: {arg}");
				return default(T);
			}
		}
	}
}