Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of CustomEmotesAPI v2.11.0
CustomEmotesAPI.dll
Decompiled 5 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; 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 System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using Generics.Dynamics; using KinematicCharacterController; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.ConVar; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Animations; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("CustomEmotesAPI")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CustomEmotesAPI")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("7ea1c941-92dd-4435-a3ac-87b885484c2a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Ak.Wwise.Api.WAAPI")] [assembly: IgnoresAccessChecksTo("AK.Wwise.Unity.API")] [assembly: IgnoresAccessChecksTo("AK.Wwise.Unity.API.WwiseTypes")] [assembly: IgnoresAccessChecksTo("AK.Wwise.Unity.MonoBehaviour")] [assembly: IgnoresAccessChecksTo("AK.Wwise.Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("com.unity.multiplayer-hlapi.Runtime")] [assembly: IgnoresAccessChecksTo("Grumpy")] [assembly: IgnoresAccessChecksTo("HGCSharpUtils")] [assembly: IgnoresAccessChecksTo("HGUnityUtils")] [assembly: IgnoresAccessChecksTo("KinematicCharacterController")] [assembly: IgnoresAccessChecksTo("LegacyResourcesAPI")] [assembly: IgnoresAccessChecksTo("Newtonsoft.Json")] [assembly: IgnoresAccessChecksTo("Rewired_Core")] [assembly: IgnoresAccessChecksTo("Rewired_CSharp")] [assembly: IgnoresAccessChecksTo("RoR2")] [assembly: IgnoresAccessChecksTo("SimpleJSON")] [assembly: IgnoresAccessChecksTo("Unity.Addressables")] [assembly: IgnoresAccessChecksTo("Unity.ResourceManager")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] internal static class AnimationReplacements { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__1_0; public static hook_Init <>9__6_0; internal void <RunAll>b__1_0(orig_Awake orig, HUD self) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown orig.Invoke(self); g = Object.Instantiate<GameObject>(Assets.Load<GameObject>("@CustomEmotesAPI_customemotespackage:assets/emotewheel/emotewheel.prefab")); TextMeshProUGUI[] componentsInChildren = g.GetComponentsInChildren<TextMeshProUGUI>(); foreach (TextMeshProUGUI val in componentsInChildren) { TextMeshProUGUI targetText = self.moneyText.targetText; ((TMP_Text)val).font = ((TMP_Text)targetText).font; ((TMP_Text)val).fontMaterial = ((TMP_Text)targetText).fontMaterial; ((TMP_Text)val).fontSharedMaterial = ((TMP_Text)targetText).fontSharedMaterial; } g.transform.SetParent(self.mainContainer.transform); g.transform.localPosition = new Vector3(0f, 0f, 0f); EmoteWheel emoteWheel = g.AddComponent<EmoteWheel>(); Transform[] componentsInChildren2 = g.GetComponentsInChildren<Transform>(); foreach (Transform val2 in componentsInChildren2) { if (((Object)((Component)val2).gameObject).name.StartsWith("Emote")) { emoteWheel.gameObjects.Add(((Component)val2).gameObject); } if (((Object)((Component)val2).gameObject).name.StartsWith("MousePos")) { emoteWheel.text = ((Component)val2).gameObject; } if (((Object)((Component)val2).gameObject).name == "Center") { emoteWheel.joy = ((Component)val2).gameObject.GetComponent<Image>(); } if (((Object)((Component)val2).gameObject).name == "CurrentEmote") { EmoteWheel.dontPlayButton = ((Component)val2).gameObject; } } if (CustomEmotesAPI.audioContainers.Count != 0) { return; } GameObject val3 = new GameObject(); ((Object)val3).name = "Audio Container Holder"; Object.DontDestroyOnLoad((Object)(object)val3); foreach (string[] startEvent in BoneMapper.startEvents) { GameObject val4 = new GameObject(); if (startEvent[0] != "") { ((Object)val4).name = startEvent[0] + "_AudioContainer"; } AudioContainer audioContainer = val4.AddComponent<AudioContainer>(); val4.transform.SetParent(val3.transform); CustomEmotesAPI.audioContainers.Add(val4); } } internal void <ChangeAnims>b__6_0(orig_Init orig) { //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Unknown result type (might be due to invalid IL or missing references) //IL_0ed1: Unknown result type (might be due to invalid IL or missing references) //IL_0ee4: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(); if (setup) { return; } setup = true; ApplyAnimationStuff(Survivors.Croco, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/acrid.prefab"); Survivors.Croco.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.9f; ApplyAnimationStuff(Survivors.Captain, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/captain.prefab"); Survivors.Captain.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.1f; ApplyAnimationStuff(Survivors.Loader, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/loader.prefab"); Survivors.Loader.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.2f; ApplyAnimationStuff(Survivors.Merc, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/merc.prefab"); Survivors.Merc.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 0.95f; ApplyAnimationStuff(Survivors.Toolbot, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/mult1.prefab"); Survivors.Toolbot.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.5f; ApplyAnimationStuff(Survivors.Treebot, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/rex.prefab"); ApplyAnimationStuff(Survivors.Bandit2, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/bandit.prefab"); ApplyAnimationStuff(SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion()), "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/voidsurvivor.prefab"); SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion()).bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 0.85f; ApplyAnimationStuff(SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerBody.prefab").WaitForCompletion()), "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/railgunner.prefab"); SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerBody.prefab").WaitForCompletion()).bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.05f; ApplyAnimationStuff(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Heretic/HereticBody.prefab").WaitForCompletion(), "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/heretricburried.prefab", 3); EnemyArmatures(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { switch (((Object)allSurvivorDef.bodyPrefab).name) { case "EnforcerBody": if (Settings.Enforcer.Value) { GameObject val5 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/enforcer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val5); val5.GetComponentInChildren<BoneMapper>().scale = 1.2f; } break; case "NemesisEnforcerBody": if (Settings.Enforcer.Value) { GameObject rigToAnimate18 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/nemforcer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate18); } break; case "GnomeChefBody": if (Settings.Chef.Value) { GameObject rigToAnimate23 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/chef.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate23, jank: true); } break; case "HolomancerBody": if (Settings.Holomancer.Value) { GameObject rigToAnimate14 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/holomancer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate14); } break; case "SettBody": if (Settings.Sett.Value) { GameObject rigToAnimate2 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Sett.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate2); } break; case "TracerBody": if (Settings.Tracer.Value) { GameObject rigToAnimate20 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/imalreadytracer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate20); } break; case "HenryBody": if (Settings.Henry.Value) { GameObject rigToAnimate16 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/henry.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate16); } break; case "AurelionSolBody": if (Settings.SolSupport.Value) { GameObject rigToAnimate11 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/solreordered4.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate11); } break; case "Katarina": if (Settings.Katarina.Value) { GameObject rigToAnimate4 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/katarina.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate4); } break; case "MinerBody": if (Settings.Miner.Value) { GameObject rigToAnimate25 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/miner.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate25, jank: true); } break; case "PhoenixBody": if (Settings.Phoenix.Value) { GameObject rigToAnimate21 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/ppwright.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate21); } break; case "ScoutBody": { if (!Settings.Scout.Value) { break; } bool flag = false; SkinnedMeshRenderer[] componentsInChildren = allSurvivorDef.bodyPrefab.GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val6 in componentsInChildren) { if (((Object)val6).name == "meshScout") { flag = true; break; } } if (!flag) { GameObject rigToAnimate13 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/scout.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate13); } break; } case "JinxBody": if (Settings.Jinx.Value) { GameObject rigToAnimate9 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/jinx.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate9); } break; case "TF2SollyBody": if (Settings.Soldier.Value) { GameObject rigToAnimate6 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/soldier.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate6); } break; case "DragonScavengerBody": if (Settings.Scavenger.Value) { GameObject rigToAnimate3 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/PlayableScavenger.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate3); } break; case "GokuBody": if (Settings.Goku.Value) { GameObject rigToAnimate26 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/goku1.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate26); } break; case "TrunksBody": if (Settings.Trunks.Value) { GameObject rigToAnimate24 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/trunks.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate24); } break; case "VegetaBody": if (Settings.Vegeta.Value) { GameObject rigToAnimate22 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/vegeta.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate22); } break; case "NemCommandoBody": if (Settings.Nemmando.Value) { GameObject val8 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/nemmando9.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val8); val8.GetComponent<BoneMapper>().scale = 1f; } break; case "AmpBody": if (Settings.Amp.Value) { GameObject rigToAnimate19 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/amp2.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate19); } break; case "PathfinderBody": if (Settings.Pathfinder.Value) { GameObject rigToAnimate17 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/pathfinder1.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate17); } break; case "TF2MedicBody": if (Settings.TF2Medic.Value) { GameObject rigToAnimate15 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/medic3.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate15); } break; case "Executioner2Body": if (Settings.Executioner.Value) { GameObject val7 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/executioner4.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val7); val7.GetComponent<BoneMapper>().scale = 1f; } break; case "SpearmanBody": if (Settings.Spearman.Value) { GameObject rigToAnimate12 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/SpearManEmoteSkeleton.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate12); } break; case "VoidJailerSurvivor": if (Settings.VoidJailer.Value) { GameObject rigToAnimate10 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/voidjailer_emoteskeleton.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate10); } break; case "RobDriverBody": if (Settings.Baby.Value) { GameObject rigToAnimate8 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/baby.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate8); } break; case "RobHunkBody": if (Settings.Baby.Value) { GameObject rigToAnimate7 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Hunk.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate7); } break; case "RobRavagerBody": if (Settings.Baby.Value) { GameObject rigToAnimate5 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/animRedGuy.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate5); } break; case "BidenBody": if (Settings.Biden.Value) { GameObject val4 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzaupdate:Assets/test/biden.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val4); val4.GetComponentInChildren<BoneMapper>().scale = 0.85f; } break; case "ChirrBody": if (Settings.Chirr.Value) { GameObject val3 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzaupdate:Assets/test/chrr.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val3); val3.GetComponentInChildren<BoneMapper>().scale = 2f; Transform transform = val3.transform; transform.localScale *= 5f; Transform transform2 = val3.transform; transform2.localPosition += new Vector3(0f, 1f, 0f); } break; case "NemMercBody": if (Settings.Nemmerc.Value) { GameObject rigToAnimate = Assets.Load<GameObject>("@CustomEmotesAPI_brynzaupdate:Assets/test/nemmerc.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate); } break; case "ChefBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/CHEF2.prefab")); break; case "FalseSonBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/CorrectSon.prefab")); break; case "SeekerBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Seeker.prefab")); break; case "MageBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/arti.prefab")); break; case "CommandoBody": { GameObject val2 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/commando.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val2); val2.GetComponentInChildren<BoneMapper>().scale = 0.85f; break; } case "HuntressBody": { GameObject val = Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/huntress.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val); val.GetComponentInChildren<BoneMapper>().scale = 0.9f; break; } case "EngiBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/engi.prefab")); break; } } } } internal static GameObject g; internal static bool setup = false; internal static List<BoneMapper> allMappers = new List<BoneMapper>(); internal static void RunAll() { //IL_001b: 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_0026: Expected O, but got Unknown ChangeAnims(); object obj = <>c.<>9__1_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, HUD self) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown orig.Invoke(self); g = Object.Instantiate<GameObject>(Assets.Load<GameObject>("@CustomEmotesAPI_customemotespackage:assets/emotewheel/emotewheel.prefab")); TextMeshProUGUI[] componentsInChildren = g.GetComponentsInChildren<TextMeshProUGUI>(); foreach (TextMeshProUGUI val2 in componentsInChildren) { TextMeshProUGUI targetText = self.moneyText.targetText; ((TMP_Text)val2).font = ((TMP_Text)targetText).font; ((TMP_Text)val2).fontMaterial = ((TMP_Text)targetText).fontMaterial; ((TMP_Text)val2).fontSharedMaterial = ((TMP_Text)targetText).fontSharedMaterial; } g.transform.SetParent(self.mainContainer.transform); g.transform.localPosition = new Vector3(0f, 0f, 0f); EmoteWheel emoteWheel = g.AddComponent<EmoteWheel>(); Transform[] componentsInChildren2 = g.GetComponentsInChildren<Transform>(); foreach (Transform val3 in componentsInChildren2) { if (((Object)((Component)val3).gameObject).name.StartsWith("Emote")) { emoteWheel.gameObjects.Add(((Component)val3).gameObject); } if (((Object)((Component)val3).gameObject).name.StartsWith("MousePos")) { emoteWheel.text = ((Component)val3).gameObject; } if (((Object)((Component)val3).gameObject).name == "Center") { emoteWheel.joy = ((Component)val3).gameObject.GetComponent<Image>(); } if (((Object)((Component)val3).gameObject).name == "CurrentEmote") { EmoteWheel.dontPlayButton = ((Component)val3).gameObject; } } if (CustomEmotesAPI.audioContainers.Count == 0) { GameObject val4 = new GameObject(); ((Object)val4).name = "Audio Container Holder"; Object.DontDestroyOnLoad((Object)(object)val4); foreach (string[] startEvent in BoneMapper.startEvents) { GameObject val5 = new GameObject(); if (startEvent[0] != "") { ((Object)val5).name = startEvent[0] + "_AudioContainer"; } AudioContainer audioContainer = val5.AddComponent<AudioContainer>(); val5.transform.SetParent(val4.transform); CustomEmotesAPI.audioContainers.Add(val5); } } }; <>c.<>9__1_0 = val; obj = (object)val; } HUD.Awake += (hook_Awake)obj; } internal static void EnemyArmatures() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_092c: Unknown result type (might be due to invalid IL or missing references) Import("RoR2/Base/Brother/BrotherBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/brother.prefab"); Import("RoR2/Base/Brother/BrotherHurtBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/brotherhurt.prefab"); Import("RoR2/Base/ClayBruiser/ClayBruiserBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/templar.prefab"); GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Beetle/BeetleBody.prefab").WaitForCompletion(); if (val.GetComponentInChildren<SkinnedMeshRenderer>().bones.Length == 0) { List<Transform> list = new List<Transform>(); Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>(); foreach (Transform val2 in componentsInChildren) { if (!((Object)val2).name.Contains("Hurtbox") && !((Object)val2).name.Contains("BeetleBody") && !((Object)val2).name.Contains("Mesh") && !((Object)val2).name.Contains("mdl")) { list.Add(val2); } } Transform value = list[14]; list[14] = list[11]; list[11] = value; value = list[15]; list[15] = list[12]; list[12] = value; value = list[16]; list[16] = list[13]; list[13] = value; SkinnedMeshRenderer[] componentsInChildren2 = val.GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val3 in componentsInChildren2) { val3.bones = list.ToArray(); } SkinnedMeshRenderer[] componentsInChildren3 = val.GetComponentsInChildren<SkinnedMeshRenderer>(); componentsInChildren3[0].sharedMesh = Assets.Load<Mesh>("@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/beetleMesh.mesh"); } Import("RoR2/Base/Beetle/BeetleBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/beetle_emoteskeleton.prefab"); Import("RoR2/DLC1/AcidLarva/AcidLarvaBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/AcidLarva1.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/AcidLarva/AcidLarvaBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 0.6f; Import("RoR2/Base/Titan/TitanGoldBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/Aurelionite.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Titan/TitanGoldBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 5.7f; Import("RoR2/Base/BeetleGuard/BeetleGuardBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/Beetle guard.prefab"); Import("RoR2/Base/BeetleQueen/BeetleQueen2Body.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/beetle queen1.prefab"); Import("RoR2/DLC1/ClayGrenadier/ClayGrenadierBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/claygrenadier.prefab"); Import("RoR2/Base/Bison/BisonBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/bison.prefab"); Import("RoR2/DLC1/FlyingVermin/FlyingVerminBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/flyingvermin1.prefab"); Import("RoR2/Base/Bell/BellBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/brass contraption2.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bell/BellBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .enableAnimatorOnDeath = false; Import("RoR2/Base/Vulture/VultureBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/Vulture_emoteskeleton.prefab").scale = 2f; Import("RoR2/DLC1/MajorAndMinorConstruct/MinorConstructBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/minorConstruct4.prefab"); Transform transform = ((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MinorConstructBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>()).transform; transform.localPosition += new Vector3(0f, 3f, 0f); Import("RoR2/DLC1/VoidJailer/VoidJailerBody.prefab", "@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/voidjailer2.prefab"); Import("RoR2/DLC1/Vermin/VerminBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/vermin1.prefab"); Import("RoR2/Base/LemurianBruiser/LemurianBruiserBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/elderlemurian.prefab").scale = 5f; Import("RoR2/DLC1/Gup/GupBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/gup.prefab"); Import("RoR2/DLC1/Gup/GeepBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/geep.prefab"); Import("RoR2/DLC1/Gup/GipBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/gip.prefab"); Import("RoR2/Base/GreaterWisp/GreaterWispBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/greaterwisp.prefab"); Import("RoR2/Base/HermitCrab/HermitCrabBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/hermitcrab.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/HermitCrab/HermitCrabBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 1.3f; Import("RoR2/Base/Imp/ImpBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/imp.prefab"); Import("RoR2/Base/Jellyfish/JellyfishBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/jellyfish.prefab"); Import("RoR2/Base/Lemurian/LemurianBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/lemurian.prefab").scale = 0.75f; Import("RoR2/Base/Wisp/WispBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/lesserwisp.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Wisp/WispBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 0.9f; Import("RoR2/Base/LunarExploder/LunarExploderBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/lunarexploder.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarExploder/LunarExploderBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 2f; Import("RoR2/Base/LunarGolem/LunarGolemBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/lunargolem.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarGolem/LunarGolemBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 5f; Import("RoR2/Base/LunarWisp/LunarWispBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/lunarwisp.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarWisp/LunarWispBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 2f; Import("RoR2/Base/MiniMushroom/MiniMushroomBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/minimushroom.prefab"); Import("RoR2/Base/Parent/ParentBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/Parent1.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Parent/ParentBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 5f; Import("RoR2/Base/RoboBallBoss/RoboBallMiniBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/solusprobe.prefab"); Import("RoR2/Base/RoboBallBoss/RoboBallBossBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/soluscontrolunit.prefab"); Import("RoR2/Base/RoboBallBoss/SuperRoboBallBossBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/alloyworshipunit.prefab"); Import("RoR2/Base/Golem/GolemBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/stonegolem.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/GolemBody.prefab").WaitForCompletion().GetComponentInChildren<PrintController>() .maxPrintHeight = 15f; Transform transform2 = ((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Golem/GolemBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>()).transform; transform2.localPosition -= new Vector3(0f, 0.8f, 0f); Import("RoR2/DLC1/VoidBarnacle/VoidBarnacleBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidbarnacle.prefab"); Import("RoR2/Base/Nullifier/NullifierBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidreaver.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Nullifier/NullifierBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 4.8f; Import("RoR2/Base/Grandparent/GrandParentBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/grandparent.prefab"); Import("RoR2/Base/ImpBoss/ImpBossBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/impoverlord.prefab"); Import("RoR2/DLC1/EliteVoid/VoidInfestorBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidinfestor.prefab"); Import("RoR2/Base/Scav/ScavBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/Scavenger.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Scav/ScavBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 3.8f; Import("RoR2/Base/Titan/TitanBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/stonetitan.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Titan/TitanBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 5.7f; Import("RoR2/DLC1/VoidMegaCrab/VoidMegaCrabBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/pussydevastator.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 7f; Import("RoR2/DLC1/MajorAndMinorConstruct/MegaConstructBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/megaconstruct.prefab"); Import("RoR2/Base/Vagrant/VagrantBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/vagrant.prefab"); Import("RoR2/Base/MagmaWorm/MagmaWormBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/worm1.prefab"); Import("RoR2/Base/ElectricWorm/ElectricWormBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/worm2.prefab"); Import("RoR2/Base/Gravekeeper/GravekeeperBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/grovetender.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Gravekeeper/GravekeeperBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 5.9f; Import("RoR2/Base/ClayBoss/ClayBossBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/dunestrider.prefab"); Transform transform3 = ((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ClayBoss/ClayBossBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>()).transform; transform3.localPosition += new Vector3(0f, 5f, 0f); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ClayBoss/ClayBossBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 10f; Import("RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase1.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidling1.prefab"); Import("RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase2.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidling2.prefab"); Import("RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase3.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidling3.prefab"); Import("RoR2/Base/Engi/EngiWalkerTurretBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/walkingturret.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ClayBoss/ClayBossBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 0.9f; Import("RoR2/Base/Engi/EngiTurretBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/turret.prefab"); Import("RoR2/Base/Shopkeeper/ShopkeeperBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/newt.prefab"); Import("RoR2/Base/Drones/BackupDroneBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/backupdrone.prefab"); Import("RoR2/Base/Drones/Turret1Body.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/buyableturret.prefab").scale = 1f; Import("RoR2/DLC1/DroneCommander/DroneCommanderBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/dronecommander.prefab"); Import("RoR2/Base/Drones/EmergencyDroneBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/emergency.prefab"); Import("RoR2/Base/Drones/EquipmentDroneBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/equipmentdrone.prefab"); Import("RoR2/Base/Drones/FlameDroneBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/flamedrone.prefab"); Import("RoR2/Base/Drones/Drone1Body.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/gunnerdrone.prefab"); Import("RoR2/Base/Drones/Drone2Body.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/healdrone.prefab"); Import("RoR2/Base/Drones/MegaDroneBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/megadrone.prefab"); Import("RoR2/Base/Drones/MissileDroneBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/notenemies/missiledrone.prefab"); Import("RoR2/Base/Nullifier/NullifierAllyBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidreaverfrien.prefab"); Import("RoR2/Base/BeetleGland/BeetleGuardAllyBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/Beetle guardfrien.prefab"); Import("RoR2/DLC1/VoidJailer/VoidJailerAllyBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/voidjailer2frien.prefab"); Import("RoR2/DLC1/VoidMegaCrab/VoidMegaCrabAllyBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/pussydevastatorfrien.prefab"); Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidMegaCrab/VoidMegaCrabAllyBody.prefab").WaitForCompletion().GetComponentInChildren<BoneMapper>() .scale = 7f; Import("RoR2/Base/RoboBallBuddy/RoboBallGreenBuddyBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/solusprobefrien1.prefab"); Import("RoR2/Base/RoboBallBuddy/RoboBallRedBuddyBody.prefab", "@CustomEmotesAPI_enemyskeletons:assets/myprioritiesarestraightnt/enemies/solusprobefrien2.prefab"); Import("RoR2/DLC2/Child/ChildBody.prefab", "@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Child.prefab"); Import("RoR2/DLC2/Halcyonite/HalcyoniteBody.prefab", "@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Halcyonite1.prefab"); Import("RoR2/DLC2/Scorchling/ScorchlingBody.prefab", "@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Scorchling.prefab"); Import("RoR2/DLC3/DefectiveUnit/DefectiveUnitBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/defective.prefab"); Import("RoR2/DLC3/ExtractorUnit/ExtractorUnitBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/extractor.prefab"); Import("RoR2/DLC3/IronHauler/IronHaulerBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/ironHauler.prefab"); Import("RoR2/DLC3/SolusAmalgamator/SolusAmalgamatorBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/amalgamator.prefab"); Import("RoR2/DLC3/SolusHeart/SolusHeartBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/solusHeart.prefab"); Import("RoR2/DLC3/SolusWing/SolusWingBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/solusWing.prefab"); Import("RoR2/DLC3/Tanker/TankerBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/tanker.prefab"); Import("RoR2/DLC3/VultureHunter/VultureHunterBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/vultureBoss.prefab"); Import("RoR2/DLC3/WorkerUnit/WorkerUnitBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/worker.prefab"); Import("RoR2/DLC3/Drone Tech/DroneTechBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/droneTech.prefab"); Import("RoR2/DLC3/Drifter/DrifterBody.prefab", "@CustomEmotesAPI_dlc3emoteskeletons:assets/DLC3/drifter.prefab"); } public static void DebugBones(string resource, int pos = 0) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) StringBuilder stringBuilder = new StringBuilder(); GameObject val = Addressables.LoadAssetAsync<GameObject>((object)resource).WaitForCompletion(); stringBuilder.Append(((object)val).ToString() + "\n"); SkinnedMeshRenderer[] componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>(); stringBuilder.Append($"rendererererer: {componentsInChildren[pos]}\n"); stringBuilder.Append($"bone count: {componentsInChildren[pos].bones.Length}\n"); stringBuilder.Append($"mesh count: {componentsInChildren.Length}\n"); stringBuilder.Append("root bone: " + ((Object)componentsInChildren[pos].rootBone).name + "\n"); stringBuilder.Append(resource + ":\n"); if (componentsInChildren[pos].bones.Length == 0) { stringBuilder.Append("No bones"); } else { stringBuilder.Append("["); Transform[] bones = componentsInChildren[pos].bones; foreach (Transform val2 in bones) { stringBuilder.Append("'" + ((Object)val2).name + "', "); } stringBuilder.Remove(stringBuilder.Length - 2, 2); stringBuilder.Append("]"); } stringBuilder.Append("\n\n"); DebugClass.Log(stringBuilder.ToString()); } internal static BoneMapper Import(string prefab, string skeleton, bool hidemesh = true) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Assets.Load<GameObject>(skeleton).GetComponent<Animator>().runtimeAnimatorController = Object.Instantiate<GameObject>(Assets.Load<GameObject>("@CustomEmotesAPI_customemotespackage:assets/animationreplacements/commando.prefab")).GetComponent<Animator>().runtimeAnimatorController; return ApplyAnimationStuff(Addressables.LoadAssetAsync<GameObject>((object)prefab).WaitForCompletion(), Assets.Load<GameObject>(skeleton), 0, hidemesh, jank: false, revertBonePositions: true); } internal static void ChangeAnims() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__6_0; if (obj == null) { hook_Init val = delegate(orig_Init orig) { //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_0ec7: Unknown result type (might be due to invalid IL or missing references) //IL_0ed1: Unknown result type (might be due to invalid IL or missing references) //IL_0ee4: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(); if (!setup) { setup = true; ApplyAnimationStuff(Survivors.Croco, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/acrid.prefab"); Survivors.Croco.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.9f; ApplyAnimationStuff(Survivors.Captain, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/captain.prefab"); Survivors.Captain.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.1f; ApplyAnimationStuff(Survivors.Loader, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/loader.prefab"); Survivors.Loader.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.2f; ApplyAnimationStuff(Survivors.Merc, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/merc.prefab"); Survivors.Merc.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 0.95f; ApplyAnimationStuff(Survivors.Toolbot, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/mult1.prefab"); Survivors.Toolbot.bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.5f; ApplyAnimationStuff(Survivors.Treebot, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/rex.prefab"); ApplyAnimationStuff(Survivors.Bandit2, "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/bandit.prefab"); ApplyAnimationStuff(SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion()), "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/voidsurvivor.prefab"); SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSurvivor/VoidSurvivorBody.prefab").WaitForCompletion()).bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 0.85f; ApplyAnimationStuff(SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerBody.prefab").WaitForCompletion()), "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/railgunner.prefab"); SurvivorCatalog.FindSurvivorDefFromBody(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/Railgunner/RailgunnerBody.prefab").WaitForCompletion()).bodyPrefab.GetComponentInChildren<BoneMapper>().scale = 1.05f; ApplyAnimationStuff(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Heretic/HereticBody.prefab").WaitForCompletion(), "@CustomEmotesAPI_customemotespackage:assets/animationreplacements/heretricburried.prefab", 3); EnemyArmatures(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { switch (((Object)allSurvivorDef.bodyPrefab).name) { case "EnforcerBody": if (Settings.Enforcer.Value) { GameObject val6 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/enforcer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val6); val6.GetComponentInChildren<BoneMapper>().scale = 1.2f; } break; case "NemesisEnforcerBody": if (Settings.Enforcer.Value) { GameObject rigToAnimate18 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/nemforcer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate18); } break; case "GnomeChefBody": if (Settings.Chef.Value) { GameObject rigToAnimate23 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/chef.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate23, jank: true); } break; case "HolomancerBody": if (Settings.Holomancer.Value) { GameObject rigToAnimate14 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/holomancer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate14); } break; case "SettBody": if (Settings.Sett.Value) { GameObject rigToAnimate2 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Sett.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate2); } break; case "TracerBody": if (Settings.Tracer.Value) { GameObject rigToAnimate20 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/imalreadytracer.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate20); } break; case "HenryBody": if (Settings.Henry.Value) { GameObject rigToAnimate16 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/henry.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate16); } break; case "AurelionSolBody": if (Settings.SolSupport.Value) { GameObject rigToAnimate11 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/solreordered4.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate11); } break; case "Katarina": if (Settings.Katarina.Value) { GameObject rigToAnimate4 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/katarina.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate4); } break; case "MinerBody": if (Settings.Miner.Value) { GameObject rigToAnimate25 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/miner.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate25, jank: true); } break; case "PhoenixBody": if (Settings.Phoenix.Value) { GameObject rigToAnimate21 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/ppwright.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate21); } break; case "ScoutBody": if (Settings.Scout.Value) { bool flag = false; SkinnedMeshRenderer[] componentsInChildren = allSurvivorDef.bodyPrefab.GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val7 in componentsInChildren) { if (((Object)val7).name == "meshScout") { flag = true; break; } } if (!flag) { GameObject rigToAnimate13 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/scout.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate13); } } break; case "JinxBody": if (Settings.Jinx.Value) { GameObject rigToAnimate9 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/jinx.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate9); } break; case "TF2SollyBody": if (Settings.Soldier.Value) { GameObject rigToAnimate6 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/soldier.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate6); } break; case "DragonScavengerBody": if (Settings.Scavenger.Value) { GameObject rigToAnimate3 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/PlayableScavenger.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate3); } break; case "GokuBody": if (Settings.Goku.Value) { GameObject rigToAnimate26 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/goku1.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate26); } break; case "TrunksBody": if (Settings.Trunks.Value) { GameObject rigToAnimate24 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/trunks.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate24); } break; case "VegetaBody": if (Settings.Vegeta.Value) { GameObject rigToAnimate22 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/vegeta.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate22); } break; case "NemCommandoBody": if (Settings.Nemmando.Value) { GameObject val9 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/nemmando9.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val9); val9.GetComponent<BoneMapper>().scale = 1f; } break; case "AmpBody": if (Settings.Amp.Value) { GameObject rigToAnimate19 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/amp2.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate19); } break; case "PathfinderBody": if (Settings.Pathfinder.Value) { GameObject rigToAnimate17 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/pathfinder1.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate17); } break; case "TF2MedicBody": if (Settings.TF2Medic.Value) { GameObject rigToAnimate15 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/medic3.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate15); } break; case "Executioner2Body": if (Settings.Executioner.Value) { GameObject val8 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/executioner4.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val8); val8.GetComponent<BoneMapper>().scale = 1f; } break; case "SpearmanBody": if (Settings.Spearman.Value) { GameObject rigToAnimate12 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/SpearManEmoteSkeleton.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate12); } break; case "VoidJailerSurvivor": if (Settings.VoidJailer.Value) { GameObject rigToAnimate10 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/voidjailer_emoteskeleton.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate10); } break; case "RobDriverBody": if (Settings.Baby.Value) { GameObject rigToAnimate8 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/baby.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate8); } break; case "RobHunkBody": if (Settings.Baby.Value) { GameObject rigToAnimate7 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Hunk.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate7); } break; case "RobRavagerBody": if (Settings.Baby.Value) { GameObject rigToAnimate5 = Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/animRedGuy.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate5); } break; case "BidenBody": if (Settings.Biden.Value) { GameObject val5 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzaupdate:Assets/test/biden.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val5); val5.GetComponentInChildren<BoneMapper>().scale = 0.85f; } break; case "ChirrBody": if (Settings.Chirr.Value) { GameObject val4 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzaupdate:Assets/test/chrr.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val4); val4.GetComponentInChildren<BoneMapper>().scale = 2f; Transform transform = val4.transform; transform.localScale *= 5f; Transform transform2 = val4.transform; transform2.localPosition += new Vector3(0f, 1f, 0f); } break; case "NemMercBody": if (Settings.Nemmerc.Value) { GameObject rigToAnimate = Assets.Load<GameObject>("@CustomEmotesAPI_brynzaupdate:Assets/test/nemmerc.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, rigToAnimate); } break; case "ChefBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/CHEF2.prefab")); break; case "FalseSonBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/CorrectSon.prefab")); break; case "SeekerBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_fineilldoitmyself:assets/fineilldoitmyself/Seeker.prefab")); break; case "MageBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/arti.prefab")); break; case "CommandoBody": { GameObject val3 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/commando.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val3); val3.GetComponentInChildren<BoneMapper>().scale = 0.85f; break; } case "HuntressBody": { GameObject val2 = Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/huntress.prefab"); CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val2); val2.GetComponentInChildren<BoneMapper>().scale = 0.9f; break; } case "EngiBody": CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, Assets.Load<GameObject>("@CustomEmotesAPI_brynzapackage:Assets/test/engi.prefab")); break; } } } }; <>c.<>9__6_0 = val; obj = (object)val; } SurvivorCatalog.Init += (hook_Init)obj; } internal static void ApplyAnimationStuff(SurvivorDef index, string resource, int pos = 0) { ApplyAnimationStuff(index.bodyPrefab, resource, pos); } internal static void ApplyAnimationStuff(GameObject bodyPrefab, string resource, int pos = 0) { GameObject animcontroller = Assets.Load<GameObject>(resource); ApplyAnimationStuff(bodyPrefab, animcontroller, pos); } internal static BoneMapper ApplyAnimationStuff(GameObject bodyPrefab, GameObject animcontroller, int pos = 0, bool hidemeshes = true, bool jank = false, bool revertBonePositions = false) { //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) try { if (!animcontroller.GetComponentInChildren<Animator>().avatar.isHuman) { DebugClass.Log($"{animcontroller}'s avatar isn't humanoid, please fix it in unity!"); return null; } } catch (Exception arg) { DebugClass.Log($"Had issue checking if avatar was humanoid: {arg}"); throw; } try { if (hidemeshes) { SkinnedMeshRenderer[] componentsInChildren = animcontroller.GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer val in componentsInChildren) { val.sharedMesh = null; } MeshFilter[] componentsInChildren2 = animcontroller.GetComponentsInChildren<MeshFilter>(); foreach (MeshFilter val2 in componentsInChildren2) { val2.sharedMesh = null; } } } catch (Exception arg2) { DebugClass.Log($"Had trouble while hiding meshes: {arg2}"); throw; } Transform val3 = ((!Object.op_Implicit((Object)(object)bodyPrefab.GetComponent<ModelLocator>())) ? ((Component)bodyPrefab.GetComponentInChildren<Animator>()).transform : bodyPrefab.GetComponent<ModelLocator>().modelTransform); try { animcontroller.transform.parent = val3; animcontroller.transform.localPosition = Vector3.zero; animcontroller.transform.localEulerAngles = Vector3.zero; animcontroller.transform.localScale = Vector3.one; } catch (Exception arg3) { DebugClass.Log($"Had trouble setting emote skeletons parent: {arg3}"); throw; } SkinnedMeshRenderer val4; try { val4 = animcontroller.GetComponentsInChildren<SkinnedMeshRenderer>()[pos]; } catch (Exception arg4) { DebugClass.Log($"Had trouble setting emote skeletons SkinnedMeshRenderer: {arg4}"); throw; } SkinnedMeshRenderer val5; try { val5 = ((Component)val3).GetComponentsInChildren<SkinnedMeshRenderer>()[pos]; } catch (Exception arg5) { DebugClass.Log($"Had trouble setting the original skeleton's skinned mesh renderer: {arg5}"); throw; } try { int num = 0; while (true) { Transform[] bones = val4.bones; foreach (Transform val6 in bones) { Transform[] bones2 = val5.bones; foreach (Transform val7 in bones2) { if (((Object)val6).name == ((Object)val7).name) { num++; } } } if (num < 1 && pos + 1 < ((Component)val3).GetComponentsInChildren<SkinnedMeshRenderer>().Length) { pos++; val5 = ((Component)val3).GetComponentsInChildren<SkinnedMeshRenderer>()[pos]; num = 0; continue; } break; } } catch (Exception arg6) { DebugClass.Log($"Had issue while checking matching bones: {arg6}"); throw; } BoneMapper boneMapper = animcontroller.AddComponent<BoneMapper>(); try { boneMapper.jank = jank; boneMapper.smr1 = val4; boneMapper.smr2 = val5; boneMapper.bodyPrefab = bodyPrefab; boneMapper.a1 = ((Component)val3).GetComponentInChildren<Animator>(); boneMapper.a2 = animcontroller.GetComponentInChildren<Animator>(); } catch (Exception arg7) { DebugClass.Log($"Had issue when setting up BoneMapper settings 1: {arg7}"); throw; } try { GameObject val8 = Object.Instantiate<GameObject>(Assets.Load<GameObject>("@CustomEmotesAPI_customemotespackage:assets/animationreplacements/bandit.prefab")); GameObject val9 = Object.Instantiate<GameObject>(animcontroller); float num2 = Vector3.Distance(val8.GetComponentInChildren<Animator>().GetBoneTransform((HumanBodyBones)10).position, val8.GetComponentInChildren<Animator>().GetBoneTransform((HumanBodyBones)5).position); float num3 = Vector3.Distance(val9.GetComponentInChildren<Animator>().GetBoneTransform((HumanBodyBones)10).position, val9.GetComponentInChildren<Animator>().GetBoneTransform((HumanBodyBones)5).position); Object.DestroyImmediate((Object)(object)val8); Object.DestroyImmediate((Object)(object)val9); boneMapper.scale = num3 / num2; boneMapper.h = bodyPrefab.GetComponentInChildren<HealthComponent>(); boneMapper.model = ((Component)val3).gameObject; } catch (Exception arg8) { DebugClass.Log($"Had issue when setting up BoneMapper settings 2: {arg8}"); GameObject val10 = Object.Instantiate<GameObject>(Assets.Load<GameObject>("@CustomEmotesAPI_customemotespackage:assets/animationreplacements/bandit.prefab")); boneMapper.scale = Vector3.Distance(val10.GetComponentInChildren<Animator>().GetBoneTransform((HumanBodyBones)10).position, val10.GetComponentInChildren<Animator>().GetBoneTransform((HumanBodyBones)5).position); Object.DestroyImmediate((Object)(object)val10); boneMapper.h = bodyPrefab.GetComponentInChildren<HealthComponent>(); boneMapper.model = ((Component)val3).gameObject; } boneMapper.revertTransform = revertBonePositions; allMappers.Add(boneMapper); return boneMapper; } } public struct JoinSpot { public string name; public Vector3 position; public Vector3 rotation; public Vector3 scale; public JoinSpot(string _name, Vector3 _position, Vector3 _rotation, Vector3 _scale) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) name = _name; position = _position; rotation = _rotation; scale = _scale; } public JoinSpot(string _name, Vector3 _position) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) name = _name; position = _position; rotation = Vector3.zero; scale = Vector3.one; } } public class CustomAnimationClip : MonoBehaviour { public AnimationClip[] clip; public AnimationClip[] secondaryClip; public bool looping; public string wwiseEvent; public bool syncronizeAudio; public List<HumanBodyBones> soloIgnoredBones; public List<HumanBodyBones> rootIgnoredBones; public bool dimAudioWhenClose; public bool stopOnAttack; public bool stopOnMove; public bool visibility; public int startPref; public int joinPref; public JoinSpot[] joinSpots; public bool useSafePositionReset; public string customName; public Action<BoneMapper> customPostEventCodeSync; public Action<BoneMapper> customPostEventCodeNoSync; public bool syncronizeAnimation; public int syncPos; public static List<float> syncTimer = new List<float>(); public static List<int> syncPlayerCount = new List<int>(); public static List<List<bool>> uniqueAnimations = new List<List<bool>>(); public bool vulnerableEmote = false; internal CustomAnimationClip(AnimationClip[] _clip, bool _loop, string[] _wwiseEventName = null, string[] _wwiseStopEvent = null, HumanBodyBones[] rootBonesToIgnore = null, HumanBodyBones[] soloBonesToIgnore = null, AnimationClip[] _secondaryClip = null, bool dimWhenClose = false, bool stopWhenMove = false, bool stopWhenAttack = false, bool visible = true, bool syncAnim = false, bool syncAudio = false, int startPreference = -1, int joinPreference = -1, JoinSpot[] _joinSpots = null, bool safePositionReset = false, string customName = "NO_CUSTOM_NAME", Action<BoneMapper> _customPostEventCodeSync = null, Action<BoneMapper> _customPostEventCodeNoSync = null) { if (rootBonesToIgnore == null) { rootBonesToIgnore = (HumanBodyBones[])(object)new HumanBodyBones[0]; } if (soloBonesToIgnore == null) { soloBonesToIgnore = (HumanBodyBones[])(object)new HumanBodyBones[0]; } clip = _clip; secondaryClip = _secondaryClip; looping = _loop; dimAudioWhenClose = dimWhenClose; stopOnAttack = stopWhenAttack; stopOnMove = stopWhenMove; visibility = visible; joinPref = joinPreference; startPref = startPreference; customPostEventCodeSync = _customPostEventCodeSync; customPostEventCodeNoSync = _customPostEventCodeNoSync; string[] item; string[] item2; if (_wwiseEventName == null) { item = new string[1] { "" }; item2 = new string[1] { "" }; } else { item = _wwiseEventName; item2 = _wwiseStopEvent; } BoneMapper.stopEvents.Add(item2); BoneMapper.startEvents.Add(item); if (soloBonesToIgnore.Length != 0) { soloIgnoredBones = new List<HumanBodyBones>(soloBonesToIgnore); } else { soloIgnoredBones = new List<HumanBodyBones>(); } if (rootBonesToIgnore.Length != 0) { rootIgnoredBones = new List<HumanBodyBones>(rootBonesToIgnore); } else { rootIgnoredBones = new List<HumanBodyBones>(); } syncronizeAnimation = syncAnim; syncronizeAudio = syncAudio; syncPos = syncTimer.Count; syncTimer.Add(0f); syncPlayerCount.Add(0); List<bool> list = new List<bool>(); for (int i = 0; i < _clip.Length; i++) { list.Add(item: false); } uniqueAnimations.Add(list); if (_joinSpots == null) { _joinSpots = new JoinSpot[0]; } joinSpots = _joinSpots; useSafePositionReset = safePositionReset; this.customName = customName; } } public struct WorldProp { internal GameObject prop; internal JoinSpot[] joinSpots; public WorldProp(GameObject _prop, JoinSpot[] _joinSpots) { prop = _prop; joinSpots = _joinSpots; } } public class AudioObject : MonoBehaviour { internal int spot; internal int playerCount; internal GameObject audioObject; internal int activeObjectsSpot; } public class AudioContainer : MonoBehaviour { internal List<GameObject> playingObjects = new List<GameObject>(); } public class BoneMapper : MonoBehaviour { public static List<string[]> stopEvents = new List<string[]>(); public static List<string[]> startEvents = new List<string[]>(); internal List<GameObject> audioObjects = new List<GameObject>(); public SkinnedMeshRenderer smr1; public SkinnedMeshRenderer smr2; public Animator a1; public Animator a2; public HealthComponent h; public List<BonePair> pairs = new List<BonePair>(); public float timer = 0f; public GameObject model; private List<string> ignore = new List<string>(); private bool twopart = false; public static Dictionary<string, CustomAnimationClip> animClips = new Dictionary<string, CustomAnimationClip>(); public CustomAnimationClip currentClip = null; public string currentClipName = "none"; public string prevClipName = "none"; public CustomAnimationClip prevClip = null; internal static float Current_MSX = 69f; internal static List<BoneMapper> allMappers = new List<BoneMapper>(); internal static List<WorldProp> allWorldProps = new List<WorldProp>(); public bool local = false; internal static bool moving = false; internal static bool attacking = false; public bool jank = false; public List<GameObject> props = new List<GameObject>(); public float scale = 1f; internal int desiredEvent = 0; public int currEvent = 0; public float autoWalkSpeed = 0f; public bool overrideMoveSpeed = false; public bool autoWalk = false; public GameObject currentEmoteSpot = null; public GameObject reservedEmoteSpot = null; public bool worldProp = false; public bool ragdolling = false; public GameObject bodyPrefab; public int uniqueSpot = -1; public bool preserveProps = false; public bool preserveParent = false; internal bool useSafePositionReset = false; public List<EmoteLocation> emoteLocations = new List<EmoteLocation>(); private List<string> dontAnimateUs = new List<string>(); public bool enableAnimatorOnDeath = true; public bool revertTransform = false; public bool oneFrameAnimatorLeeWay = false; public CharacterBody mapperBody; public bool startupFixJank = false; public static Dictionary<CharacterBody, BoneMapper> characterBodiesToBoneMappers = new Dictionary<CharacterBody, BoneMapper>(); public GameObject parentGameObject; private bool positionLock; private bool rotationLock; private bool scaleLock; private float interval = 0f; private Vector3 ogScale = new Vector3(-69f, -69f, -69f); private Vector3 ogLocation = new Vector3(-69f, -69f, -69f); private Vector3 scaleDiff = Vector3.one; private float rtpcUpdateTimer = 0f; private bool firstTimeEnding = true; public void PlayAnim(string s, int pos, int eventNum) { desiredEvent = eventNum; PlayAnim(s, pos); } public void PlayAnim(string s, int pos) { //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0899: Unknown result type (might be due to invalid IL or missing references) prevClipName = currentClipName; if (s != "none") { if (!animClips.ContainsKey(s)) { DebugClass.Log("No emote bound to the name [" + s + "]"); return; } try { ((object)animClips[s]).ToString(); } catch (Exception) { CustomEmotesAPI.Changed(s, this); return; } } ((Behaviour)a2).enabled = true; if (Object.op_Implicit((Object)(object)((Component)((Component)a2).transform.parent).GetComponent<InverseKinematics>()) && ((Object)a2).name != "loader") { ((Behaviour)((Component)((Component)a2).transform.parent).GetComponent<InverseKinematics>()).enabled = false; } dontAnimateUs.Clear(); try { ((object)currentClip.clip[0]).ToString(); try { if (currentClip.syncronizeAnimation || currentClip.syncronizeAudio) { CustomAnimationClip.syncPlayerCount[currentClip.syncPos]--; RemoveAudioObject(); } } catch (Exception) { DebugClass.Log("had issue turning off audio before new audio played step 1"); } try { if (stopEvents[currentClip.syncPos][currEvent] != "") { audioObjects[currentClip.syncPos].transform.localPosition = new Vector3(0f, -10000f, 0f); if (!currentClip.syncronizeAudio) { AkSoundEngine.PostEvent(stopEvents[currentClip.syncPos][currEvent], ((Component)this).gameObject); } if (CustomAnimationClip.syncPlayerCount[currentClip.syncPos] == 0 && currentClip.syncronizeAudio) { AkSoundEngine.PostEvent(stopEvents[currentClip.syncPos][currEvent], CustomEmotesAPI.audioContainers[currentClip.syncPos]); foreach (BoneMapper allMapper in allMappers) { if (!Object.op_Implicit((Object)(object)allMapper.audioObjects[currentClip.syncPos])) { DebugClass.Log("The audioObject was null????????"); } allMapper.audioObjects[currentClip.syncPos].transform.localPosition = new Vector3(0f, -10000f, 0f); } } } if (uniqueSpot != -1 && CustomAnimationClip.uniqueAnimations[currentClip.syncPos][uniqueSpot]) { CustomAnimationClip.uniqueAnimations[currentClip.syncPos][uniqueSpot] = false; uniqueSpot = -1; } } catch (Exception ex3) { DebugClass.Log($"had issue turning off audio before new audio played step 2: {ex3}\n Notable items for debugging: [currentClip: {currentClip}] [currentClip.syncPos: {currentClip.syncPos}] [currEvent: {currEvent}] [stopEvents[currentClip.syncPos]: {stopEvents[currentClip.syncPos]}] [CustomEmotesAPI.audioContainers[currentClip.syncPos]: {CustomEmotesAPI.audioContainers[currentClip.syncPos]}] [uniqueSpot: {uniqueSpot}] [CustomAnimationClip.uniqueAnimations[currentClip.syncPos]: {CustomAnimationClip.uniqueAnimations[currentClip.syncPos]}]"); } } catch (Exception) { } currEvent = 0; currentClipName = s; if (s != "none") { prevClip = currentClip; currentClip = animClips[s]; try { ((object)currentClip.clip[0]).ToString(); } catch (Exception) { return; } if (pos == -2) { pos = ((CustomAnimationClip.syncPlayerCount[animClips[s].syncPos] != 0) ? animClips[s].joinPref : animClips[s].startPref); } if (pos == -2) { for (int i = 0; i < CustomAnimationClip.uniqueAnimations[currentClip.syncPos].Count; i++) { if (!CustomAnimationClip.uniqueAnimations[currentClip.syncPos][i]) { pos = i; uniqueSpot = pos; CustomAnimationClip.uniqueAnimations[currentClip.syncPos][uniqueSpot] = true; break; } } if (uniqueSpot == -1) { pos = -1; } } if (pos == -1) { pos = Random.Range(0, currentClip.clip.Length); } LockBones(); } if (s == "none") { a2.Play("none", -1, 0f); twopart = false; prevClip = currentClip; currentClip = null; NewAnimation(null); CustomEmotesAPI.Changed(s, this); return; } AnimatorOverrideController val = new AnimatorOverrideController(a2.runtimeAnimatorController); if (currentClip.syncronizeAnimation || currentClip.syncronizeAudio) { CustomAnimationClip.syncPlayerCount[currentClip.syncPos]++; AddAudioObject(); } if (currentClip.syncronizeAnimation && CustomAnimationClip.syncPlayerCount[currentClip.syncPos] == 1) { CustomAnimationClip.syncTimer[currentClip.syncPos] = 0f; } if (startEvents[currentClip.syncPos][currEvent] != "") { if (CustomAnimationClip.syncPlayerCount[currentClip.syncPos] == 1 && currentClip.syncronizeAudio) { if (desiredEvent != -1) { currEvent = desiredEvent; } else { currEvent = Random.Range(0, startEvents[currentClip.syncPos].Length); } foreach (BoneMapper allMapper2 in allMappers) { allMapper2.currEvent = currEvent; } if (currentClip.customPostEventCodeSync != null) { currentClip.customPostEventCodeSync(this); } else { AkSoundEngine.PostEvent(startEvents[currentClip.syncPos][currEvent], CustomEmotesAPI.audioContainers[currentClip.syncPos]); } } else if (!currentClip.syncronizeAudio) { currEvent = Random.Range(0, startEvents[currentClip.syncPos].Length); if (currentClip.customPostEventCodeNoSync != null) { currentClip.customPostEventCodeNoSync(this); } else { AkSoundEngine.PostEvent(startEvents[currentClip.syncPos][currEvent], ((Component)this).gameObject); } } audioObjects[currentClip.syncPos].transform.localPosition = Vector3.zero; } SetAnimationSpeed(1f); if (currentClip.secondaryClip != null && currentClip.secondaryClip.Length != 0) { bool flag = true; if (CustomAnimationClip.syncTimer[currentClip.syncPos] > currentClip.clip[pos].length) { val["Floss"] = currentClip.secondaryClip[pos]; a2.runtimeAnimatorController = (RuntimeAnimatorController)(object)val; a2.Play("Loop", -1, (CustomAnimationClip.syncTimer[currentClip.syncPos] - currentClip.clip[pos].length) % currentClip.secondaryClip[pos].length / currentClip.secondaryClip[pos].length); } else { val["Dab"] = currentClip.clip[pos]; val["nobones"] = currentClip.secondaryClip[pos]; a2.runtimeAnimatorController = (RuntimeAnimatorController)(object)val; a2.Play("PoopToLoop", -1, CustomAnimationClip.syncTimer[currentClip.syncPos] % currentClip.clip[pos].length / currentClip.clip[pos].length); } } else if (currentClip.looping) { val["Floss"] = currentClip.clip[pos]; a2.runtimeAnimatorController = (RuntimeAnimatorController)(object)val; if (currentClip.clip[pos].length != 0f) { a2.Play("Loop", -1, CustomAnimationClip.syncTimer[currentClip.syncPos] % currentClip.clip[pos].length / currentClip.clip[pos].length); } else { a2.Play("Loop", -1, 0f); } } else { val["Default Dance"] = currentClip.clip[pos]; a2.runtimeAnimatorController = (RuntimeAnimatorController)(object)val; a2.Play("Poop", -1, CustomAnimationClip.syncTimer[currentClip.syncPos] % currentClip.clip[pos].length / currentClip.clip[pos].length); } twopart = false; NewAnimation(currentClip.joinSpots); CustomEmotesAPI.Changed(s, this); } public void SetAnimationSpeed(float speed) { a2.speed = speed; } internal void NewAnimation(JoinSpot[] locations) { //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02af: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) try { try { emoteLocations.Clear(); autoWalkSpeed = 0f; autoWalk = false; overrideMoveSpeed = false; if (Object.op_Implicit((Object)(object)parentGameObject) && !preserveParent) { Vector3 position = ((Component)mapperBody).gameObject.transform.position; position = TeleportHelper.FindSafeTeleportDestination(((Component)mapperBody).gameObject.transform.position, mapperBody, RoR2Application.rng).GetValueOrDefault(position); Vector3 position2 = position; RaycastHit val = default(RaycastHit); Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(position + Vector3.up * 2f, Vector3.down); float num = 4f; Ray val3 = val2; float radius = mapperBody.radius; LayerIndex world = LayerIndex.world; if (Physics.SphereCast(val3, radius, ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref world)).mask))) { position2.y = ((Ray)(ref val2)).origin.y - ((RaycastHit)(ref val)).distance; } float bodyPrefabFootOffset = Util.GetBodyPrefabFootOffset(bodyPrefab); position2.y += bodyPrefabFootOffset; if (!useSafePositionReset) { Rigidbody component = ((Component)mapperBody).gameObject.GetComponent<Rigidbody>(); component.AddForce(new Vector3(0f, 1f, 0f), (ForceMode)2); Transform transform = ((Component)mapperBody).gameObject.transform; transform.position += new Vector3(0.1f, 2f, 0.1f); Transform modelBaseTransform = ((Component)mapperBody).GetComponent<ModelLocator>().modelBaseTransform; modelBaseTransform.position += new Vector3(0f, 10f, 0f); } else { ((Component)mapperBody).gameObject.transform.position = position2; ((Component)mapperBody).GetComponent<ModelLocator>().modelBaseTransform.position = position2; } parentGameObject = null; } } catch (Exception) { } try { useSafePositionReset = currentClip.useSafePositionReset; } catch (Exception) { useSafePositionReset = true; } try { if (preserveParent) { preserveParent = false; } else { ((Component)mapperBody).GetComponent<ModelLocator>().modelBaseTransform.localEulerAngles = Vector3.zero; if (Object.op_Implicit((Object)(object)((Component)mapperBody).GetComponent<CharacterDirection>())) { ((Behaviour)((Component)mapperBody).GetComponent<CharacterDirection>()).enabled = true; } if (ogScale != new Vector3(-69f, -69f, -69f)) { ((Component)this).transform.parent.localScale = ogScale; ogScale = new Vector3(-69f, -69f, -69f); } if (ogLocation != new Vector3(-69f, -69f, -69f)) { ((Component)mapperBody).GetComponent<ModelLocator>().modelBaseTransform.localPosition = ogLocation; ogLocation = new Vector3(-69f, -69f, -69f); } if (Object.op_Implicit((Object)(object)((Component)mapperBody).GetComponent<Collider>())) { ((Component)mapperBody).GetComponent<Collider>().enabled = true; } if (Object.op_Implicit((Object)(object)((Component)mapperBody).GetComponent<KinematicCharacterMotor>()) && !((Behaviour)((Component)mapperBody).GetComponent<KinematicCharacterMotor>()).enabled) { Vector3 position3 = ((Component)mapperBody).gameObject.transform.position; ((Behaviour)((Component)mapperBody).GetComponent<KinematicCharacterMotor>()).enabled = true; ((Component)mapperBody).GetComponent<KinematicCharacterMotor>().SetPosition(position3, true); } } } catch (Exception) { } if (preserveProps) { preserveProps = false; } else { foreach (GameObject prop in props) { if (Object.op_Implicit((Object)(object)prop)) { Object.Destroy((Object)(object)prop); } } props.Clear(); } if (locations != null) { for (int i = 0; i < locations.Length; i++) { SpawnJoinSpot(locations[i]); } } } catch (Exception arg) { DebugClass.Log($"error during new animation: {arg}"); } } public void ScaleProps() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject prop in props) { if (Object.op_Implicit((Object)(object)prop)) { Transform parent = prop.transform.parent; prop.transform.SetParent((Transform)null); prop.transform.localScale = new Vector3(scale * 1.15f, scale * 1.15f, scale * 1.15f); prop.transform.SetParent(parent); } } } private void AddIgnore(DynamicBone dynbone, Transform t) { for (int i = 0; i < t.childCount; i++) { if (!dynbone.m_Exclusions.Contains(t.GetChild(i))) { ignore.Add(((Object)t.GetChild(i)).name); AddIgnore(dynbone, t.GetChild(i)); } } } private void Start() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) if (worldProp) { return; } mapperBody = ((Component)this).GetComponentInParent<CharacterModel>().body; allMappers.Add(this); if (characterBodiesToBoneMappers.ContainsKey(mapperBody)) { characterBodiesToBoneMappers[mapperBody] = this; } else { characterBodiesToBoneMappers.Add(mapperBody, this); } foreach (string[] startEvent in startEvents) { GameObject val = new GameObject(); if (startEvent[0] != "") { ((Object)val).name = startEvent[0] + "_AudioObject"; } val.transform.SetParent(((Component)this).transform); val.transform.localPosition = new Vector3(0f, -10000f, 0f); audioObjects.Add(val); } DynamicBone[] components = model.GetComponents<DynamicBone>(); foreach (DynamicBone val2 in components) { try { if (!val2.m_Exclusions.Contains(val2.m_Root)) { ignore.Add(((Object)val2.m_Root).name); } AddIgnore(val2, val2.m_Root); } catch (Exception) { } } if (((Object)model).name.StartsWith("mdlLoader")) { Transform val3 = model.transform; Transform val4 = model.transform; Transform[] componentsInChildren = model.GetComponentsInChildren<Transform>(); foreach (Transform val5 in componentsInChildren) { if (((Object)val5).name == "clavicle.l") { val3 = val5; ignore.Add(((Object)val3).name); } if (((Object)val5).name == "clavicle.r") { val4 = val5; ignore.Add(((Object)val4).name); } } Transform[] componentsInChildren2 = ((Component)val3).GetComponentsInChildren<Transform>(); foreach (Transform val6 in componentsInChildren2) { ignore.Add(((Object)val6).name); } Transform[] componentsInChildren3 = ((Component)val4).GetComponentsInChildren<Transform>(); foreach (Transform val7 in componentsInChildren3) { ignore.Add(((Object)val7).name); } } int num = 0; if (true) { int num2 = 0; for (int m = 0; m < smr1.bones.Length; m++) { for (int n = num2; n < smr2.bones.Length; n++) { if (((Object)smr1.bones[m]).name == ((Object)smr2.bones[n]).name) { num2 = n; ConstraintSource val8 = default(ConstraintSource); ((ConstraintSource)(ref val8)).sourceTransform = smr1.bones[m]; ((ConstraintSource)(ref val8)).weight = 1f; EmoteConstraint emoteConstraint = ((Component)smr2.bones[n]).gameObject.AddComponent<EmoteConstraint>(); emoteConstraint.AddSource(ref smr2.bones[n], ref smr1.bones[m]); emoteConstraint.revertTransform = revertTransform; break; } if (n == num2 - 1) { break; } if (num2 > 0 && n == smr2.bones.Length - 1) { n = -1; } } } } if (jank) { for (int num3 = 0; num3 < smr2.bones.Length; num3++) { try { if (Object.op_Implicit((Object)(object)((Component)smr2.bones[num3]).gameObject.GetComponent<EmoteConstraint>())) { ((Component)smr2.bones[num3]).gameObject.GetComponent<EmoteConstraint>().ActivateConstraints(); } } catch (Exception arg) { DebugClass.Log($"{arg}"); } } } CustomEmotesAPI.MapperCreated(this); if (((Object)((Component)a2).transform.parent).name == "mdlRocket" || ((Object)((Component)a2).transform.parent).name == "Bastian" || startupFixJank || ((Object)((Component)a2).transform.parent).name == "mdlAssassin") { ((MonoBehaviour)this).StartCoroutine(FixRootOnSurvivors()); } } private IEnumerator FixRootOnSurvivors() { yield return 0; PlayAnim("lmao", 0); yield return 0; PlayAnim("none", 0); ((Component)((Component)smr2).transform.parent).gameObject.SetActive(false); ((Component)((Component)smr2).transform.parent).gameObject.SetActive(true); if (((Object)((Component)a2).transform.parent).name == "mdlAssassin") { jank = false; } } public void AssignParentGameObject(GameObject youAreTheFather, bool lockPosition, bool lockRotation, bool lockScale, bool scaleAsBandit = true, bool disableCollider = true) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)parentGameObject)) { NewAnimation(null); } if (!Object.op_Implicit((Object)(object)((Component)((Component)this).transform).GetComponentInParent<CharacterModel>())) { return; } ogLocation = ((Component)mapperBody).GetComponent<ModelLocator>().modelBaseTransform.localPosition; ogScale = ((Component)this).transform.parent.localScale; if (scaleAsBandit) { scaleDiff = ogScale / scale; } else { scaleDiff = ogScale; } parentGameObject = youAreTheFather; positionLock = lockPosition; rotationLock = lockRotation; scaleLock = lockScale; if (Object.op_Implicit((Object)(object)((Component)mapperBody).GetComponent<Collider>())) { ((Component)mapperBody).GetComponent<Collider>().enabled = !disableCollider; } if (Object.op_Implicit((Object)(object)((Component)mapperBody).GetComponent<KinematicCharacterMotor>())) { ((Behaviour)((Component)mapperBody).GetComponent<KinematicCharacterMotor>()).enabled = !lockPosition; } if (disableCollider && Object.op_Implicit((Object)(object)currentEmoteSpot)) { if (currentEmoteSpot.GetComponent<EmoteLocation>().validPlayers != 0) { currentEmoteSpot.GetComponent<EmoteLocation>().validPlayers--; } currentEmoteSpot.GetComponent<EmoteLocation>().SetColor(); currentEmoteSpot = null; } } private void DimmingChecks() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //