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+f1935648ecdfb39c9dba13d9ebf294b66d455d5b")]
[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.jkr.jkr_emotes", "jkr_emotes", "1.0.3")]
public class ExampleEmoteMod : BaseUnityPlugin
{
public const string PluginGUID = "com.jkr.jkr_emotes";
public const string PluginName = "jkr_emotes";
public const string PluginVersion = "1.0.3";
public static ExampleEmoteMod instance;
public static PluginInfo PInfo { get; private set; }
public void Awake()
{
instance = this;
PInfo = ((BaseUnityPlugin)this).Info;
Assets.LoadAssetBundlesFromFolder("assetbundles");
AnimationClip[] primaryClips = (AnimationClip[])(object)new AnimationClip[4]
{
Assets.Load<AnimationClip>("jkrdances/Helltaker A.anim"),
Assets.Load<AnimationClip>("jkrdances/Helltaker B.anim"),
Assets.Load<AnimationClip>("jkrdances/Helltaker C.anim"),
Assets.Load<AnimationClip>("jkrdances/Helltaker D.anim")
};
AudioClip[] primaryAudioClips = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Helltaker.ogg") };
AudioClip[] array = (AudioClip[])(object)new AudioClip[3]
{
Assets.Load<AudioClip>("jkrdances/Persona 5 Victory.ogg"),
Assets.Load<AudioClip>("jkrdances/Persona 3 After the Battle"),
Assets.Load<AudioClip>("jkrdances/Persona 4 Results.ogg")
};
AnimationClip[] primaryClips2 = (AnimationClip[])(object)new AnimationClip[4]
{
Assets.Load<AnimationClip>("jkrdances/What Makes You Beautiful A.anim"),
Assets.Load<AnimationClip>("jkrdances/What Makes You Beautiful B.anim"),
Assets.Load<AnimationClip>("jkrdances/What Makes You Beautiful C.anim"),
Assets.Load<AnimationClip>("jkrdances/What Makes You Beautiful D.anim")
};
AudioClip[] primaryAudioClips2 = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/What Makes You Beautiful.ogg") };
AnimationClip[] primaryClips3 = (AnimationClip[])(object)new AnimationClip[2]
{
Assets.Load<AnimationClip>("jkrdances/Mary On A Cross A.anim"),
Assets.Load<AnimationClip>("jkrdances/Mary On A Cross B.anim")
};
AudioClip[] primaryAudioClips3 = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Mary On a Cross.ogg") };
AnimationClip[] primaryClips4 = (AnimationClip[])(object)new AnimationClip[2]
{
Assets.Load<AnimationClip>("jkrdances/Shake it Off A.anim"),
Assets.Load<AnimationClip>("jkrdances/Shake it Off B.anim")
};
AudioClip[] primaryAudioClips4 = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Shake it Off.ogg") };
AnimationClip[] primaryClips5 = (AnimationClip[])(object)new AnimationClip[3]
{
Assets.Load<AnimationClip>("jkrdances/NumberOne A.anim"),
Assets.Load<AnimationClip>("jkrdances/NumberOne B.anim"),
Assets.Load<AnimationClip>("jkrdances/NumberOne C.anim")
};
AudioClip[] primaryAudioClips5 = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/We Are Number One.ogg") };
AnimationClip[] primaryClips6 = (AnimationClip[])(object)new AnimationClip[2]
{
Assets.Load<AnimationClip>("jkrdances/PaPa TuTu WaWa A.anim"),
Assets.Load<AnimationClip>("jkrdances/PaPa TuTu WaWa B.anim")
};
AudioClip[] primaryAudioClips6 = (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/PaPa Tutu WaWa.ogg") };
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Jojo Pose.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Jojo Pose.ogg") }, sync: true, "Jojo Posa", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: true, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Baka Mitai.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Baka Mitai.ogg") }, sync: true, "Dame Da Ne", dmca: true, thirdPerson: false, (LockType)3, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
(HumanBodyBones)2,
(HumanBodyBones)1
}, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
default(HumanBodyBones),
(HumanBodyBones)7
});
ImportAnimation1(LocalTransforms: true, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Believer.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Believer.ogg") }, sync: true, "Believer", dmca: true, thirdPerson: false, (LockType)3, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
(HumanBodyBones)2,
(HumanBodyBones)1
}, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
default(HumanBodyBones),
(HumanBodyBones)7
});
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Crab Ravee.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Crab Ravee.ogg") }, sync: true, "Crab Rave", dmca: true, thirdPerson: false, (LockType)0);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Cupid.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Cupid.ogg") }, sync: true, "Cupid", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Dancin.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Dancin.ogg") }, sync: true, "Dancin", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Drop it.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Drop it.ogg") }, sync: true, "Drop it", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: true, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Im Just a Bad Guy.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Im Just a Bad Guy.ogg") }, sync: false, "Im Just a Bad Guy", dmca: true, thirdPerson: false, (LockType)3, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
(HumanBodyBones)2,
(HumanBodyBones)1
}, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
default(HumanBodyBones),
(HumanBodyBones)7
});
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Mass Destruction.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Mass Destruction.ogg") }, sync: false, "Mass Destruction", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Omae Wa Mou.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Omae Wa Mou.ogg") }, sync: true, "Omae Wa Mou", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Paper Planes B.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Paper Planes.ogg") }, sync: true, "Paper Planes", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Rappelt In Karton.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Rappelt In Karton.ogg") }, sync: true, "Rappelt In Karton", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Renai Circulation.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Renai Circulation.ogg") }, sync: true, "Renai Circulation", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Sad Cat B.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Sad Cat.ogg") }, sync: true, "Sad Cat", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Say So.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Say So.ogg") }, sync: true, "Say So", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Shape Of You.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Shape Of You.ogg") }, sync: true, "Shape Of You", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/The Ketchup Song.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/The Ketchup Song.ogg") }, sync: true, "The Ketchup Song", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Whistle.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Whistle.ogg") }, sync: true, "Whistle", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Beggin You C.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Beggin You E.ogg") }, sync: true, "Im Beggin", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Coffin Dance.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Coffin Dance.ogg") }, sync: true, "Coffin Dance", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: true, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Sad Walk.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Sad Walk.ogg") }, sync: true, "Sad Walking", dmca: true, thirdPerson: false, (LockType)1, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
(HumanBodyBones)2,
(HumanBodyBones)1
}, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
default(HumanBodyBones),
(HumanBodyBones)7
});
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Slickback.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Slickback.ogg") }, sync: true, "Slickback", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Standing Here.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Standing Here.ogg") }, sync: true, "Standing Here", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Bling Bang Bang Born.anim") }, null, looping: true, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Bling Bang Bang Born.ogg") }, sync: true, "Bling Bang Bang Born", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Bad Guy.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Bad Guy.ogg") }, sync: true, "Bad Guy", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Let's Groove.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Let's Groove.ogg") }, sync: true, "Let's Groove", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Stay B.anim") }, null, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Stay.ogg") }, sync: true, "Stay", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, primaryClips, null, looping: false, primaryAudioClips, sync: true, "Helltaker", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Cloud Victory B.anim") }, (AnimationClip[])(object)new AnimationClip[1] { Assets.Load<AnimationClip>("jkrdances/Cloud Victory B Idle.anim") }, looping: false, (AudioClip[])(object)new AudioClip[1] { Assets.Load<AudioClip>("jkrdances/Cloud Victory B.ogg") }, sync: true, "Cloud Victory", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, primaryClips2, null, looping: false, primaryAudioClips2, sync: true, "What Makes You Beautiful", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: true, primaryClips3, null, looping: false, primaryAudioClips3, sync: true, "Mary On A Cross", dmca: true, thirdPerson: false, (LockType)1, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
(HumanBodyBones)2,
(HumanBodyBones)1
}, (HumanBodyBones[])(object)new HumanBodyBones[2]
{
default(HumanBodyBones),
(HumanBodyBones)7
});
ImportAnimation1(LocalTransforms: false, primaryClips4, null, looping: false, primaryAudioClips4, sync: true, "Shake It Off", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, primaryClips5, null, looping: false, primaryAudioClips5, sync: true, "We Are Number One", dmca: true, thirdPerson: false, (LockType)1);
ImportAnimation1(LocalTransforms: false, primaryClips6, null, looping: false, primaryAudioClips6, sync: true, "PaPa TuTu WaWa", dmca: true, thirdPerson: false, (LockType)1);
}
public void ImportAnimation1(bool LocalTransforms, AnimationClip[] primaryClips, AnimationClip[] secondaryClips, bool looping, AudioClip[] primaryAudioClips, bool sync, string customName, bool dmca, bool thirdPerson, LockType lockType, HumanBodyBones[] bonesToIgnore = null, HumanBodyBones[] soloBonesToIgnore = null)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
CustomEmoteParams val = new CustomEmoteParams();
val.primaryAnimationClips = primaryClips;
val.secondaryAnimationClips = secondaryClips;
val.audioLoops = looping;
val.primaryAudioClips = primaryAudioClips;
val.secondaryAudioClips = null;
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 = "";
val.lockType = lockType;
val.willGetClaimedByDMCA = dmca;
val.audioLevel = 0.3f;
val.rootBonesToIgnore = bonesToIgnore;
val.soloBonesToIgnore = soloBonesToIgnore;
val.thirdPerson = thirdPerson;
val.displayName = customName;
val.useLocalTransforms = LocalTransforms;
EmoteImporter.ImportEmote(val);
}
}
}
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(ExampleEmoteMod.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);
}
}
}
}