using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.IL2CPP; using HarmonyLib; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using UnhollowerBaseLib; using UnhollowerRuntimeLib; using UnityEngine; using UnityEngine.Events; 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: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("Antro.Skins")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Antro.Skins")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0.0")] [assembly: AssemblyProduct("Antro.Skins")] [assembly: AssemblyTitle("Antro.Skins")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Antro.CustomOutline { public enum OutlineMode { Normal, Rainbow, Pulse, Police, Golden, Toxic, Glitch, Angelic, Disco, Fire, Ice, Void, Heartbeat, Chroma, Danger, LoadingBar } [BepInPlugin("Antro.CustomOutline", "Antro Custom Outline", "2.4.4")] public class MainPlugin : BasePlugin { public override void Load() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ClassInjector.RegisterTypeInIl2Cpp(); GameObject val = new GameObject("AntroOutline_Manager"); Object.DontDestroyOnLoad((Object)(object)val); ((Object)val).hideFlags = (HideFlags)61; val.AddComponent(); ((BasePlugin)this).Log.LogInfo((object)"[Antro.CustomOutline 2.4.4] Loaded. Optimized Caching Enabled!"); } } public class OutlineController : MonoBehaviour { private bool _showMenu = false; private Rect _windowRect = new Rect(50f, 50f, 350f, 480f); private GUIStyle _headerStyle; private bool _stylesInit = false; public static bool IsEnabled = true; public static OutlineMode CurrentMode = OutlineMode.Rainbow; private float _hue; private float _discoTimer; private float _glitchTimer = 0f; private Color _currentDiscoColor = Color.white; private Color _currentGlitchColor = Color.cyan; private float _currentGlitchWidth = 10f; private bool _reflectionInitialized = false; private Type _nextGenSettingsType; private FieldInfo _nextGenToggleField; private FieldInfo _nextGenBoolField; private Dictionary _cachedOutlines = new Dictionary(); public OutlineController(IntPtr ptr) : base(ptr) { }//IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) private void Start() { InitNextGenReflection(); } private void Update() { if (!_reflectionInitialized) { InitNextGenReflection(); } if (Input.GetKeyDown((KeyCode)288)) { _showMenu = !_showMenu; if (_showMenu) { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } else if ((Object)(object)MonoBehaviourPublicDi2UIObacspDi2UIObUnique.Instance != (Object)null) { Cursor.lockState = (CursorLockMode)1; } } if (IsEnabled && (Object)(object)MonoBehaviourPublicDi2UIObacspDi2UIObUnique.Instance != (Object)null) { ApplyEffects(); } } private void LateUpdate() { ForceDisableNextGenLoop(); } private void InitNextGenReflection() { try { Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { Type type = assembly.GetType("NextGenMods.SettingsNextGen"); if (type != null) { _nextGenSettingsType = type; _nextGenToggleField = type.GetField("RGBTagToggle", BindingFlags.Static | BindingFlags.Public); _nextGenBoolField = type.GetField("RGBTagBool", BindingFlags.Static | BindingFlags.Public); _reflectionInitialized = true; break; } } } catch { } } private void ForceDisableNextGenLoop() { if (!_reflectionInitialized) { return; } try { if (_nextGenBoolField != null) { _nextGenBoolField.SetValue(null, false); } if (!(_nextGenToggleField != null)) { return; } object? value = _nextGenToggleField.GetValue(null); GameObject val = (GameObject)((value is GameObject) ? value : null); if (val != null) { Toggle component = val.GetComponent(); if ((Object)(object)component != (Object)null && component.isOn) { component.isOn = false; } } } catch { } } private void OnGUI() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //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) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (_showMenu) { if (!_stylesInit) { _headerStyle = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontStyle = (FontStyle)1, fontSize = 14 }; _headerStyle.normal.textColor = Color.yellow; _stylesInit = true; } GUI.backgroundColor = new Color(0.1f, 0.1f, 0.1f, 0.95f); GUI.contentColor = Color.white; _windowRect = GUI.Window(1337, _windowRect, WindowFunction.op_Implicit((Action)DrawWindow), "Antro.CustomOutline Settings"); } } private void DrawWindow(int id) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) GUI.DragWindow(new Rect(0f, 0f, 10000f, 20f)); GUILayout.BeginVertical(Array.Empty()); GUILayout.Space(5f); GUI.backgroundColor = (IsEnabled ? Color.green : Color.red); if (GUILayout.Button(IsEnabled ? "STATUS: ENABLED" : "STATUS: DISABLED", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { IsEnabled = !IsEnabled; } GUI.backgroundColor = new Color(0.1f, 0.1f, 0.1f); GUILayout.Space(10f); GUILayout.Label($"Mode: {CurrentMode}", _headerStyle, Array.Empty()); GUILayout.Space(10f); GUI.backgroundColor = Color.gray; if (GUILayout.Button("Normal (Default Red)", Array.Empty())) { CurrentMode = OutlineMode.Normal; } GUI.backgroundColor = new Color(0.1f, 0.1f, 0.1f); GUILayout.Space(5f); GUILayout.Label("Classic:", _headerStyle, Array.Empty()); if (GUILayout.Button("Rainbow", Array.Empty())) { CurrentMode = OutlineMode.Rainbow; } if (GUILayout.Button("Pulse", Array.Empty())) { CurrentMode = OutlineMode.Pulse; } if (GUILayout.Button("Police", Array.Empty())) { CurrentMode = OutlineMode.Police; } if (GUILayout.Button("Golden", Array.Empty())) { CurrentMode = OutlineMode.Golden; } GUILayout.Space(5f); GUILayout.Label("Exotic:", _headerStyle, Array.Empty()); if (GUILayout.Button("Toxic", Array.Empty())) { CurrentMode = OutlineMode.Toxic; } if (GUILayout.Button("Glitch", Array.Empty())) { CurrentMode = OutlineMode.Glitch; } if (GUILayout.Button("Angelic", Array.Empty())) { CurrentMode = OutlineMode.Angelic; } if (GUILayout.Button("Disco", Array.Empty())) { CurrentMode = OutlineMode.Disco; } GUILayout.Space(5f); GUILayout.Label("Interactive:", _headerStyle, Array.Empty()); if (GUILayout.Button("Loading Bar", Array.Empty())) { CurrentMode = OutlineMode.LoadingBar; } if (GUILayout.Button("Fire / Lava", Array.Empty())) { CurrentMode = OutlineMode.Fire; } if (GUILayout.Button("Ice / Frozen", Array.Empty())) { CurrentMode = OutlineMode.Ice; } GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Void", Array.Empty())) { CurrentMode = OutlineMode.Void; } if (GUILayout.Button("Chroma", Array.Empty())) { CurrentMode = OutlineMode.Chroma; } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Heartbeat", Array.Empty())) { CurrentMode = OutlineMode.Heartbeat; } if (GUILayout.Button("Danger", Array.Empty())) { CurrentMode = OutlineMode.Danger; } GUILayout.EndHorizontal(); GUILayout.EndVertical(); } private void ApplyEffects() { //IL_0060: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: 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_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0324: 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_0392: Unknown result type (might be due to invalid IL or missing references) //IL_038b: 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_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0397: 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) if ((Object)(object)MonoBehaviourPublicDi2UIObacspDi2UIObUnique.Instance == (Object)null) { return; } ulong mySteamID = GetMySteamID(); if (CurrentMode == OutlineMode.Disco) { _discoTimer += Time.deltaTime; if (_discoTimer >= 0.1f) { _currentDiscoColor = new Color(Random.value, Random.value, Random.value); _discoTimer = 0f; } } if (CurrentMode == OutlineMode.Glitch) { _glitchTimer += Time.deltaTime; if (_glitchTimer >= 0.05f) { _currentGlitchColor = ((Random.value > 0.5f) ? Color.cyan : Color.magenta); _currentGlitchWidth = Random.Range(5f, 25f); _glitchTimer = 0f; } } Enumerator enumerator = MonoBehaviourPublicDi2UIObacspDi2UIObUnique.Instance.activePlayers.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair current = enumerator.Current; MonoBehaviourPublicCSstReshTrheObplBojuUnique value = current.Value; if ((Object)(object)value == (Object)null) { continue; } _ = value.steamProfile; if (false) { continue; } ulong steamID = value.steamProfile.m_SteamID; if (steamID == mySteamID) { continue; } Il2CppArrayBase componentsInChildren = ((Component)value).GetComponentsInChildren(true); bool flag = !_cachedOutlines.ContainsKey(steamID) || _cachedOutlines[steamID] == null; if (!flag) { if (_cachedOutlines[steamID].Length != componentsInChildren.Count) { flag = true; } else { MonoBehaviourPublicHa1MeObouCoSiouBoprUnique[] array = _cachedOutlines[steamID]; foreach (MonoBehaviourPublicHa1MeObouCoSiouBoprUnique val in array) { if ((Object)(object)val == (Object)null) { flag = true; break; } } } } if (flag) { _cachedOutlines[steamID] = Il2CppArrayBase.op_Implicit(componentsInChildren); } MonoBehaviourPublicHa1MeObouCoSiouBoprUnique val2 = (((Object)(object)value.shirt != (Object)null) ? ((Component)value.shirt).GetComponent() : null); bool flag2 = (Object)(object)val2 != (Object)null && ((Behaviour)val2).enabled; Color color = Color.black; float width = 0f; if (flag2) { color = Color.red; width = 20f; switch (CurrentMode) { case OutlineMode.Normal: color = Color.red; width = 8f; break; case OutlineMode.Rainbow: _hue += Time.deltaTime * 0.05f; if (_hue > 1f) { _hue = 0f; } color = Color.HSVToRGB(_hue, 1f, 1f); break; case OutlineMode.Pulse: { float num3 = Mathf.PingPong(Time.time * 0.5f, 1f); ((Color)(ref color))..ctor(0.6f + num3 * 0.4f, 0f, 0f); width = 6f + num3 * 4f; break; } case OutlineMode.Police: color = (((int)(Time.time * 8f) % 2 == 0) ? Color.blue : Color.red); width = 10f; break; case OutlineMode.Golden: color = Color.Lerp(new Color(0.7f, 0.5f, 0f), new Color(1f, 0.9f, 0.5f), Mathf.PingPong(Time.time * 0.8f, 1f)); width = 9f; break; case OutlineMode.Toxic: color = Color.Lerp(Color.green, new Color(0.5f, 1f, 0f), Mathf.PingPong(Time.time * 3f, 1f)); width = 8f + Mathf.Sin(Time.time * 15f) * 2f; break; case OutlineMode.Glitch: color = _currentGlitchColor; width = _currentGlitchWidth; break; case OutlineMode.Angelic: color = Color.white; width = 8f + Mathf.PingPong(Time.time * 0.5f, 1f) * 4f; break; case OutlineMode.Disco: color = _currentDiscoColor; width = 9f; break; case OutlineMode.Fire: color = Color.Lerp(Color.red, Color.yellow, Mathf.PingPong(Time.time * 2f, 1f)); width = 9f; break; case OutlineMode.Ice: color = Color.Lerp(new Color(0f, 1f, 1f), Color.white, 0.3f); width = 8f; break; case OutlineMode.Void: ((Color)(ref color))..ctor(0.2f, 0f, 0.4f); width = 10f; break; case OutlineMode.Chroma: color = Color.Lerp(Color.blue, Color.magenta, Mathf.PingPong(Time.time * 0.5f, 1f)); width = 8f; break; case OutlineMode.Danger: color = (((int)(Time.time * 4f) % 2 == 0) ? Color.yellow : Color.black); width = 10f; break; case OutlineMode.Heartbeat: { float num2 = Time.time % 2f; color = Color.red; width = ((!(num2 < 0.1f)) ? ((!(num2 < 0.2f)) ? ((!(num2 < 0.3f)) ? ((!(num2 < 0.4f)) ? 4f : Mathf.Lerp(12f, 4f, (num2 - 0.3f) / 0.1f)) : Mathf.Lerp(6f, 12f, (num2 - 0.2f) / 0.1f)) : Mathf.Lerp(12f, 6f, (num2 - 0.1f) / 0.1f)) : Mathf.Lerp(4f, 12f, num2 / 0.1f)); break; } case OutlineMode.LoadingBar: { float num = Mathf.Repeat(Time.time, 3f) / 3f; color = Color.Lerp(Color.red, Color.green, num); width = Mathf.Lerp(0f, 15f, num); break; } } } SetCachedOutline(_cachedOutlines[steamID], color, width, flag2); } } private void SetCachedOutline(MonoBehaviourPublicHa1MeObouCoSiouBoprUnique[] outlines, Color color, float width, bool active) { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (outlines == null) { return; } foreach (MonoBehaviourPublicHa1MeObouCoSiouBoprUnique val in outlines) { if ((Object)(object)val == (Object)null) { continue; } ((Behaviour)val).enabled = active; if (!active) { continue; } val.Method_Public_Void_Color_0(color); try { PropertyInfo propertyInfo = typeof(MonoBehaviourPublicHa1MeObouCoSiouBoprUnique).GetProperty("OutlineMode") ?? typeof(MonoBehaviourPublicHa1MeObouCoSiouBoprUnique).GetProperty("outlineMode"); if (propertyInfo != null) { object value = Enum.ToObject(propertyInfo.PropertyType, 1); propertyInfo.SetValue(val, value); } else { FieldInfo fieldInfo = typeof(MonoBehaviourPublicHa1MeObouCoSiouBoprUnique).GetField("OutlineMode") ?? typeof(MonoBehaviourPublicHa1MeObouCoSiouBoprUnique).GetField("outlineMode"); if (fieldInfo != null) { object value2 = Enum.ToObject(fieldInfo.FieldType, 1); fieldInfo.SetValue(val, value2); } } } catch { } float num = ((Component)val).transform.lossyScale.x; if (num < 0.01f) { num = 0.01f; } float outlineWidth = width; if (((Object)((Component)val).gameObject).name.Contains("AntroSkin") || ((Object)((Component)val).transform.root).name.Contains("AntroSkin") || num != 1f) { outlineWidth = width / Mathf.Sqrt(num) * 3f; outlineWidth = Mathf.Clamp(outlineWidth, 5f, 50f); } val.outlineWidth = outlineWidth; } } private ulong GetMySteamID() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MonoBehaviourPublicObInUIgaStCSBoStcuCSUnique.Instance != (Object)null) { return MonoBehaviourPublicObInUIgaStCSBoStcuCSUnique.Instance.field_Private_CSteamID_0.m_SteamID; } return 0uL; } } } namespace Antro.Skins { public static class AccessoryManager { public static Dictionary ActiveAccessories = new Dictionary(); public static readonly string[] AccessoryBones = new string[5] { "Head", "Spine2", "RightShoulder", "LeftShoulder", "Hips" }; private static Dictionary _loadedBundles = new Dictionary(); private static Dictionary _loadedPrefabs = new Dictionary(); public static Dictionary SizeTweaks = new Dictionary(); public static string AccessoriesPath => Path.Combine(Paths.PluginPath, "AntroSkins", "Accessories"); public static void InitFolder() { if (!Directory.Exists(AccessoriesPath)) { Directory.CreateDirectory(AccessoriesPath); } string[] accessoryBones = AccessoryBones; foreach (string path in accessoryBones) { string path2 = Path.Combine(AccessoriesPath, path); if (!Directory.Exists(path2)) { Directory.CreateDirectory(path2); } } } public static List GetAvailableAccessories(string boneName) { List list = new List(); string path = Path.Combine(AccessoriesPath, boneName); if (Directory.Exists(path)) { string[] files = Directory.GetFiles(path, "*.bundle"); foreach (string path2 in files) { list.Add(Path.GetFileName(path2)); } } return list; } public static GameObject GetOrLoadPrefab(string boneName, string bundleName) { string key = boneName + "_" + bundleName; if (_loadedPrefabs.ContainsKey(key)) { if ((Object)(object)_loadedPrefabs[key] != (Object)null) { return _loadedPrefabs[key]; } _loadedPrefabs.Remove(key); } string text = Path.Combine(AccessoriesPath, boneName, bundleName); if (!File.Exists(text)) { return null; } if (!_loadedBundles.ContainsKey(key)) { AssetBundle val = AssetBundle.LoadFromFile(text); if (val == null) { return null; } _loadedBundles[key] = val; } Il2CppReferenceArray val2 = _loadedBundles[key].LoadAllAssets(Il2CppType.Of()); foreach (Object item in (Il2CppArrayBase)(object)val2) { GameObject val3 = ((Il2CppObjectBase)item).Cast(); if ((Object)(object)val3 != (Object)null && (Object)(object)val3.transform.parent == (Object)null) { Object.DontDestroyOnLoad((Object)(object)val3); val3.SetActive(false); _loadedPrefabs[key] = val3; return val3; } } return null; } public static void ApplyModels() { //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) Il2CppArrayBase val = Object.FindObjectsOfType(); Dictionary dictionary = new Dictionary { { "Head", "head" }, { "Spine2", "upperchest" }, { "RightShoulder", "shoulderr" }, { "LeftShoulder", "shoulderl" }, { "Hips", "hips" } }; foreach (MonoBehaviourPublicObVeSiVeRiSiAnVeanTrUnique item in val) { if ((Object)(object)item == (Object)null) { continue; } Transform transform = ((Component)item).transform; string[] accessoryBones = AccessoryBones; foreach (string text in accessoryBones) { ActiveAccessories.TryGetValue(text, out var value); Transform val2 = null; string text2 = dictionary[text]; foreach (Transform componentsInChild in ((Component)transform).GetComponentsInChildren(true)) { if (((Object)componentsInChild).name.ToLower() == text2 && !((Object)componentsInChild).name.StartsWith("AntroSkin_")) { val2 = componentsInChild; break; } } if ((Object)(object)val2 == (Object)null) { continue; } Transform val3 = null; string text3 = ""; for (int j = 0; j < val2.childCount; j++) { Transform child = val2.GetChild(j); if ((Object)(object)child != (Object)null && ((Object)child).name.StartsWith("AntroAccessory_" + text + "_")) { val3 = child; text3 = ((Object)child).name.Replace("AntroAccessory_" + text + "_", ""); break; } } if (string.IsNullOrEmpty(value)) { if ((Object)(object)val3 != (Object)null) { Object.Destroy((Object)(object)((Component)val3).gameObject); } continue; } if ((Object)(object)val3 != (Object)null && text3 == value) { float num = (SizeTweaks.ContainsKey(text + "_" + value) ? SizeTweaks[text + "_" + value] : 1f); BoneSynchronizer component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null && BoneSynchronizer.DataMap.TryGetValue(((Il2CppObjectBase)component).Pointer, out var value2)) { value2.BaseScale = new Vector3(num, num, num); } continue; } if ((Object)(object)val3 != (Object)null) { Object.Destroy((Object)(object)((Component)val3).gameObject); } GameObject orLoadPrefab = GetOrLoadPrefab(text, value); if (!((Object)(object)orLoadPrefab != (Object)null)) { continue; } GameObject val4 = Object.Instantiate(orLoadPrefab, val2); ((Object)val4).name = "AntroAccessory_" + text + "_" + value; val4.SetActive(true); float num2 = (SizeTweaks.ContainsKey(text + "_" + value) ? SizeTweaks[text + "_" + value] : 1f); BoneSynchronizer boneSynchronizer = val4.AddComponent(); SyncData syncData = new SyncData(); syncData.SkinName = "ACC_" + text + "_" + value; syncData.IsAccessory = true; syncData.RootTransform = val4.transform; syncData.BaseScale = new Vector3(num2, num2, num2); BoneSynchronizer.DataMap[((Il2CppObjectBase)boneSynchronizer).Pointer] = syncData; foreach (Transform componentsInChild2 in val4.GetComponentsInChildren(true)) { if (((Object)componentsInChild2).name.ToLower().Contains("jiggle") && (Object)(object)((Component)componentsInChild2).gameObject.GetComponent() == (Object)null) { ((Component)componentsInChild2).gameObject.AddComponent(); } } Shader shader = Shader.Find("Standard"); foreach (Renderer componentsInChild3 in val4.GetComponentsInChildren(true)) { foreach (Material item2 in (Il2CppArrayBase)(object)componentsInChild3.materials) { if ((Object)(object)item2 != (Object)null) { item2.shader = shader; } } if ((Object)(object)((Component)componentsInChild3).gameObject.GetComponent() == (Object)null) { MonoBehaviourPublicHa1MeObouCoSiouBoprUnique val5 = ((Component)componentsInChild3).gameObject.AddComponent(); ((Behaviour)val5).enabled = false; } } foreach (Camera componentsInChild4 in val4.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild4); } foreach (AudioListener componentsInChild5 in val4.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild5); } foreach (Collider componentsInChild6 in val4.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild6); } foreach (Rigidbody componentsInChild7 in val4.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild7); } foreach (Transform componentsInChild8 in val4.GetComponentsInChildren(true)) { if (((Object)componentsInChild8).name.ToLower().Contains("jiggle") && (Object)(object)((Component)componentsInChild8).gameObject.GetComponent() == (Object)null) { ((Component)componentsInChild8).gameObject.AddComponent(); } } } } } } public class AntroJiggleBone : MonoBehaviour { private Quaternion _origLocalRot; private Vector3 _velocity; private Vector3 _dynamicPos; private bool _initialized = false; public AntroJiggleBone(IntPtr ptr) : base(ptr) { } private void Awake() { //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) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) _origLocalRot = ((Component)this).transform.localRotation; _dynamicPos = ((Component)this).transform.position + ((Component)this).transform.up; _initialized = true; } private void LateUpdate() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if (!_initialized || !ConfigManager.JiggleEnabled.Value || (Object)(object)((Component)this).transform.parent == (Object)null) { ((Component)this).transform.localRotation = _origLocalRot; return; } Vector3 val = ((Component)this).transform.position + ((Component)this).transform.parent.rotation * _origLocalRot * Vector3.up; if (Vector3.Distance(_dynamicPos, val) > 5f) { _dynamicPos = val; _velocity = Vector3.zero; } Vector3 val2 = (val - _dynamicPos) * ConfigManager.JiggleStiffness.Value; _velocity = (_velocity + val2) * ConfigManager.JiggleDamping.Value; _dynamicPos += _velocity * Time.deltaTime; Vector3 val3 = _dynamicPos - ((Component)this).transform.position; if (((Vector3)(ref val3)).sqrMagnitude > 0.001f) { ((Component)this).transform.rotation = Quaternion.FromToRotation(Vector3.up, val3) * (((Component)this).transform.parent.rotation * _origLocalRot); } } } public class SyncData { public string SkinName; public bool IsStuff = false; public bool IsLocalPlayer = false; public Vector3 BaseScale = Vector3.one; public bool IsAccessory = false; public Transform RootTransform; public Transform OriginalHips; public Transform CustomHips; public Transform OriginalRightHand; public Transform CustomRightHand; public List CustomBones = new List(); public List OriginalBones = new List(); public Dictionary AllCustomTransforms = new Dictionary(); public Dictionary InitialLocalPositions = new Dictionary(); public Dictionary InitialLocalRotations = new Dictionary(); private bool _isCached = false; private Transform[] _staticTransforms; private Vector3[] _staticPositions; private Quaternion[] _staticRotations; private Transform _cRightArm; private Transform _cRightForeArm; private Transform _cLeftArm; private Transform _cLeftForeArm; private Transform _cLeftHand; private Transform _oLeftHand; private Vector3 GetDefaultPos(string bone) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) return Vector3.zero; } private Vector3 GetDefaultRot(string bone) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) return Vector3.zero; } public void InvalidateCache() { _isCached = false; } private void BuildCache() { //IL_0093: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) SkinConfig skinConfig = SkinsMenu.GetSkinConfig(SkinName); List list = new List(); List list2 = new List(); List list3 = new List(); foreach (KeyValuePair allCustomTransform in AllCustomTransforms) { string key = allCustomTransform.Key; Transform value = allCustomTransform.Value; if ((Object)(object)value != (Object)null && (Object)(object)value != (Object)(object)CustomHips) { if (!skinConfig.BoneRotOffsets.ContainsKey(key)) { skinConfig.BoneRotOffsets[key] = GetDefaultRot(key); } if (!skinConfig.BonePosOffsets.ContainsKey(key)) { skinConfig.BonePosOffsets[key] = GetDefaultPos(key); } Vector3 val = skinConfig.BoneRotOffsets[key]; Vector3 val2 = skinConfig.BonePosOffsets[key]; Quaternion val3 = Quaternion.Euler(val); Vector3 item = InitialLocalPositions[key] + val2; if (!CustomBones.Contains(value)) { val3 = InitialLocalRotations[key] * val3; } list.Add(value); list2.Add(item); list3.Add(val3); } } _staticTransforms = list.ToArray(); _staticPositions = list2.ToArray(); _staticRotations = list3.ToArray(); AllCustomTransforms.TryGetValue("RightArm", out _cRightArm); AllCustomTransforms.TryGetValue("RightForeArm", out _cRightForeArm); AllCustomTransforms.TryGetValue("LeftArm", out _cLeftArm); AllCustomTransforms.TryGetValue("LeftForeArm", out _cLeftForeArm); AllCustomTransforms.TryGetValue("LeftHand", out _cLeftHand); if ((Object)(object)_cLeftHand != (Object)null) { int num = CustomBones.IndexOf(_cLeftHand); if (num != -1 && num < OriginalBones.Count) { _oLeftHand = OriginalBones[num]; } } _isCached = true; } public void Sync() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_0312: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: 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_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: 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_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_069b: 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_057d: Unknown result type (might be due to invalid IL or missing references) if (!_isCached) { BuildCache(); } SkinConfig skinConfig = SkinsMenu.GetSkinConfig(SkinName); if (IsStuff) { if (!((Object)(object)RootTransform != (Object)null)) { return; } Il2CppArrayBase componentsInChildren = ((Component)RootTransform).GetComponentsInChildren(true); foreach (Renderer item in componentsInChildren) { if (!item.enabled) { item.enabled = true; } } Vector3 localPosition = Vector3.zero; Vector3 val = Vector3.zero; if (IsLocalPlayer && skinConfig.EnableViewModel) { localPosition = skinConfig.VMPos; val = skinConfig.VMRot; RootTransform.localScale = BaseScale * skinConfig.VMScale; } else { if (skinConfig.BonePosOffsets.ContainsKey("Hips")) { localPosition = skinConfig.BonePosOffsets["Hips"]; } if (skinConfig.BoneRotOffsets.ContainsKey("Hips")) { val = skinConfig.BoneRotOffsets["Hips"]; } RootTransform.localScale = BaseScale; } localPosition.y += skinConfig.GlobalHeightOffset; RootTransform.localPosition = localPosition; RootTransform.localRotation = Quaternion.Euler(val); } else if (IsAccessory) { if (!((Object)(object)RootTransform != (Object)null)) { return; } Il2CppArrayBase componentsInChildren2 = ((Component)RootTransform).GetComponentsInChildren(true); foreach (Renderer item2 in componentsInChildren2) { if (!item2.enabled) { item2.enabled = true; } } Vector3 localPosition2 = (skinConfig.BonePosOffsets.ContainsKey("Root") ? skinConfig.BonePosOffsets["Root"] : Vector3.zero); localPosition2.y += skinConfig.GlobalHeightOffset; Vector3 val2 = (skinConfig.BoneRotOffsets.ContainsKey("Root") ? skinConfig.BoneRotOffsets["Root"] : Vector3.zero); RootTransform.localPosition = localPosition2; RootTransform.localRotation = Quaternion.Euler(val2); RootTransform.localScale = BaseScale; } else { if ((Object)(object)OriginalHips == (Object)null || (Object)(object)CustomHips == (Object)null) { return; } float globalHeightOffset = skinConfig.GlobalHeightOffset; bool flag = true; if ((Object)(object)Camera.main != (Object)null && (Object)(object)RootTransform != (Object)null) { float num = Vector3.Distance(((Component)Camera.main).transform.position, OriginalHips.position); if (num > 35f) { flag = false; } } if ((Object)(object)RootTransform != (Object)null) { RootTransform.localPosition = new Vector3(0f, globalHeightOffset, 0f); } if (!skinConfig.BonePosOffsets.ContainsKey("Hips")) { skinConfig.BonePosOffsets["Hips"] = GetDefaultPos("Hips"); } if (!skinConfig.BoneRotOffsets.ContainsKey("Hips")) { skinConfig.BoneRotOffsets["Hips"] = GetDefaultRot("Hips"); } Vector3 position = OriginalHips.position; if ((Object)(object)RootTransform != (Object)null && (Object)(object)RootTransform.parent != (Object)null) { position += RootTransform.parent.TransformDirection(skinConfig.BonePosOffsets["Hips"]); position += RootTransform.parent.up * globalHeightOffset; } else { position += skinConfig.BonePosOffsets["Hips"]; position += Vector3.up * globalHeightOffset; } CustomHips.position = position; CustomHips.rotation = OriginalHips.rotation * Quaternion.Euler(skinConfig.BoneRotOffsets["Hips"]); if (flag) { for (int i = 0; i < CustomBones.Count; i++) { if (!((Object)(object)CustomBones[i] == (Object)(object)CustomHips) && (Object)(object)CustomBones[i] != (Object)null && (Object)(object)OriginalBones[i] != (Object)null) { string text = ((Object)OriginalBones[i]).name.ToLower(); if (text.Contains("arm") || text.Contains("hand") || text.Contains("shoulder")) { CustomBones[i].rotation = OriginalBones[i].rotation; } else { CustomBones[i].localRotation = OriginalBones[i].localRotation; } } } } for (int j = 0; j < _staticTransforms.Length; j++) { Transform val3 = _staticTransforms[j]; if (!((Object)(object)val3 != (Object)null && flag)) { continue; } if (!CustomBones.Contains(val3)) { val3.localRotation = _staticRotations[j]; } else { val3.localRotation *= _staticRotations[j]; } if (!((Object)val3).name.ToLower().Contains("hand")) { if ((Object)(object)val3 == (Object)(object)RootTransform) { val3.localPosition = _staticPositions[j] + new Vector3(0f, globalHeightOffset, 0f); } else { val3.localPosition = _staticPositions[j]; } } } if (flag) { ApplyTwoBoneIK(_cRightArm, _cRightForeArm, CustomRightHand, OriginalRightHand, skinConfig); ApplyTwoBoneIK(_cLeftArm, _cLeftForeArm, _cLeftHand, _oLeftHand, skinConfig); } } } private void ApplyTwoBoneIK(Transform upper, Transform lower, Transform hand, Transform origHand, SkinConfig config) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)upper == (Object)null || (Object)(object)lower == (Object)null || (Object)(object)hand == (Object)null || (Object)(object)origHand == (Object)null) { return; } Vector3 val = origHand.position; string key = SkinManager.CleanBoneName(((Object)hand).name); if (config.BonePosOffsets.ContainsKey(key)) { Vector3 val2 = config.BonePosOffsets[key]; if (val2 != Vector3.zero) { val += origHand.rotation * val2; } } for (int i = 0; i < 10; i++) { Vector3 val3 = hand.position - lower.position; Vector3 val4 = val - lower.position; if (((Vector3)(ref val3)).sqrMagnitude > 0.0001f && ((Vector3)(ref val4)).sqrMagnitude > 0.0001f) { lower.rotation = Quaternion.FromToRotation(val3, val4) * lower.rotation; } Vector3 val5 = hand.position - upper.position; Vector3 val6 = val - upper.position; if (((Vector3)(ref val5)).sqrMagnitude > 0.0001f && ((Vector3)(ref val6)).sqrMagnitude > 0.0001f) { upper.rotation = Quaternion.FromToRotation(val5, val6) * upper.rotation; } } hand.rotation = origHand.rotation; if (config.BoneRotOffsets.ContainsKey(key)) { Vector3 val7 = config.BoneRotOffsets[key]; if (val7 != Vector3.zero) { hand.rotation *= Quaternion.Euler(val7); } } } } public class BoneSynchronizer : MonoBehaviour { public static Dictionary DataMap = new Dictionary(); public BoneSynchronizer(IntPtr ptr) : base(ptr) { } public static void ForceRecalculateAll() { foreach (SyncData value in DataMap.Values) { value.InvalidateCache(); } } public void LateUpdate() { SyncData value = null; if (DataMap.TryGetValue(((Il2CppObjectBase)this).Pointer, out value)) { value.Sync(); } } public void OnDestroy() { DataMap.Remove(((Il2CppObjectBase)this).Pointer); } } public static class ConfigManager { public static ConfigEntry MenuKey; public static ConfigEntry RememberState; public static ConfigEntry SavedMode; public static ConfigEntry SavedSingleSkin; public static ConfigEntry DisabledSkinsStr; public static ConfigEntry StuffModeStr; public static ConfigEntry StuffSkinsStr; public static ConfigEntry DisabledStuffStr; public static ConfigEntry DisabledStuffSkinsStr; public static ConfigEntry AccSizeTweaksStr; public static ConfigEntry AutoScaleSettings; public static ConfigEntry SizeTweaksStr; public static ConfigEntry JiggleEnabled; public static ConfigEntry JiggleStiffness; public static ConfigEntry JiggleDamping; public static ConfigEntry ActiveAccessoriesStr; private static ConfigFile _config; public static string PresetsFolder => Path.Combine(Paths.ConfigPath, "AntroSkinsPresets"); public static void Init(ConfigFile config) { _config = config; if (!Directory.Exists(PresetsFolder)) { Directory.CreateDirectory(PresetsFolder); } MenuKey = config.Bind("General", "MenuKey", (KeyCode)287, "Key to open Skins Menu"); RememberState = config.Bind("Settings", "RememberState", false, "Remember active skins between sessions"); SavedMode = config.Bind("Settings", "SavedMode", "None", "Last active mode"); SavedSingleSkin = config.Bind("Settings", "SavedSingleSkin", "", "Last selected single skin"); DisabledSkinsStr = config.Bind("Settings", "DisabledSkins", "", "Skins excluded from Random"); StuffModeStr = config.Bind("Settings", "StuffMode", "None", "Last stuff mode"); StuffSkinsStr = config.Bind("Settings", "StuffSkins", "", "Saved stuff skins dictionary"); DisabledStuffStr = config.Bind("Settings", "DisabledStuff", "", "Stuff categories excluded from Random"); DisabledStuffSkinsStr = config.Bind("Settings", "DisabledStuffSkins", "", "Specific stuff skins excluded from Random"); AccSizeTweaksStr = config.Bind("Settings", "AccSizeTweaks", "", "Custom scale for accessories"); AutoScaleSettings = config.Bind("Settings", "AutoScale", true, "Auto scale stuff to match vanilla"); SizeTweaksStr = config.Bind("Settings", "SizeTweaks", "", "Custom scale multipliers"); JiggleEnabled = config.Bind("Physics", "JiggleEnabled", true, "Enable jiggle physics on bones with 'jiggle' in name"); JiggleStiffness = config.Bind("Physics", "JiggleStiffness", 15f, "Jiggle spring stiffness"); JiggleDamping = config.Bind("Physics", "JiggleDamping", 0.8f, "Jiggle spring damping"); ActiveAccessoriesStr = config.Bind("Settings", "ActiveAccessories", "", "Currently equipped accessories"); LoadSettings(); } public static void LoadSettings() { if (RememberState.Value) { LoadPreset("_AutoSave"); } } public static void SaveSettings() { if (RememberState.Value) { SavePreset("_AutoSave"); } } public static void SavePreset(string name) { //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Unknown result type (might be due to invalid IL or missing references) //IL_0723: Unknown result type (might be due to invalid IL or missing references) string path = Path.Combine(PresetsFolder, name + ".txt"); using StreamWriter streamWriter = new StreamWriter(path); streamWriter.WriteLine("[MODES]"); streamWriter.WriteLine("PlayerMode=" + SkinManager.CurrentMode); streamWriter.WriteLine("PlayerSingle=" + SkinManager.GlobalSelectedSkin); streamWriter.WriteLine("StuffMode=" + StuffManager.CurrentMode); streamWriter.WriteLine("Disabled=" + string.Join("|", SkinManager.DisabledSkins)); streamWriter.WriteLine("DisabledStuff=" + string.Join("|", StuffManager.DisabledRandomTypes)); streamWriter.WriteLine("DisabledStuffSkins=" + string.Join("|", StuffManager.DisabledRandomStuffSkins)); List list = new List(); foreach (KeyValuePair sizeTweak in StuffManager.SizeTweaks) { list.Add(sizeTweak.Key + "=" + sizeTweak.Value.ToString("F3", CultureInfo.InvariantCulture)); } streamWriter.WriteLine("SizeTweaks=" + string.Join("|", list)); streamWriter.WriteLine(""); List list2 = new List(); foreach (KeyValuePair sizeTweak2 in AccessoryManager.SizeTweaks) { list2.Add(sizeTweak2.Key + "=" + sizeTweak2.Value.ToString("F3", CultureInfo.InvariantCulture)); } streamWriter.WriteLine("AccSizeTweaks=" + string.Join("|", list2.ToArray())); streamWriter.WriteLine("[PHYSICS]"); streamWriter.WriteLine($"JiggleEnabled={JiggleEnabled.Value}"); streamWriter.WriteLine("JiggleStiffness=" + JiggleStiffness.Value.ToString("F2", CultureInfo.InvariantCulture)); streamWriter.WriteLine("JiggleDamping=" + JiggleDamping.Value.ToString("F2", CultureInfo.InvariantCulture)); streamWriter.WriteLine(""); streamWriter.WriteLine("[ACCESSORIES]"); foreach (KeyValuePair activeAccessory in AccessoryManager.ActiveAccessories) { streamWriter.WriteLine(activeAccessory.Key + "=" + activeAccessory.Value); } streamWriter.WriteLine(""); streamWriter.WriteLine("[STUFF]"); foreach (KeyValuePair activeSkin in StuffManager.ActiveSkins) { streamWriter.WriteLine(activeSkin.Key + "=" + activeSkin.Value); } streamWriter.WriteLine(""); foreach (KeyValuePair skinConfig in SkinsMenu.SkinConfigs) { streamWriter.WriteLine("[SKIN_" + skinConfig.Key + "]"); streamWriter.WriteLine("Height=" + skinConfig.Value.GlobalHeightOffset.ToString("F3", CultureInfo.InvariantCulture)); streamWriter.WriteLine($"VM={skinConfig.Value.EnableViewModel}"); streamWriter.WriteLine("VMP=" + skinConfig.Value.VMPos.x.ToString("F3", CultureInfo.InvariantCulture) + "," + skinConfig.Value.VMPos.y.ToString("F3", CultureInfo.InvariantCulture) + "," + skinConfig.Value.VMPos.z.ToString("F3", CultureInfo.InvariantCulture)); streamWriter.WriteLine("VMR=" + skinConfig.Value.VMRot.x.ToString("F3", CultureInfo.InvariantCulture) + "," + skinConfig.Value.VMRot.y.ToString("F3", CultureInfo.InvariantCulture) + "," + skinConfig.Value.VMRot.z.ToString("F3", CultureInfo.InvariantCulture)); streamWriter.WriteLine("VMS=" + skinConfig.Value.VMScale.ToString("F3", CultureInfo.InvariantCulture)); foreach (KeyValuePair bonePosOffset in skinConfig.Value.BonePosOffsets) { if (bonePosOffset.Value != Vector3.zero || bonePosOffset.Key == "Hips") { streamWriter.WriteLine("P_" + bonePosOffset.Key + "=" + bonePosOffset.Value.x.ToString("F3", CultureInfo.InvariantCulture) + "," + bonePosOffset.Value.y.ToString("F3", CultureInfo.InvariantCulture) + "," + bonePosOffset.Value.z.ToString("F3", CultureInfo.InvariantCulture)); } } foreach (KeyValuePair boneRotOffset in skinConfig.Value.BoneRotOffsets) { if (boneRotOffset.Value != Vector3.zero || boneRotOffset.Key == "Hips") { streamWriter.WriteLine("R_" + boneRotOffset.Key + "=" + boneRotOffset.Value.x.ToString("F3", CultureInfo.InvariantCulture) + "," + boneRotOffset.Value.y.ToString("F3", CultureInfo.InvariantCulture) + "," + boneRotOffset.Value.z.ToString("F3", CultureInfo.InvariantCulture)); } } streamWriter.WriteLine(""); } } public static void LoadPreset(string name) { //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) string path = Path.Combine(PresetsFolder, name + ".txt"); if (!File.Exists(path)) { return; } string[] array = File.ReadAllLines(path); string text = ""; SkinConfig skinConfig = null; StuffManager.ActiveSkins.Clear(); StuffManager.SizeTweaks.Clear(); AccessoryManager.ActiveAccessories.Clear(); string[] array2 = array; foreach (string text2 in array2) { string text3 = text2.Trim(); if (string.IsNullOrWhiteSpace(text3)) { continue; } if (text3.StartsWith("[SKIN_")) { string skinName = text3.Substring(6, text3.Length - 7); skinConfig = SkinsMenu.GetSkinConfig(skinName); text = "SKIN_NEW"; continue; } if (text3.StartsWith("[")) { text = text3; continue; } switch (text) { case "[MODES]": { string[] array8 = text3.Split(new char[1] { '=' }, 2); if (array8.Length != 2) { break; } if (array8[0] == "PlayerMode" && Enum.TryParse(array8[1], out var result)) { SkinManager.CurrentMode = result; } if (array8[0] == "PlayerSingle") { SkinManager.GlobalSelectedSkin = array8[1]; } if (array8[0] == "StuffMode" && Enum.TryParse(array8[1], out var result2)) { StuffManager.CurrentMode = result2; } if (array8[0] == "Disabled") { SkinManager.DisabledSkins = new HashSet(array8[1].Split(new char[1] { '|' }, StringSplitOptions.RemoveEmptyEntries)); } if (array8[0] == "DisabledStuff") { StuffManager.DisabledRandomTypes = new HashSet(array8[1].Split(new char[1] { '|' }, StringSplitOptions.RemoveEmptyEntries)); } if (array8[0] == "DisabledStuffSkins") { StuffManager.DisabledRandomStuffSkins = new HashSet(array8[1].Split(new char[1] { '|' }, StringSplitOptions.RemoveEmptyEntries)); } if (array8[0] == "SizeTweaks" && !string.IsNullOrEmpty(array8[1])) { string[] array9 = array8[1].Split(new char[1] { '|' }); foreach (string text4 in array9) { string[] array10 = text4.Split(new char[1] { '=' }); if (array10.Length == 2 && float.TryParse(array10[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var result3)) { StuffManager.SizeTweaks[array10[0]] = result3; } } } if (!(array8[0] == "AccSizeTweaks") || string.IsNullOrEmpty(array8[1])) { break; } string[] array11 = array8[1].Split(new char[1] { '|' }); foreach (string text5 in array11) { string[] array12 = text5.Split(new char[1] { '=' }); if (array12.Length == 2 && float.TryParse(array12[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var result4)) { AccessoryManager.SizeTweaks[array12[0]] = result4; } } break; } case "[PHYSICS]": { string[] array5 = text3.Split(new char[1] { '=' }, 2); if (array5.Length == 2) { if (array5[0] == "JiggleEnabled") { JiggleEnabled.Value = bool.Parse(array5[1]); } if (array5[0] == "JiggleStiffness") { JiggleStiffness.Value = float.Parse(array5[1], CultureInfo.InvariantCulture); } if (array5[0] == "JiggleDamping") { JiggleDamping.Value = float.Parse(array5[1], CultureInfo.InvariantCulture); } } break; } case "[ACCESSORIES]": { string[] array7 = text3.Split(new char[1] { '=' }, 2); if (array7.Length == 2) { AccessoryManager.ActiveAccessories[array7[0]] = array7[1]; } break; } case "[STUFF]": { string[] array6 = text3.Split(new char[1] { '=' }, 2); if (array6.Length == 2) { StuffManager.ActiveSkins[array6[0]] = array6[1]; } break; } case "SKIN_NEW": if (skinConfig == null) { break; } if (text3.StartsWith("Height=")) { float.TryParse(text3.Substring(7), NumberStyles.Any, CultureInfo.InvariantCulture, out skinConfig.GlobalHeightOffset); } else if (text3.StartsWith("VM=")) { skinConfig.EnableViewModel = bool.Parse(text3.Substring(3)); } else if (text3.StartsWith("VMP=")) { skinConfig.VMPos = ParseVector(text3.Substring(4)); } else if (text3.StartsWith("VMR=")) { skinConfig.VMRot = ParseVector(text3.Substring(4)); } else if (text3.StartsWith("VMS=")) { float.TryParse(text3.Substring(4), NumberStyles.Any, CultureInfo.InvariantCulture, out skinConfig.VMScale); } else if (text3.StartsWith("P_")) { string[] array3 = text3.Substring(2).Split(new char[1] { '=' }); if (array3.Length == 2) { skinConfig.BonePosOffsets[array3[0]] = ParseVector(array3[1]); } } else if (text3.StartsWith("R_")) { string[] array4 = text3.Substring(2).Split(new char[1] { '=' }); if (array4.Length == 2) { skinConfig.BoneRotOffsets[array4[0]] = ParseVector(array4[1]); } } break; } } SkinManager.FastUpdateNextFrame = true; BoneSynchronizer.ForceRecalculateAll(); } private static Vector3 ParseVector(string data) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) string[] array = data.Split(new char[1] { ',' }); if (array.Length == 3 && float.TryParse(array[0], NumberStyles.Any, CultureInfo.InvariantCulture, out var result) && float.TryParse(array[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var result2) && float.TryParse(array[2], NumberStyles.Any, CultureInfo.InvariantCulture, out var result3)) { return new Vector3(result, result2, result3); } return Vector3.zero; } } [BepInPlugin("Antro.Skins", "Antro Client Avatars", "1.6.0")] public class Plugin : BasePlugin { public static Plugin Instance { get; private set; } public override void Load() { Instance = this; SkinManager.InitFolders(); AccessoryManager.InitFolder(); ConfigManager.Init(((BasePlugin)this).Config); ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); Harmony.CreateAndPatchAll(typeof(Patches), (string)null); SceneManager.sceneLoaded += UnityAction.op_Implicit((Action)delegate { SkinManager.ForceReshuffle = true; SkinManager.FastUpdateNextFrame = true; }); ((BasePlugin)this).Log.LogInfo((object)"Antro Client Avatars 1.6.0 Loaded! Jiggle & Accessories Active!"); } } internal static class Patches { [HarmonyPatch(typeof(MonoBehaviourPublicObInVoAwVoVoVoVoVoVoUnique), "Awake")] [HarmonyPostfix] public static void SpawnSystem() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown if ((Object)(object)GameObject.Find("AntroSkinsSystem") == (Object)null) { GameObject val = new GameObject("AntroSkinsSystem"); Object.DontDestroyOnLoad((Object)(object)val); val.AddComponent(); } } [HarmonyPatch(typeof(MonoBehaviourPublicObVeSiVeRiSiAnVeanTrUnique), "Start")] [HarmonyPostfix] public static void OnPlayerSpawn() { SkinManager.FastUpdateNextFrame = true; } } public static class SkinManager { public enum SkinMode { None, Single, Random } public static SkinMode CurrentMode = SkinMode.None; public static string GlobalSelectedSkin = ""; public static bool ForceReshuffle = false; public static bool FastUpdateNextFrame = false; public static HashSet DisabledSkins = new HashSet(); public static Dictionary PersistentRandomSkins = new Dictionary(); private static Dictionary _loadedBundles = new Dictionary(); private static Dictionary _loadedPrefabs = new Dictionary(); private static Dictionary ExactMixamoToCrab = new Dictionary { { "Hips", "hips" }, { "Spine", "spine" }, { "Spine1", "chest" }, { "Spine2", "upperchest" }, { "Neck", "neck" }, { "Head", "head" }, { "LeftShoulder", "shoulderl" }, { "LeftArm", "upperarml" }, { "LeftForeArm", "lowerarml" }, { "LeftHand", "handl" }, { "RightShoulder", "shoulderr" }, { "RightArm", "upperarmr" }, { "RightForeArm", "lowerarmr" }, { "RightHand", "handr" }, { "LeftUpLeg", "legl" }, { "LeftLeg", "footl" }, { "LeftFoot", "toel" }, { "RightUpLeg", "legr" }, { "RightLeg", "footr" }, { "RightFoot", "toer" } }; private static string BasePath => Path.Combine(Paths.PluginPath, "AntroSkins"); private static string PlayersPath => Path.Combine(BasePath, "Players"); private static string NormalizeName(string name) { return name.ToLower().Replace(" ", "").Replace(".", "") .Replace("_", ""); } public static string CleanBoneName(string name) { return name.Replace("mixamorig:", "").Replace(":", "_").Replace("/", "_") .Replace("|", "_"); } public static void InitFolders() { if (!Directory.Exists(BasePath)) { Directory.CreateDirectory(BasePath); } if (!Directory.Exists(PlayersPath)) { Directory.CreateDirectory(PlayersPath); } StuffManager.InitFolder(); } public static List GetAvailableSkins() { List list = new List(); if (Directory.Exists(PlayersPath)) { string[] files = Directory.GetFiles(PlayersPath, "*.bundle"); foreach (string path in files) { list.Add(Path.GetFileName(path)); } } return list; } public static GameObject GetOrLoadPrefab(string skinName) { if (_loadedPrefabs.ContainsKey(skinName)) { if ((Object)(object)_loadedPrefabs[skinName] != (Object)null) { return _loadedPrefabs[skinName]; } _loadedPrefabs.Remove(skinName); } string text = Path.Combine(PlayersPath, skinName); if (!File.Exists(text)) { return null; } if (!_loadedBundles.ContainsKey(skinName)) { AssetBundle val = AssetBundle.LoadFromFile(text); if (val == null) { return null; } _loadedBundles[skinName] = val; } Il2CppReferenceArray val2 = _loadedBundles[skinName].LoadAllAssets(Il2CppType.Of()); foreach (Object item in (Il2CppArrayBase)(object)val2) { GameObject val3 = ((Il2CppObjectBase)item).Cast(); if ((Object)(object)val3 != (Object)null && (Object)(object)val3.transform.parent == (Object)null) { Object.DontDestroyOnLoad((Object)(object)val3); val3.SetActive(false); _loadedPrefabs[skinName] = val3; return val3; } } return null; } public static void DisableAll() { CurrentMode = SkinMode.None; GlobalSelectedSkin = ""; PersistentRandomSkins.Clear(); ApplyModels(); } public static void ApplySingleSkin(string skinName) { GlobalSelectedSkin = skinName; CurrentMode = SkinMode.Single; ApplyModels(); } public static void ApplyRandomSkins() { CurrentMode = SkinMode.Random; ForceReshuffle = true; PersistentRandomSkins.Clear(); ApplyModels(); } private static void SetLayerRecursively(GameObject obj, int newLayer) { if (!((Object)(object)obj == (Object)null)) { obj.layer = newLayer; for (int i = 0; i < obj.transform.childCount; i++) { SetLayerRecursively(((Component)obj.transform.GetChild(i)).gameObject, newLayer); } } } private static Bounds GetModelBounds(GameObject obj) { //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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) Renderer[] array = Il2CppArrayBase.op_Implicit(obj.GetComponentsInChildren()); Bounds bounds = default(Bounds); ((Bounds)(ref bounds))..ctor(obj.transform.position, Vector3.zero); bool flag = false; Renderer[] array2 = array; foreach (Renderer val in array2) { bool flag2 = false; Transform val2 = ((Component)val).transform; while ((Object)(object)val2 != (Object)null && (Object)(object)val2 != (Object)(object)obj.transform) { if (((Object)val2).name.StartsWith("AntroAccessory_") || ((Object)val2).name.StartsWith("AntroSkin_")) { flag2 = true; break; } val2 = val2.parent; } if (!flag2) { if (!flag) { bounds = val.bounds; flag = true; } else { ((Bounds)(ref bounds)).Encapsulate(val.bounds); } } } return bounds; } private static void UpdateVanillaVisibility(Transform originalVisuals, Transform playerRoot, bool hideBody) { Il2CppArrayBase componentsInChildren = ((Component)originalVisuals).GetComponentsInChildren(true); foreach (Renderer item in componentsInChildren) { if ((Object)(object)item == (Object)null || ((Object)((Component)item).gameObject).name.StartsWith("AntroSkin_")) { continue; } bool flag = !hideBody; if (hideBody) { Transform val = ((Component)item).transform; while ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)playerRoot.parent) { string text = ((Object)val).name.ToLower(); if (text.Contains("crown") || text.Contains("handr") || text.Contains("handl") || text.Contains("righthand") || text.Contains("lefthand") || text.Contains("weaponpivot")) { flag = true; break; } val = val.parent; } } if (flag) { AntroRendererHider component = ((Component)item).GetComponent(); if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = false; Object.Destroy((Object)(object)component); } item.enabled = true; } else { item.enabled = false; if ((Object)(object)((Component)item).gameObject.GetComponent() == (Object)null) { ((Component)item).gameObject.AddComponent(); } } } } public static void ApplyModels() { //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_068b: 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_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) Il2CppArrayBase val = Object.FindObjectsOfType(); List availableSkins = GetAvailableSkins(); List list = new List(); foreach (string item in availableSkins) { if (!DisabledSkins.Contains(item)) { list.Add(item); } } foreach (MonoBehaviourPublicObVeSiVeRiSiAnVeanTrUnique item2 in val) { if ((Object)(object)item2 == (Object)null) { continue; } Transform transform = ((Component)item2).transform; Transform val2 = transform.Find("PlayerModel"); SkinnedMeshRenderer val3 = null; if ((Object)(object)val2 == (Object)null) { val3 = ((Component)transform).GetComponentInChildren(); if ((Object)(object)val3 != (Object)null) { val2 = ((Component)val3).transform; } } else { val3 = ((Component)val2).GetComponentInChildren(); } if ((Object)(object)val2 == (Object)null || (Object)(object)val3 == (Object)null) { continue; } Transform val4 = null; string text = ""; foreach (Transform componentsInChild in ((Component)transform).GetComponentsInChildren(true)) { if (((Object)componentsInChild).name.StartsWith("AntroSkin_Player_")) { val4 = componentsInChild; text = ((Object)componentsInChild).name.Replace("AntroSkin_Player_", ""); break; } } ulong num = 0uL; MonoBehaviourPublicCSstReshTrheObplBojuUnique component = ((Component)item2).GetComponent(); if ((Object)(object)component != (Object)null) { _ = component.steamProfile; if (true) { num = component.steamProfile.m_SteamID; goto IL_01bb; } } num = (ulong)((Object)((Component)item2).gameObject).GetInstanceID(); goto IL_01bb; IL_01bb: if (CurrentMode == SkinMode.None) { if ((Object)(object)val4 != (Object)null) { Object.Destroy((Object)(object)((Component)val4).gameObject); } UpdateVanillaVisibility(val2, transform, hideBody: false); continue; } string text2 = text; if (CurrentMode == SkinMode.Single) { text2 = GlobalSelectedSkin; } else if (CurrentMode == SkinMode.Random && list.Count > 0) { if (!PersistentRandomSkins.ContainsKey(num) || !availableSkins.Contains(PersistentRandomSkins[num])) { PersistentRandomSkins[num] = list[Random.Range(0, list.Count)]; } text2 = PersistentRandomSkins[num]; } if (string.IsNullOrEmpty(text2)) { continue; } if ((Object)(object)val4 != (Object)null && text == text2) { UpdateVanillaVisibility(val2, transform, hideBody: true); continue; } if ((Object)(object)val4 != (Object)null && text != text2) { Object.Destroy((Object)(object)((Component)val4).gameObject); val4 = null; } Shader shader = Shader.Find("Standard"); Renderer componentInChildren = ((Component)val2).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && (Object)(object)componentInChildren.sharedMaterial != (Object)null) { shader = componentInChildren.sharedMaterial.shader; } val3.updateWhenOffscreen = true; Animator val5 = ((Component)val2).GetComponent(); if ((Object)(object)val5 == (Object)null) { val5 = ((Component)transform).GetComponentInChildren(); } if ((Object)(object)val5 != (Object)null) { val5.cullingMode = (AnimatorCullingMode)0; } UpdateVanillaVisibility(val2, transform, hideBody: true); if (!((Object)(object)val4 == (Object)null)) { continue; } GameObject orLoadPrefab = GetOrLoadPrefab(text2); if (!((Object)(object)orLoadPrefab != (Object)null)) { continue; } GameObject val6 = Object.Instantiate(orLoadPrefab, transform); ((Object)val6).name = "AntroSkin_Player_" + text2; val6.SetActive(true); foreach (Animator componentsInChild2 in val6.GetComponentsInChildren(true)) { componentsInChild2.applyRootMotion = false; componentsInChild2.cullingMode = (AnimatorCullingMode)0; } foreach (Transform componentsInChild3 in val6.GetComponentsInChildren(true)) { if (((Object)componentsInChild3).name.ToLower().Contains("jiggle") && (Object)(object)((Component)componentsInChild3).gameObject.GetComponent() == (Object)null) { ((Component)componentsInChild3).gameObject.AddComponent(); } } foreach (Camera componentsInChild4 in val6.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild4); } foreach (AudioListener componentsInChild5 in val6.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild5); } foreach (Collider componentsInChild6 in val6.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild6); } foreach (Rigidbody componentsInChild7 in val6.GetComponentsInChildren(true)) { Object.Destroy((Object)(object)componentsInChild7); } SkinnedMeshRenderer componentInChildren2 = val6.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null) { componentInChildren2.updateWhenOffscreen = true; componentInChildren2.localBounds = new Bounds(Vector3.zero, new Vector3(50f, 50f, 50f)); } foreach (Renderer componentsInChild8 in val6.GetComponentsInChildren()) { foreach (Material item3 in (Il2CppArrayBase)(object)componentsInChild8.materials) { if ((Object)(object)item3 != (Object)null) { item3.shader = shader; } } if ((Object)(object)((Component)componentsInChild8).gameObject.GetComponent() == (Object)null) { MonoBehaviourPublicHa1MeObouCoSiouBoprUnique val7 = ((Component)componentsInChild8).gameObject.AddComponent(); ((Behaviour)val7).enabled = false; } } val6.transform.localPosition = Vector3.zero; val6.transform.localRotation = orLoadPrefab.transform.localRotation; Bounds modelBounds = GetModelBounds(val6); float num2 = 2f; Bounds modelBounds2 = GetModelBounds(((Component)val2).gameObject); if (((Bounds)(ref modelBounds2)).size.y > 0.1f) { num2 = ((Bounds)(ref modelBounds2)).size.y; } if (((Bounds)(ref modelBounds)).size.y > 0.01f) { float num3 = num2 / ((Bounds)(ref modelBounds)).size.y; float num4 = val6.transform.localScale.y * num3; val6.transform.localScale = new Vector3(num4, num4, num4); } BoneSynchronizer boneSynchronizer = val6.AddComponent(); SyncData syncData = new SyncData(); syncData.SkinName = text2; syncData.RootTransform = val6.transform; Dictionary dictionary = new Dictionary(); foreach (Transform componentsInChild9 in ((Component)transform).GetComponentsInChildren(true)) { bool flag = false; Transform val8 = componentsInChild9; while ((Object)(object)val8 != (Object)null && (Object)(object)val8 != (Object)(object)transform) { if (((Object)val8).name.StartsWith("AntroAccessory_") || ((Object)val8).name.StartsWith("AntroSkin_Stuff_") || ((Object)val8).name.StartsWith("AntroSkin_Player_")) { flag = true; break; } val8 = val8.parent; } if (!flag) { string key = NormalizeName(((Object)componentsInChild9).name); if (!dictionary.ContainsKey(key)) { dictionary[key] = componentsInChild9; } } } foreach (Transform componentsInChild10 in val6.GetComponentsInChildren(true)) { string text3 = CleanBoneName(((Object)componentsInChild10).name); if (!syncData.AllCustomTransforms.ContainsKey(text3)) { syncData.AllCustomTransforms.Add(text3, componentsInChild10); syncData.InitialLocalPositions.Add(text3, componentsInChild10.localPosition); syncData.InitialLocalRotations.Add(text3, componentsInChild10.localRotation); } if (ExactMixamoToCrab.TryGetValue(text3, out var value) && dictionary.TryGetValue(value, out var value2)) { syncData.CustomBones.Add(componentsInChild10); syncData.OriginalBones.Add(value2); if (text3 == "Hips") { syncData.CustomHips = componentsInChild10; syncData.OriginalHips = value2; } if (text3 == "RightHand") { syncData.CustomRightHand = componentsInChild10; syncData.OriginalRightHand = value2; } } } BoneSynchronizer.DataMap[((Il2CppObjectBase)boneSynchronizer).Pointer] = syncData; SetLayerRecursively(val6, ((Component)val2).gameObject.layer); } if (ForceReshuffle) { ForceReshuffle = false; } } } public class SkinConfig { public float GlobalHeightOffset = 0f; public Dictionary BonePosOffsets = new Dictionary(); public Dictionary BoneRotOffsets = new Dictionary(); public bool EnableViewModel = false; public Vector3 VMPos = Vector3.zero; public Vector3 VMRot = Vector3.zero; public float VMScale = 1f; } public class SkinsMenu : MonoBehaviour { private bool _isWaitingForKey = false; private bool _isMenuOpen = false; private Rect _windowRect = new Rect(20f, 20f, 550f, 700f); private Vector2 _scrollPos = Vector2.zero; private Vector2 _bonesScrollPos = Vector2.zero; private Vector2 _tweakerScrollPos = Vector2.zero; private List _availablePlayerSkins = new List(); private int _currentTab = 0; private string[] _tabs = new string[5] { "Skins", "Accessories", "Tweaker", "Share", "Presets" }; private int _categoryTab = 0; private string[] _categories = new string[2] { "Players", "Stuff (Weapons)" }; public string _selectedSkinInList = ""; private string _presetInputName = "MyPreset"; private string _shareInputString = ""; private string _shareStatus = ""; private string _accScaleInputStr = null; public static Dictionary SkinConfigs = new Dictionary(); private string _globalHeightStr; private string[] _currentSkinBones = new string[0]; private string _lastLoadedBonesSkin = ""; private string _currentBoneEditing = ""; private string _posXStr; private string _posYStr; private string _posZStr; private string _rotXStr; private string _rotYStr; private string _rotZStr; private string _vmPosXStr; private string _vmPosYStr; private string _vmPosZStr; private string _vmRotXStr; private string _vmRotYStr; private string _vmRotZStr; private string _vmScaleStr; private bool _editPositionMode = false; private string _boneSearchQuery = ""; private int _boneSortMode = 0; private float _slowUpdateTimer = 0f; private int _accessoryBoneTab = 0; public SkinsMenu(IntPtr ptr) : base(ptr) { }//IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) public static SkinConfig GetSkinConfig(string skinName) { if (string.IsNullOrEmpty(skinName)) { return new SkinConfig(); } if (!SkinConfigs.ContainsKey(skinName)) { SkinConfigs[skinName] = new SkinConfig(); } return SkinConfigs[skinName]; } public void Start() { RefreshLists(); } public void Update() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) if (!_isWaitingForKey && Input.GetKeyDown(ConfigManager.MenuKey.Value)) { bool isMenuOpen = _isMenuOpen; _isMenuOpen = !_isMenuOpen; Cursor.lockState = (CursorLockMode)((!_isMenuOpen) ? 1 : 0); Cursor.visible = _isMenuOpen; if (isMenuOpen && !_isMenuOpen && ConfigManager.RememberState.Value) { ConfigManager.SaveSettings(); } } _slowUpdateTimer += Time.deltaTime; if (_slowUpdateTimer > 0.5f) { _slowUpdateTimer = 0f; SkinManager.ApplyModels(); StuffManager.ApplyModels(); AccessoryManager.ApplyModels(); } if (SkinManager.FastUpdateNextFrame) { SkinManager.FastUpdateNextFrame = false; SkinManager.ApplyModels(); StuffManager.ApplyModels(); AccessoryManager.ApplyModels(); } } public void OnGUI() { //IL_006d: 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_008d: 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_0021: Invalid comparison between Unknown and I4 //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (_isWaitingForKey) { Event current = Event.current; if (current.isKey && (int)current.type == 4 && (int)current.keyCode > 0) { ConfigManager.MenuKey.Value = current.keyCode; ConfigManager.SaveSettings(); _isWaitingForKey = false; current.Use(); } } if (_isMenuOpen) { _windowRect = GUI.Window(8889, _windowRect, DelegateSupport.ConvertDelegate((Delegate)new Action(DrawWindow)), "Antro Client Avatars 1.6"); } } private void RefreshLists() { _availablePlayerSkins = SkinManager.GetAvailableSkins(); if (_availablePlayerSkins.Contains(_selectedSkinInList)) { return; } bool flag = false; string[] stuffTypes = StuffManager.StuffTypes; foreach (string itemType in stuffTypes) { if (StuffManager.GetAvailableSkins(itemType).Contains(_selectedSkinInList)) { flag = true; break; } } if (!flag) { _selectedSkinInList = ""; } } private void DrawWindow(int windowID) { GUILayout.Space(5f); _currentTab = GUILayout.Toolbar(_currentTab, Il2CppStringArray.op_Implicit(_tabs), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }); GUILayout.Space(10f); if (_currentTab == 0) { DrawSkinsTab(); } else if (_currentTab == 1) { DrawAccessoriesTab(); } else if (_currentTab == 2) { DrawTweakerTab(); } else if (_currentTab == 3) { DrawShareTab(); } else if (_currentTab == 4) { DrawPresetsTab(); } GUI.DragWindow(); } private void DrawAccessoriesTab() { //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_0027: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("--- ACCESSORIES MANAGER ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUIStyle val = new GUIStyle(GUI.skin.label); val.normal.textColor = Color.yellow; GUILayout.Label("Add accessories to specific body parts. Works with any skin or vanilla Crabs!", val, Array.Empty()); GUILayout.Space(10f); _accessoryBoneTab = GUILayout.Toolbar(_accessoryBoneTab, Il2CppStringArray.op_Implicit(AccessoryManager.AccessoryBones), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }); string text = AccessoryManager.AccessoryBones[_accessoryBoneTab]; GUILayout.Space(10f); if (GUILayout.Button("CLEAR THIS SLOT", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { AccessoryManager.ActiveAccessories.Remove(text); ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } GUILayout.Space(10f); List availableAccessories = AccessoryManager.GetAvailableAccessories(text); _scrollPos = GUILayout.BeginScrollView(_scrollPos, GUI.skin.box); if (availableAccessories.Count == 0) { GUILayout.Label("No .bundle files in AntroSkins/Accessories/" + text + "/", Array.Empty()); } AccessoryManager.ActiveAccessories.TryGetValue(text, out var value); if (!string.IsNullOrEmpty(value)) { GUILayout.BeginHorizontal(GUI.skin.box, Array.Empty()); string key = text + "_" + value; float num = (AccessoryManager.SizeTweaks.ContainsKey(key) ? AccessoryManager.SizeTweaks[key] : 1f); if (_accScaleInputStr == null) { _accScaleInputStr = num.ToString("F3"); } GUILayout.Label("Scale [" + value + "]:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); _accScaleInputStr = GUILayout.TextField(_accScaleInputStr, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); if (float.TryParse(_accScaleInputStr.Replace(',', '.'), NumberStyles.Any, CultureInfo.InvariantCulture, out var result) && Mathf.Abs(result - num) > 0.001f) { AccessoryManager.SizeTweaks[key] = result; ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } if (GUILayout.Button("Reset Scale", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) })) { AccessoryManager.SizeTweaks.Remove(key); _accScaleInputStr = null; ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } GUILayout.EndHorizontal(); GUILayout.Space(5f); } else { _accScaleInputStr = null; } foreach (string item in availableAccessories) { GUI.color = ((value == item) ? Color.green : Color.white); if (GUILayout.Button(item.Replace(".bundle", ""), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { AccessoryManager.ActiveAccessories[text] = item; _selectedSkinInList = "ACC_" + text + "_" + item; ResetInputStrings(); ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } GUI.color = Color.white; } GUILayout.EndScrollView(); } private void DrawShareTab() { //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_0027: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("--- SHARE SKIN CONFIGURATION ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); if (string.IsNullOrEmpty(_selectedSkinInList)) { GUIStyle val = new GUIStyle(GUI.skin.label); val.normal.textColor = Color.red; val.fontStyle = (FontStyle)1; GUILayout.Label("NO SKIN SELECTED! Select a skin in the 'Skins' tab first.", val, Array.Empty()); return; } string text = ((_categoryTab == 0) ? "Player Skin" : "Weapon Skin"); string text2 = _selectedSkinInList.Replace(".bundle", ""); GUILayout.Space(10f); string text3 = "Target " + text + ": " + text2; GUIStyle val2 = new GUIStyle(GUI.skin.label); val2.normal.textColor = Color.cyan; GUILayout.Label(text3, val2, Array.Empty()); GUILayout.Space(10f); if (GUILayout.Button("COPY CONFIG TO CLIPBOARD", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) })) { string systemCopyBuffer = ((_categoryTab == 0) ? ExportToBase64(_selectedSkinInList) : ExportStuffToBase64(StuffMenuUI.SelectedItemType, _selectedSkinInList)); GUIUtility.systemCopyBuffer = systemCopyBuffer; _shareStatus = "Config copied to clipboard!"; } GUILayout.Space(30f); GUILayout.Label("--- IMPORT CONFIG ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUILayout.Label("Paste code from your friend here:", Array.Empty()); _shareInputString = GUILayout.TextField(_shareInputString, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }); if (GUILayout.Button("APPLY IMPORTED CODE", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(40f) })) { bool flag = false; if ((_categoryTab != 0) ? ImportStuffFromBase64(_shareInputString, StuffMenuUI.SelectedItemType, _selectedSkinInList) : ImportFromBase64(_shareInputString, _selectedSkinInList)) { _shareStatus = "Successfully applied!"; ConfigManager.SaveSettings(); if (_categoryTab == 0) { BoneSynchronizer.ForceRecalculateAll(); } else { SkinManager.FastUpdateNextFrame = true; } _shareInputString = ""; ResetInputStrings(); } else { _shareStatus = "Error: Invalid code!"; } } if (!string.IsNullOrEmpty(_shareStatus)) { GUILayout.Space(10f); GUI.color = (_shareStatus.Contains("Error") ? Color.red : Color.green); GUILayout.Label(_shareStatus, new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUI.color = Color.white; } } private string ExportToBase64(string skinName) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: 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) SkinConfig skinConfig = GetSkinConfig(skinName); string text = "H:" + skinConfig.GlobalHeightOffset.ToString("F3", CultureInfo.InvariantCulture); foreach (KeyValuePair bonePosOffset in skinConfig.BonePosOffsets) { if (bonePosOffset.Value != Vector3.zero) { text = text + "|P_" + bonePosOffset.Key + ":" + bonePosOffset.Value.x.ToString("F3", CultureInfo.InvariantCulture) + "," + bonePosOffset.Value.y.ToString("F3", CultureInfo.InvariantCulture) + "," + bonePosOffset.Value.z.ToString("F3", CultureInfo.InvariantCulture); } } foreach (KeyValuePair boneRotOffset in skinConfig.BoneRotOffsets) { if (boneRotOffset.Value != Vector3.zero) { text = text + "|R_" + boneRotOffset.Key + ":" + boneRotOffset.Value.x.ToString("F3", CultureInfo.InvariantCulture) + "," + boneRotOffset.Value.y.ToString("F3", CultureInfo.InvariantCulture) + "," + boneRotOffset.Value.z.ToString("F3", CultureInfo.InvariantCulture); } } byte[] bytes = Encoding.UTF8.GetBytes(text); return Convert.ToBase64String(bytes).Replace("+", "-").Replace("/", "_") .TrimEnd(new char[1] { '=' }); } private bool ImportFromBase64(string b64, string targetSkinName) { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) try { if (string.IsNullOrEmpty(b64)) { return false; } string text = b64.Replace("-", "+").Replace("_", "/"); switch (text.Length % 4) { case 2: text += "=="; break; case 3: text += "="; break; } byte[] bytes = Convert.FromBase64String(text); string @string = Encoding.UTF8.GetString(bytes); SkinConfig skinConfig = GetSkinConfig(targetSkinName); skinConfig.GlobalHeightOffset = 0f; skinConfig.BonePosOffsets.Clear(); skinConfig.BoneRotOffsets.Clear(); string[] array = @string.Split(new char[1] { '|' }); string[] array2 = array; foreach (string text2 in array2) { if (text2.StartsWith("H:")) { float.TryParse(text2.Substring(2), NumberStyles.Any, CultureInfo.InvariantCulture, out skinConfig.GlobalHeightOffset); } else if (text2.StartsWith("P_")) { string[] array3 = text2.Substring(2).Split(new char[1] { ':' }); if (array3.Length == 2) { skinConfig.BonePosOffsets[array3[0]] = ParseVector(array3[1]); } } else if (text2.StartsWith("R_")) { string[] array4 = text2.Substring(2).Split(new char[1] { ':' }); if (array4.Length == 2) { skinConfig.BoneRotOffsets[array4[0]] = ParseVector(array4[1]); } } } return true; } catch { return false; } } private string ExportStuffToBase64(string itemType, string skinName) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) SkinConfig skinConfig = GetSkinConfig(skinName); string text = "H:" + skinConfig.GlobalHeightOffset.ToString("F3", CultureInfo.InvariantCulture); foreach (KeyValuePair bonePosOffset in skinConfig.BonePosOffsets) { if (bonePosOffset.Value != Vector3.zero) { text = text + "|P_" + bonePosOffset.Key + ":" + bonePosOffset.Value.x.ToString("F3", CultureInfo.InvariantCulture) + "," + bonePosOffset.Value.y.ToString("F3", CultureInfo.InvariantCulture) + "," + bonePosOffset.Value.z.ToString("F3", CultureInfo.InvariantCulture); } } foreach (KeyValuePair boneRotOffset in skinConfig.BoneRotOffsets) { if (boneRotOffset.Value != Vector3.zero) { text = text + "|R_" + boneRotOffset.Key + ":" + boneRotOffset.Value.x.ToString("F3", CultureInfo.InvariantCulture) + "," + boneRotOffset.Value.y.ToString("F3", CultureInfo.InvariantCulture) + "," + boneRotOffset.Value.z.ToString("F3", CultureInfo.InvariantCulture); } } text += string.Format("|VM:{0}|VMP:{1},{2},{3}|VMR:{4},{5},{6}|VMS:{7}", skinConfig.EnableViewModel ? 1 : 0, skinConfig.VMPos.x.ToString("F3", CultureInfo.InvariantCulture), skinConfig.VMPos.y.ToString("F3", CultureInfo.InvariantCulture), skinConfig.VMPos.z.ToString("F3", CultureInfo.InvariantCulture), skinConfig.VMRot.x.ToString("F3", CultureInfo.InvariantCulture), skinConfig.VMRot.y.ToString("F3", CultureInfo.InvariantCulture), skinConfig.VMRot.z.ToString("F3", CultureInfo.InvariantCulture), skinConfig.VMScale.ToString("F3", CultureInfo.InvariantCulture)); text = text + "|S:" + StuffManager.GetSizeTweak(itemType, skinName).ToString("F3", CultureInfo.InvariantCulture); byte[] bytes = Encoding.UTF8.GetBytes(text); return Convert.ToBase64String(bytes).Replace("+", "-").Replace("/", "_") .TrimEnd(new char[1] { '=' }); } private bool ImportStuffFromBase64(string b64, string itemType, string skinName) { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) try { if (string.IsNullOrEmpty(b64)) { return false; } string text = b64.Replace("-", "+").Replace("_", "/"); switch (text.Length % 4) { case 2: text += "=="; break; case 3: text += "="; break; } byte[] bytes = Convert.FromBase64String(text); string @string = Encoding.UTF8.GetString(bytes); SkinConfig skinConfig = GetSkinConfig(skinName); skinConfig.GlobalHeightOffset = 0f; skinConfig.BonePosOffsets.Clear(); skinConfig.BoneRotOffsets.Clear(); string[] array = @string.Split(new char[1] { '|' }); string[] array2 = array; foreach (string text2 in array2) { if (text2.StartsWith("H:")) { float.TryParse(text2.Substring(2), NumberStyles.Any, CultureInfo.InvariantCulture, out skinConfig.GlobalHeightOffset); } else if (text2.StartsWith("P_")) { string[] array3 = text2.Substring(2).Split(new char[1] { ':' }); if (array3.Length == 2) { skinConfig.BonePosOffsets[array3[0]] = ParseVector(array3[1]); } } else if (text2.StartsWith("R_")) { string[] array4 = text2.Substring(2).Split(new char[1] { ':' }); if (array4.Length == 2) { skinConfig.BoneRotOffsets[array4[0]] = ParseVector(array4[1]); } } else if (text2.StartsWith("S:")) { if (float.TryParse(text2.Substring(2), NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { StuffManager.SizeTweaks[itemType + "_" + skinName] = result; } } else if (text2.StartsWith("VM:")) { skinConfig.EnableViewModel = text2.Substring(3) == "1"; } else if (text2.StartsWith("VMP:")) { skinConfig.VMPos = ParseVector(text2.Substring(4)); } else if (text2.StartsWith("VMR:")) { skinConfig.VMRot = ParseVector(text2.Substring(4)); } else if (text2.StartsWith("VMS:")) { float.TryParse(text2.Substring(4), NumberStyles.Any, CultureInfo.InvariantCulture, out skinConfig.VMScale); } } return true; } catch { return false; } } private static Vector3 ParseVector(string data) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) string[] array = data.Split(new char[1] { ',' }); if (array.Length == 3 && float.TryParse(array[0], NumberStyles.Any, CultureInfo.InvariantCulture, out var result) && float.TryParse(array[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var result2) && float.TryParse(array[2], NumberStyles.Any, CultureInfo.InvariantCulture, out var result3)) { return new Vector3(result, result2, result3); } return Vector3.zero; } private void DrawPresetsTab() { //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_0027: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("--- SAVE / LOAD CONFIGURATIONS ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); _presetInputName = GUILayout.TextField(_presetInputName, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); if (GUILayout.Button("SAVE PRESET", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) })) { ConfigManager.SavePreset(_presetInputName); } GUILayout.EndHorizontal(); GUILayout.Space(20f); GUILayout.Label("Available Presets:", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); if (!Directory.Exists(ConfigManager.PresetsFolder)) { return; } string[] array = (from f in Directory.GetFiles(ConfigManager.PresetsFolder, "*.txt") where !f.EndsWith("_AutoSave.txt") select f).ToArray(); _scrollPos = GUILayout.BeginScrollView(_scrollPos, GUI.skin.box); string[] array2 = array; foreach (string path in array2) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(path); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(fileNameWithoutExtension, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); if (GUILayout.Button("LOAD", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { ConfigManager.LoadPreset(fileNameWithoutExtension); ResetInputStrings(); } if (GUILayout.Button("DELETE", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) })) { File.Delete(path); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } private void DrawSkinsTab() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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) GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Menu Key:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); GUI.color = (_isWaitingForKey ? Color.yellow : Color.white); object obj; if (!_isWaitingForKey) { KeyCode value = ConfigManager.MenuKey.Value; obj = ((object)(KeyCode)(ref value)).ToString(); } else { obj = "Press key..."; } if (GUILayout.Button((string)obj, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(20f) })) { _isWaitingForKey = true; } GUI.color = Color.white; if (GUILayout.Button("Refresh Folders", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(20f) })) { RefreshLists(); } GUILayout.EndHorizontal(); GUILayout.Space(5f); bool flag = GUILayout.Toggle(ConfigManager.RememberState.Value, " Remember Settings Between Sessions (Auto-Load)", Array.Empty()); if (flag != ConfigManager.RememberState.Value) { ConfigManager.RememberState.Value = flag; ConfigManager.SaveSettings(); } GUILayout.Space(10f); _categoryTab = GUILayout.Toolbar(_categoryTab, Il2CppStringArray.op_Implicit(_categories), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.Space(10f); if (_categoryTab == 0) { DrawPlayersCategory(); } else { StuffMenuUI.Draw(this, StuffManager.GetAvailableSkins(StuffMenuUI.SelectedItemType)); } } private void DrawPlayersCategory() { //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_0027: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("--- GLOBAL PLAYER MODES ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUI.color = ((SkinManager.CurrentMode == SkinManager.SkinMode.Single) ? Color.green : Color.white); GUI.enabled = _availablePlayerSkins.Contains(_selectedSkinInList); if (GUILayout.Button("APPLY TO ALL: " + (_availablePlayerSkins.Contains(_selectedSkinInList) ? _selectedSkinInList : "Select below..."), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { SkinManager.ApplySingleSkin(_selectedSkinInList); ConfigManager.SaveSettings(); } GUI.enabled = true; GUI.color = ((SkinManager.CurrentMode == SkinManager.SkinMode.Random) ? Color.green : Color.white); if (GUILayout.Button("DISTRIBUTE RANDOMLY (Chaos Mode)", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { SkinManager.ApplyRandomSkins(); ConfigManager.SaveSettings(); } GUI.color = new Color(1f, 0.4f, 0.4f); if (GUILayout.Button("DISABLE PLAYER SKINS (Vanilla Crabs)", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { SkinManager.DisableAll(); ConfigManager.SaveSettings(); } GUI.color = Color.white; GUILayout.Space(15f); GUILayout.Label($"--- LOCAL PLAYER BUNDLES ({_availablePlayerSkins.Count}) ---", Array.Empty()); _scrollPos = GUILayout.BeginScrollView(_scrollPos, GUI.skin.box); if (_availablePlayerSkins.Count == 0) { GUILayout.Label("No .bundle files found in AntroSkins/Players/", Array.Empty()); } else { foreach (string availablePlayerSkin in _availablePlayerSkins) { GUILayout.BeginHorizontal(Array.Empty()); bool flag = !SkinManager.DisabledSkins.Contains(availablePlayerSkin); bool flag2 = GUILayout.Toggle(flag, "", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(20f) }); if (flag2 != flag) { if (flag2) { SkinManager.DisabledSkins.Remove(availablePlayerSkin); } else { SkinManager.DisabledSkins.Add(availablePlayerSkin); } ConfigManager.SaveSettings(); } GUI.color = ((_selectedSkinInList == availablePlayerSkin) ? Color.cyan : Color.white); if (GUILayout.Button(availablePlayerSkin.Replace(".bundle", ""), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { _selectedSkinInList = availablePlayerSkin; ResetInputStrings(); } GUI.color = Color.white; GUILayout.EndHorizontal(); } } GUILayout.EndScrollView(); } private void LoadSkinBones(string skinName) { _lastLoadedBonesSkin = skinName; _currentBoneEditing = ""; _boneSearchQuery = ""; _boneSortMode = 0; ResetInputStrings(); if (skinName.StartsWith("ACC_")) { _currentSkinBones = new string[1] { "Root" }; _currentBoneEditing = "Root"; return; } bool flag = false; GameObject orLoadPrefab = SkinManager.GetOrLoadPrefab(skinName); if ((Object)(object)orLoadPrefab == (Object)null) { string[] stuffTypes = StuffManager.StuffTypes; foreach (string itemType in stuffTypes) { orLoadPrefab = StuffManager.GetOrLoadPrefab(itemType, skinName); if ((Object)(object)orLoadPrefab != (Object)null) { flag = true; break; } } } if ((Object)(object)orLoadPrefab == (Object)null) { _currentSkinBones = new string[0]; return; } List list = new List(); foreach (Transform componentsInChild in orLoadPrefab.GetComponentsInChildren(true)) { if (!((Object)(object)componentsInChild == (Object)(object)orLoadPrefab.transform)) { string item = SkinManager.CleanBoneName(((Object)componentsInChild).name); if (!list.Contains(item)) { list.Add(item); } } } if (flag && !list.Contains("Hips")) { list.Insert(0, "Hips"); } _currentSkinBones = list.ToArray(); } private void DrawTweakerTab() { //IL_0003: 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) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Expected O, but got Unknown //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Expected O, but got Unknown //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_070d: Expected O, but got Unknown //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_089a: Unknown result type (might be due to invalid IL or missing references) //IL_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_08bf: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Expected O, but got Unknown //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_09c1: Unknown result type (might be due to invalid IL or missing references) //IL_09ba: Unknown result type (might be due to invalid IL or missing references) //IL_0a0e: Unknown result type (might be due to invalid IL or missing references) //IL_0a59: Unknown result type (might be due to invalid IL or missing references) //IL_0a5e: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Expected O, but got Unknown //IL_0c2a: Unknown result type (might be due to invalid IL or missing references) //IL_0c2f: Unknown result type (might be due to invalid IL or missing references) //IL_0c17: Unknown result type (might be due to invalid IL or missing references) //IL_0ab5: Unknown result type (might be due to invalid IL or missing references) //IL_0aba: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Unknown result type (might be due to invalid IL or missing references) //IL_0cd8: Unknown result type (might be due to invalid IL or missing references) //IL_0d01: Unknown result type (might be due to invalid IL or missing references) //IL_0d20: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) //IL_0b63: Unknown result type (might be due to invalid IL or missing references) //IL_0b8c: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0d2b: Unknown result type (might be due to invalid IL or missing references) //IL_0bb6: Unknown result type (might be due to invalid IL or missing references) //IL_0d36: Unknown result type (might be due to invalid IL or missing references) //IL_0bc1: Unknown result type (might be due to invalid IL or missing references) //IL_0d5c: Unknown result type (might be due to invalid IL or missing references) //IL_0be7: Unknown result type (might be due to invalid IL or missing references) //IL_0dd6: Unknown result type (might be due to invalid IL or missing references) //IL_0dc1: Unknown result type (might be due to invalid IL or missing references) _tweakerScrollPos = GUILayout.BeginScrollView(_tweakerScrollPos, Array.Empty()); GUILayout.Label("--- JIGGLE PHYSICS & SETTINGS ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); bool flag = GUILayout.Toggle(ConfigManager.JiggleEnabled.Value, " Enable Global Jiggle Physics (for bones with 'jiggle' in name)", Array.Empty()); if (flag != ConfigManager.JiggleEnabled.Value) { ConfigManager.JiggleEnabled.Value = flag; ConfigManager.SaveSettings(); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Stiffness:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); float num = GUILayout.HorizontalSlider(ConfigManager.JiggleStiffness.Value, 1f, 30f, Array.Empty()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Damping:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }); float num2 = GUILayout.HorizontalSlider(ConfigManager.JiggleDamping.Value, 0.1f, 0.99f, Array.Empty()); GUILayout.EndHorizontal(); if (num != ConfigManager.JiggleStiffness.Value || num2 != ConfigManager.JiggleDamping.Value) { ConfigManager.JiggleStiffness.Value = num; ConfigManager.JiggleDamping.Value = num2; ConfigManager.SaveSettings(); } if (_categoryTab == 2) { string text = AccessoryManager.AccessoryBones[_accessoryBoneTab]; AccessoryManager.ActiveAccessories.TryGetValue(text, out var value); if (string.IsNullOrEmpty(value)) { GUIStyle val = new GUIStyle(GUI.skin.label); val.normal.textColor = Color.yellow; GUILayout.Label("Equip an accessory first to edit its Position/Rotation!", val, Array.Empty()); GUILayout.EndScrollView(); return; } _selectedSkinInList = "ACC_" + text + "_" + value; _currentSkinBones = new string[1] { "Root" }; _currentBoneEditing = "Root"; } GUILayout.Space(15f); if (string.IsNullOrEmpty(_selectedSkinInList)) { GUILayout.EndScrollView(); return; } if (_selectedSkinInList != _lastLoadedBonesSkin) { LoadSkinBones(_selectedSkinInList); } SkinConfig skinConfig = GetSkinConfig(_selectedSkinInList); if (_categoryTab == 1) { GUIStyle val2 = new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }; val2.normal.textColor = Color.cyan; GUILayout.Label("--- 1ST PERSON VIEWMODEL ---", val2, Array.Empty()); bool flag2 = GUILayout.Toggle(skinConfig.EnableViewModel, " Enable Custom 1st Person Weapon Transform", Array.Empty()); if (flag2 != skinConfig.EnableViewModel) { skinConfig.EnableViewModel = flag2; ConfigManager.SaveSettings(); BoneSynchronizer.ForceRecalculateAll(); } if (skinConfig.EnableViewModel) { if (_vmPosXStr == null) { _vmPosXStr = skinConfig.VMPos.x.ToString("F3"); } if (_vmPosYStr == null) { _vmPosYStr = skinConfig.VMPos.y.ToString("F3"); } if (_vmPosZStr == null) { _vmPosZStr = skinConfig.VMPos.z.ToString("F3"); } if (_vmRotXStr == null) { _vmRotXStr = skinConfig.VMRot.x.ToString("F1"); } if (_vmRotYStr == null) { _vmRotYStr = skinConfig.VMRot.y.ToString("F1"); } if (_vmRotZStr == null) { _vmRotZStr = skinConfig.VMRot.z.ToString("F1"); } if (_vmScaleStr == null) { _vmScaleStr = skinConfig.VMScale.ToString("F2"); } GUILayout.BeginHorizontal(Array.Empty()); float num3 = DrawAxisRow("Pos X:", ref _vmPosXStr, skinConfig.VMPos.x, -2f, 2f, "F3"); float num4 = DrawAxisRow("Pos Y:", ref _vmPosYStr, skinConfig.VMPos.y, -2f, 2f, "F3"); float num5 = DrawAxisRow("Pos Z:", ref _vmPosZStr, skinConfig.VMPos.z, -2f, 2f, "F3"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); float num6 = DrawAxisRow("Rot X:", ref _vmRotXStr, skinConfig.VMRot.x, -180f, 180f, "F1"); float num7 = DrawAxisRow("Rot Y:", ref _vmRotYStr, skinConfig.VMRot.y, -180f, 180f, "F1"); float num8 = DrawAxisRow("Rot Z:", ref _vmRotZStr, skinConfig.VMRot.z, -180f, 180f, "F1"); GUILayout.EndHorizontal(); float num9 = DrawAxisRow("Scale Mult:", ref _vmScaleStr, skinConfig.VMScale, 0.1f, 5f, "F2"); if (num3 != skinConfig.VMPos.x || num4 != skinConfig.VMPos.y || num5 != skinConfig.VMPos.z || num6 != skinConfig.VMRot.x || num7 != skinConfig.VMRot.y || num8 != skinConfig.VMRot.z || num9 != skinConfig.VMScale) { skinConfig.VMPos = new Vector3(num3, num4, num5); skinConfig.VMRot = new Vector3(num6, num7, num8); skinConfig.VMScale = num9; ConfigManager.SaveSettings(); BoneSynchronizer.ForceRecalculateAll(); } } GUILayout.Space(10f); } GUILayout.Label("--- GLOBAL MODEL HEIGHT ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); if (_globalHeightStr == null) { _globalHeightStr = skinConfig.GlobalHeightOffset.ToString("F3"); } float num10 = DrawAxisRow("Up / Down:", ref _globalHeightStr, skinConfig.GlobalHeightOffset, -2.5f, 2.5f, "F3"); if (Mathf.Abs(num10 - skinConfig.GlobalHeightOffset) > 0.0001f) { skinConfig.GlobalHeightOffset = num10; ConfigManager.SaveSettings(); BoneSynchronizer.ForceRecalculateAll(); } GUILayout.Space(10f); GUILayout.Label("--- BONE/MESH EDITOR ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); if (_currentSkinBones.Length == 0) { return; } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Search:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(55f) }); _boneSearchQuery = GUILayout.TextField(_boneSearchQuery, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); string text2 = ((_boneSortMode == 0) ? "Sort: Default" : ((_boneSortMode == 1) ? "Sort: A-Z ↓" : "Sort: Z-A ↑")); if (GUILayout.Button(text2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(22f) })) { _boneSortMode = (_boneSortMode + 1) % 3; } GUILayout.EndHorizontal(); GUILayout.Space(5f); List list = _currentSkinBones.Where((string b) => string.IsNullOrEmpty(_boneSearchQuery) || b.IndexOf(_boneSearchQuery, StringComparison.OrdinalIgnoreCase) >= 0).ToList(); if (_boneSortMode == 1) { list.Sort(); } else if (_boneSortMode == 2) { list.Sort(); list.Reverse(); } string[] array = list.ToArray(); int num11 = Array.IndexOf(array, _currentBoneEditing); if (num11 == -1 && array.Length != 0) { num11 = 0; _currentBoneEditing = array[0]; ResetInputStrings(); } _bonesScrollPos = GUILayout.BeginScrollView(_bonesScrollPos, GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(180f) }); if (array.Length == 0) { GUIStyle val3 = new GUIStyle(GUI.skin.label); val3.normal.textColor = Color.gray; GUILayout.Label("No bones found...", val3, Array.Empty()); } else { int num12 = GUILayout.SelectionGrid(num11, Il2CppStringArray.op_Implicit(array), 2, Array.Empty()); if (num12 != num11) { _currentBoneEditing = array[num12]; ResetInputStrings(); } } GUILayout.EndScrollView(); if (string.IsNullOrEmpty(_currentBoneEditing)) { GUILayout.EndScrollView(); return; } string currentBoneEditing = _currentBoneEditing; GUILayout.Space(10f); GUILayout.BeginHorizontal(Array.Empty()); GUI.color = ((!_editPositionMode) ? Color.yellow : Color.white); if (GUILayout.Button("Edit ROTATION", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { if (_editPositionMode) { ResetInputStrings(); } _editPositionMode = false; } GUI.color = (_editPositionMode ? Color.yellow : Color.white); if (GUILayout.Button("Edit POSITION", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { if (!_editPositionMode) { ResetInputStrings(); } _editPositionMode = true; } GUI.color = Color.white; GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.Label("Tweaking " + (_editPositionMode ? "POSITION" : "ROTATION") + ": " + currentBoneEditing, new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); bool flag3 = false; if (_editPositionMode) { if (!skinConfig.BonePosOffsets.ContainsKey(currentBoneEditing)) { skinConfig.BonePosOffsets[currentBoneEditing] = Vector3.zero; } Vector3 val4 = skinConfig.BonePosOffsets[currentBoneEditing]; if (_posXStr == null) { _posXStr = val4.x.ToString("F4"); } if (_posYStr == null) { _posYStr = val4.y.ToString("F4"); } if (_posZStr == null) { _posZStr = val4.z.ToString("F4"); } float num13 = DrawAxisRow("X:", ref _posXStr, val4.x, -2.5f, 2.5f, "F4"); float num14 = DrawAxisRow("Y:", ref _posYStr, val4.y, -2.5f, 2.5f, "F4"); float num15 = DrawAxisRow("Z:", ref _posZStr, val4.z, -2.5f, 2.5f, "F4"); if (num13 != val4.x || num14 != val4.y || num15 != val4.z) { flag3 = true; } skinConfig.BonePosOffsets[currentBoneEditing] = new Vector3(num13, num14, num15); } else { if (!skinConfig.BoneRotOffsets.ContainsKey(currentBoneEditing)) { skinConfig.BoneRotOffsets[currentBoneEditing] = Vector3.zero; } Vector3 val5 = skinConfig.BoneRotOffsets[currentBoneEditing]; if (_rotXStr == null) { _rotXStr = val5.x.ToString("F2"); } if (_rotYStr == null) { _rotYStr = val5.y.ToString("F2"); } if (_rotZStr == null) { _rotZStr = val5.z.ToString("F2"); } float num16 = DrawAxisRow("X:", ref _rotXStr, val5.x, -180f, 180f, "F2"); float num17 = DrawAxisRow("Y:", ref _rotYStr, val5.y, -180f, 180f, "F2"); float num18 = DrawAxisRow("Z:", ref _rotZStr, val5.z, -180f, 180f, "F2"); if (num16 != val5.x || num17 != val5.y || num18 != val5.z) { flag3 = true; } skinConfig.BoneRotOffsets[currentBoneEditing] = new Vector3(num16, num17, num18); } if (flag3) { ConfigManager.SaveSettings(); BoneSynchronizer.ForceRecalculateAll(); } GUILayout.Space(10f); if (GUILayout.Button("Reset this Bone (Set to 0,0,0)", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { if (_editPositionMode) { skinConfig.BonePosOffsets[currentBoneEditing] = Vector3.zero; } else { skinConfig.BoneRotOffsets[currentBoneEditing] = Vector3.zero; } ResetInputStrings(); ConfigManager.SaveSettings(); BoneSynchronizer.ForceRecalculateAll(); } GUILayout.EndScrollView(); } public void ResetInputStrings() { _posXStr = null; _posYStr = null; _posZStr = null; _rotXStr = null; _rotYStr = null; _rotZStr = null; _globalHeightStr = null; _vmPosXStr = null; _vmPosYStr = null; _vmPosZStr = null; _vmRotXStr = null; _vmRotYStr = null; _vmRotZStr = null; _vmScaleStr = null; StuffMenuUI.ScaleInputStr = null; _accScaleInputStr = null; } private float DrawAxisRow(string label, ref string inputStr, float currentValue, float min, float max, string format) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) }); inputStr = GUILayout.TextField(inputStr, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); string s = inputStr.Replace(',', '.'); if (float.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { currentValue = result; } float num = Mathf.Clamp(currentValue, min, max); float num2 = GUILayout.HorizontalSlider(currentValue, min, max, Array.Empty()); if (Mathf.Abs(num2 - num) > 0.0001f) { currentValue = num2; inputStr = currentValue.ToString(format); } GUILayout.EndHorizontal(); GUILayout.Space(5f); return currentValue; } } public static class StuffManager { public enum StuffMode { None, Custom, Random } public static Dictionary SizeTweaks = new Dictionary(); public static StuffMode CurrentMode = StuffMode.None; public static Dictionary ActiveSkins = new Dictionary(); public static Dictionary> PersistentRandomStuff = new Dictionary>(); public static HashSet DisabledRandomTypes = new HashSet(); public static HashSet DisabledRandomStuffSkins = new HashSet(); public static readonly string[] StuffTypes = new string[11] { "ak", "pistol", "revolver", "dual", "bat", "bomb", "katana", "knife", "pipe", "snowball", "stick" }; private static Dictionary _loadedBundles = new Dictionary(); private static Dictionary _loadedPrefabs = new Dictionary(); private static Dictionary> _cachedPlayerHolders = new Dictionary>(); public static string StuffPath => Path.Combine(Paths.PluginPath, "AntroSkins", "Stuff"); public static float GetSizeTweak(string type, string skinName) { string key = type + "_" + skinName; if (SizeTweaks.ContainsKey(key)) { return SizeTweaks[key]; } return type switch { "bat" => 0.19f, "ak" => 0.012f, "pistol" => 0.04f, "revolver" => 0.028f, "bomb" => 0.042f, "katana" => 0.009f, "knife" => 0.029f, "pipe" => 0.012f, "snowball" => 0.03f, "stick" => 0.04f, "dual" => 0.034f, _ => 1f, }; } private static List GetCachedHolders(GameObject player) { int instanceID = ((Object)player).GetInstanceID(); if (_cachedPlayerHolders.ContainsKey(instanceID)) { _cachedPlayerHolders[instanceID].RemoveAll((Transform t) => (Object)(object)t == (Object)null); if (_cachedPlayerHolders[instanceID].Count > 0) { return _cachedPlayerHolders[instanceID]; } } List list = new List(); foreach (Transform componentsInChild in player.GetComponentsInChildren(true)) { string text = ((Object)componentsInChild).name.ToLower(); switch (text) { default: if (!(text == "playercamera")) { continue; } break; case "weaponpivot": case "handr": case "righthand": case "mixamorig:righthand": case "camera": break; } list.Add(componentsInChild); } _cachedPlayerHolders[instanceID] = list; return list; } public static void InitFolder() { if (!Directory.Exists(StuffPath)) { Directory.CreateDirectory(StuffPath); } string[] stuffTypes = StuffTypes; foreach (string text in stuffTypes) { string path = Path.Combine(StuffPath, text.ToUpper()); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } } } public static List GetAvailableSkins(string itemType) { List list = new List(); string path = Path.Combine(StuffPath, itemType.ToUpper()); if (Directory.Exists(path)) { string[] files = Directory.GetFiles(path, "*.bundle"); foreach (string path2 in files) { list.Add(Path.GetFileName(path2)); } } return list; } public static GameObject GetOrLoadPrefab(string itemType, string skinName) { string key = itemType + "_" + skinName; if (_loadedPrefabs.ContainsKey(key)) { if ((Object)(object)_loadedPrefabs[key] != (Object)null) { return _loadedPrefabs[key]; } _loadedPrefabs.Remove(key); } string text = Path.Combine(StuffPath, itemType.ToUpper(), skinName); if (!File.Exists(text)) { return null; } if (!_loadedBundles.ContainsKey(key)) { AssetBundle val = AssetBundle.LoadFromFile(text); if (val == null) { return null; } _loadedBundles[key] = val; } Il2CppReferenceArray val2 = _loadedBundles[key].LoadAllAssets(Il2CppType.Of()); foreach (Object item in (Il2CppArrayBase)(object)val2) { GameObject val3 = ((Il2CppObjectBase)item).Cast(); if ((Object)(object)val3 != (Object)null && (Object)(object)val3.transform.parent == (Object)null) { Object.DontDestroyOnLoad((Object)(object)val3); val3.SetActive(false); _loadedPrefabs[key] = val3; return val3; } } return null; } public static void DisableAll() { CurrentMode = StuffMode.None; PersistentRandomStuff.Clear(); ApplyModels(); } public static ulong GetLocalPlayerId() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MonoBehaviourPublicObInUIgaStCSBoStcuCSUnique.Instance != (Object)null) { _ = MonoBehaviourPublicObInUIgaStCSBoStcuCSUnique.Instance.field_Private_CSteamID_0; if (true) { return MonoBehaviourPublicObInUIgaStCSBoStcuCSUnique.Instance.field_Private_CSteamID_0.m_SteamID; } } return 0uL; } public static bool IsLocalPlayerWeapon(GameObject obj) { if ((Object)(object)Camera.main != (Object)null && (Object)(object)obj.transform.root == (Object)(object)((Component)Camera.main).transform.root) { return true; } if ((Object)(object)obj.GetComponentInParent(Il2CppType.Of()) != (Object)null) { return true; } return false; } public static void ApplyRandomSkins() { CurrentMode = StuffMode.Random; PersistentRandomStuff.Clear(); ulong localPlayerId = GetLocalPlayerId(); if (localPlayerId != 0) { PersistentRandomStuff[localPlayerId] = new Dictionary(); string[] stuffTypes = StuffTypes; foreach (string itemType in stuffTypes) { if (!DisabledRandomTypes.Contains(itemType)) { List availableSkins = GetAvailableSkins(itemType); availableSkins.RemoveAll((string s) => DisabledRandomStuffSkins.Contains(itemType + "_" + s)); if (availableSkins.Count > 0) { PersistentRandomStuff[localPlayerId][itemType] = availableSkins[Random.Range(0, availableSkins.Count)]; } } } } ApplyModels(); } private static string CheckName(string n) { if (n.Contains("mac10") || n.Contains("dual") || n.Contains("uzi") || n.Contains("akimbo") || n.Contains("doublebarrel")) { return "dual"; } if (n.Contains("ak") || n.Contains("assault") || n.Contains("rifle")) { return "ak"; } if (n.Contains("pistol") || n.Contains("glock")) { return "pistol"; } if (n.Contains("revolver")) { return "revolver"; } if (n.Contains("bat")) { return "bat"; } if (n.Contains("bomb") || n.Contains("tnt")) { return "bomb"; } if (n.Contains("katana") || n.Contains("sword")) { return "katana"; } if (n.Contains("knife") || n.Contains("dagger")) { return "knife"; } if (n.Contains("pipe")) { return "pipe"; } if (n.Contains("snowball")) { return "snowball"; } if (n.Contains("stick") || n.Contains("branch")) { return "stick"; } return null; } private static string IdentifyItem(GameObject obj) { if ((Object)(object)obj == (Object)null) { return null; } string n = ((Object)obj).name.ToLower(); string text = CheckName(n); if (text != null) { return text; } MeshFilter component = obj.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.sharedMesh != (Object)null) { text = CheckName(((Object)component.sharedMesh).name.ToLower()); if (text != null) { return text; } } SkinnedMeshRenderer component2 = obj.GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2.sharedMesh != (Object)null) { text = CheckName(((Object)component2.sharedMesh).name.ToLower()); if (text != null) { return text; } } return null; } private static void SafeSetLayer(GameObject obj, int newLayer) { if ((Object)(object)obj == (Object)null) { return; } obj.layer = newLayer; for (int i = 0; i < obj.transform.childCount; i++) { Transform child = obj.transform.GetChild(i); if ((Object)(object)child != (Object)null) { ((Component)child).gameObject.layer = newLayer; } } } private static float GetRawMeshSize(GameObject obj) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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) float num = 0.01f; Bounds bounds; foreach (MeshFilter componentsInChild in obj.GetComponentsInChildren(true)) { if ((Object)(object)componentsInChild.sharedMesh != (Object)null) { bounds = componentsInChild.sharedMesh.bounds; Vector3 size = ((Bounds)(ref bounds)).size; Vector3 lossyScale = ((Component)componentsInChild).transform.lossyScale; float num2 = Mathf.Max(new float[3] { size.x * Mathf.Abs(lossyScale.x), size.y * Mathf.Abs(lossyScale.y), size.z * Mathf.Abs(lossyScale.z) }); if (num2 > num) { num = num2; } } } foreach (SkinnedMeshRenderer componentsInChild2 in obj.GetComponentsInChildren(true)) { if ((Object)(object)componentsInChild2.sharedMesh != (Object)null) { bounds = componentsInChild2.sharedMesh.bounds; Vector3 size2 = ((Bounds)(ref bounds)).size; Vector3 lossyScale2 = ((Component)componentsInChild2).transform.lossyScale; float num3 = Mathf.Max(new float[3] { size2.x * Mathf.Abs(lossyScale2.x), size2.y * Mathf.Abs(lossyScale2.y), size2.z * Mathf.Abs(lossyScale2.z) }); if (num3 > num) { num = num3; } } } return num; } private static Vector3 CalculateBaseScale(GameObject customSkin, Transform originalItem, string itemType, string skinName) { //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) float rawMeshSize = GetRawMeshSize(customSkin); float num = 1f; num = itemType switch { "ak" => 0.85f, "pistol" => 0.25f, "revolver" => 0.35f, "dual" => 0.3f, "bat" => 0.95f, "katana" => 1.1f, "knife" => 0.35f, "pipe" => 0.85f, "snowball" => 0.2f, "bomb" => 0.25f, "stick" => 0.95f, _ => 0.6f, }; float num2 = Mathf.Max(new float[3] { Mathf.Abs(originalItem.lossyScale.x), Mathf.Abs(originalItem.lossyScale.y), Mathf.Abs(originalItem.lossyScale.z) }); if (num2 < 0.0001f) { num2 = 1f; } float num3 = num / (rawMeshSize * num2); if (float.IsInfinity(num3) || float.IsNaN(num3)) { num3 = 1f; } num3 *= GetSizeTweak(itemType, skinName); return new Vector3(num3, num3, num3); } public static void ApplyModels() { HashSet hashSet = new HashSet(); Il2CppArrayBase val = Object.FindObjectsOfType(); foreach (MonoBehaviour2PublicTrguGamubuGaSiBoSiUnique item in val) { if ((Object)(object)item != (Object)null && (Object)(object)((Component)item).gameObject != (Object)null) { hashSet.Add(((Component)item).gameObject); } } Il2CppArrayBase val2 = Object.FindObjectsOfType(); foreach (MonoBehaviour2PublicObauTrSiVeSiGahiUnique item2 in val2) { if ((Object)(object)item2 != (Object)null && (Object)(object)((Component)item2).gameObject != (Object)null) { hashSet.Add(((Component)item2).gameObject); } } Il2CppArrayBase val3 = Object.FindObjectsOfType(); foreach (MonoBehaviour2PublicGathObauTrgumuGaSiBoUnique item3 in val3) { if ((Object)(object)item3 != (Object)null && (Object)(object)((Component)item3).gameObject != (Object)null) { hashSet.Add(((Component)item3).gameObject); } } Il2CppArrayBase val4 = Object.FindObjectsOfType(); foreach (MonoBehaviour2PublicUnique item4 in val4) { if ((Object)(object)item4 != (Object)null && (Object)(object)((Component)item4).gameObject != (Object)null) { hashSet.Add(((Component)item4).gameObject); } } Il2CppArrayBase val5 = Object.FindObjectsOfType(); foreach (MonoBehaviourPublicObTritleObriVeQuObVeUnique item5 in val5) { if ((Object)(object)item5 != (Object)null && (Object)(object)((Component)item5).gameObject != (Object)null) { hashSet.Add(((Component)item5).gameObject); } } Il2CppArrayBase val6 = Object.FindObjectsOfType(); foreach (MonoBehaviourPublicObVeSiVeRiSiAnVeanTrUnique item6 in val6) { if ((Object)(object)item6 == (Object)null) { continue; } foreach (Transform cachedHolder in GetCachedHolders(((Component)item6).gameObject)) { for (int i = 0; i < cachedHolder.childCount; i++) { Transform child = cachedHolder.GetChild(i); if ((Object)(object)child != (Object)null && !((Object)child).name.StartsWith("AntroSkin_")) { hashSet.Add(((Component)child).gameObject); } } } } foreach (GameObject item7 in hashSet) { if ((Object)(object)item7 == (Object)null || ((Object)item7).name.StartsWith("AntroSkin_")) { continue; } string text = IdentifyItem(item7); if (text == null) { for (int j = 0; j < item7.transform.childCount; j++) { Transform child2 = item7.transform.GetChild(j); if (!((Object)(object)child2 == (Object)null) && !((Object)child2).name.StartsWith("AntroSkin_")) { text = IdentifyItem(((Component)child2).gameObject); if (text != null) { break; } } } } if (text != null) { ProcessItem(item7, text); } } } private static void DisableOriginalRenderersSafely(GameObject originalItem, GameObject customSkin) { Il2CppArrayBase componentsInChildren = originalItem.GetComponentsInChildren(true); foreach (Renderer item in componentsInChildren) { if ((Object)(object)item != (Object)null && (Object)(object)((Component)item).transform != (Object)(object)customSkin.transform && !((Component)item).transform.IsChildOf(customSkin.transform) && ((Object)(object)((Component)item).GetComponent() != (Object)null || (Object)(object)((Component)item).GetComponent() != (Object)null)) { item.enabled = false; if ((Object)(object)((Component)item).gameObject.GetComponent() == (Object)null) { ((Component)item).gameObject.AddComponent(); } } } } private static void ProcessItem(GameObject originalItem, string itemType) { //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0342: 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_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_076b: Unknown result type (might be due to invalid IL or missing references) string value = ""; bool flag = IsLocalPlayerWeapon(originalItem); if (CurrentMode == StuffMode.Custom) { ActiveSkins.TryGetValue(itemType, out value); } else if (CurrentMode == StuffMode.Random && !DisabledRandomTypes.Contains(itemType)) { List availableSkins = GetAvailableSkins(itemType); availableSkins.RemoveAll((string s) => DisabledRandomStuffSkins.Contains(itemType + "_" + s)); if (availableSkins.Count > 0) { ulong key = (flag ? GetLocalPlayerId() : ((ulong)((Object)originalItem).GetInstanceID())); if (!PersistentRandomStuff.ContainsKey(key)) { PersistentRandomStuff[key] = new Dictionary(); } if (!PersistentRandomStuff[key].ContainsKey(itemType) || !availableSkins.Contains(PersistentRandomStuff[key][itemType])) { PersistentRandomStuff[key][itemType] = availableSkins[Random.Range(0, availableSkins.Count)]; } value = PersistentRandomStuff[key][itemType]; } } Transform val = null; string text = ""; for (int i = 0; i < originalItem.transform.childCount; i++) { Transform child = originalItem.transform.GetChild(i); if ((Object)(object)child != (Object)null && ((Object)child).name.StartsWith("AntroSkin_Stuff_")) { val = child; text = ((Object)child).name.Replace("AntroSkin_Stuff_", ""); break; } } if (CurrentMode == StuffMode.None || string.IsNullOrEmpty(value)) { if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); } Il2CppArrayBase componentsInChildren = originalItem.GetComponentsInChildren(true); for (int j = 0; j < componentsInChildren.Count; j++) { if ((Object)(object)componentsInChildren[j] != (Object)null && !((Object)((Component)componentsInChildren[j]).gameObject).name.StartsWith("AntroSkin_")) { AntroRendererHider component = ((Component)componentsInChildren[j]).GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } componentsInChildren[j].enabled = true; } } return; } if ((Object)(object)val != (Object)null && text == value) { GameObject orLoadPrefab = GetOrLoadPrefab(itemType, value); Vector3 baseScale = (((Object)(object)orLoadPrefab != (Object)null) ? CalculateBaseScale(orLoadPrefab, originalItem.transform, itemType, value) : Vector3.one); BoneSynchronizer component2 = ((Component)val).GetComponent(); if ((Object)(object)component2 != (Object)null) { SyncData value2 = null; if (BoneSynchronizer.DataMap.TryGetValue(((Il2CppObjectBase)component2).Pointer, out value2)) { value2.BaseScale = baseScale; value2.IsLocalPlayer = flag; } } DisableOriginalRenderersSafely(originalItem, ((Component)val).gameObject); return; } if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); } GameObject orLoadPrefab2 = GetOrLoadPrefab(itemType, value); if (!((Object)(object)orLoadPrefab2 != (Object)null)) { return; } GameObject val2 = Object.Instantiate(orLoadPrefab2, originalItem.transform); ((Object)val2).name = "AntroSkin_Stuff_" + value; val2.SetActive(true); Shader shader = Shader.Find("Standard"); Renderer componentInChildren = originalItem.GetComponentInChildren(true); if ((Object)(object)componentInChildren != (Object)null && (Object)(object)componentInChildren.sharedMaterial != (Object)null) { shader = componentInChildren.sharedMaterial.shader; } foreach (Renderer componentsInChild in val2.GetComponentsInChildren(true)) { foreach (Material item in (Il2CppArrayBase)(object)componentsInChild.materials) { if ((Object)(object)item != (Object)null) { item.shader = shader; } } if ((Object)(object)((Component)componentsInChild).gameObject.GetComponent() == (Object)null) { MonoBehaviourPublicHa1MeObouCoSiouBoprUnique val3 = ((Component)componentsInChild).gameObject.AddComponent(); ((Behaviour)val3).enabled = false; } } val2.transform.parent = originalItem.transform; val2.transform.localPosition = Vector3.zero; val2.transform.localRotation = Quaternion.identity; Vector3 baseScale2 = CalculateBaseScale(orLoadPrefab2, originalItem.transform, itemType, value); Il2CppArrayBase componentsInChildren2 = val2.GetComponentsInChildren(true); for (int k = 0; k < componentsInChildren2.Count; k++) { Object.Destroy((Object)(object)componentsInChildren2[k]); } Il2CppArrayBase componentsInChildren3 = val2.GetComponentsInChildren(true); for (int l = 0; l < componentsInChildren3.Count; l++) { Object.Destroy((Object)(object)componentsInChildren3[l]); } Il2CppArrayBase componentsInChildren4 = val2.GetComponentsInChildren(true); for (int m = 0; m < componentsInChildren4.Count; m++) { Object.Destroy((Object)(object)componentsInChildren4[m]); } Il2CppArrayBase componentsInChildren5 = val2.GetComponentsInChildren(true); for (int n = 0; n < componentsInChildren5.Count; n++) { Object.Destroy((Object)(object)componentsInChildren5[n]); } Il2CppArrayBase componentsInChildren6 = val2.GetComponentsInChildren(true); for (int num = 0; num < componentsInChildren6.Count; num++) { componentsInChildren6[num].applyRootMotion = false; componentsInChildren6[num].cullingMode = (AnimatorCullingMode)0; } foreach (Transform componentsInChild2 in val2.GetComponentsInChildren(true)) { if (((Object)componentsInChild2).name.ToLower().Contains("jiggle") && (Object)(object)((Component)componentsInChild2).gameObject.GetComponent() == (Object)null) { ((Component)componentsInChild2).gameObject.AddComponent(); } } foreach (SkinnedMeshRenderer componentsInChild3 in val2.GetComponentsInChildren(true)) { componentsInChild3.updateWhenOffscreen = true; componentsInChild3.localBounds = new Bounds(Vector3.zero, new Vector3(50f, 50f, 50f)); } DisableOriginalRenderersSafely(originalItem, val2); SafeSetLayer(val2, originalItem.layer); BoneSynchronizer boneSynchronizer = val2.AddComponent(); SyncData syncData = new SyncData(); syncData.SkinName = value; syncData.IsStuff = true; syncData.RootTransform = val2.transform; syncData.OriginalHips = originalItem.transform; syncData.CustomHips = val2.transform; syncData.BaseScale = baseScale2; syncData.IsLocalPlayer = flag; BoneSynchronizer.DataMap[((Il2CppObjectBase)boneSynchronizer).Pointer] = syncData; } } public class AntroRendererHider : MonoBehaviour { private Renderer _r; public AntroRendererHider(IntPtr ptr) : base(ptr) { } private void Awake() { _r = ((Component)this).GetComponent(); } private void LateUpdate() { if (!((Object)(object)_r != (Object)null) || !_r.enabled) { return; } bool flag = false; Transform val = ((Component)this).transform; while ((Object)(object)val != (Object)null) { if (((Object)val).name.StartsWith("AntroSkin_") || ((Object)val).name.StartsWith("AntroAccessory_")) { flag = true; break; } val = val.parent; } if (!flag) { _r.enabled = false; } } } public static class StuffMenuUI { public static string SelectedItemType = "ak"; private static Vector2 _itemsScrollPos = Vector2.zero; private static Vector2 _bundlesScrollPos = Vector2.zero; public static string ScaleInputStr = null; public static void Draw(SkinsMenu menuInstance, List availableStuffSkins) { //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_0027: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Expected O, but got Unknown //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Expected O, but got Unknown //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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_073a: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_07de: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label("--- GLOBAL STUFF MODES ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUI.color = ((StuffManager.CurrentMode == StuffManager.StuffMode.Custom) ? Color.green : Color.white); if (GUILayout.Button("USE CUSTOM SELECTED SKINS", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { StuffManager.CurrentMode = StuffManager.StuffMode.Custom; ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } GUI.color = ((StuffManager.CurrentMode == StuffManager.StuffMode.Random) ? Color.green : Color.white); if (GUILayout.Button("DISTRIBUTE RANDOMLY (Chaos Mode)", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { StuffManager.ApplyRandomSkins(); ConfigManager.SaveSettings(); } GUI.color = new Color(1f, 0.4f, 0.4f); if (GUILayout.Button("DISABLE ALL WEAPON SKINS", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { StuffManager.DisableAll(); ConfigManager.SaveSettings(); } GUI.color = Color.white; GUILayout.Space(15f); GUILayout.Label("--- WEAPON CONFIGURATION ---", new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); _itemsScrollPos = GUILayout.BeginScrollView(_itemsScrollPos, GUI.skin.box); string[] stuffTypes = StuffManager.StuffTypes; foreach (string text in stuffTypes) { GUILayout.BeginHorizontal(Array.Empty()); bool flag = !StuffManager.DisabledRandomTypes.Contains(text); bool flag2 = GUILayout.Toggle(flag, "", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(20f) }); if (flag2 != flag) { if (flag2) { StuffManager.DisabledRandomTypes.Remove(text); } else { StuffManager.DisabledRandomTypes.Add(text); } ConfigManager.SaveSettings(); } StuffManager.ActiveSkins.TryGetValue(text, out var value); bool flag3 = !string.IsNullOrEmpty(value) && StuffManager.CurrentMode == StuffManager.StuffMode.Custom; bool flag4 = flag && StuffManager.CurrentMode == StuffManager.StuffMode.Random; bool flag5 = flag3 || flag4; if (SelectedItemType == text) { GUI.color = Color.yellow; } else if (flag5) { GUI.color = Color.green; } else { GUI.color = Color.white; } if (GUILayout.Button(text.ToUpper() + (flag5 ? " [ON]" : ""), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { SelectedItemType = text; menuInstance.ResetInputStrings(); } GUI.color = Color.white; GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.BeginVertical(Array.Empty()); bool flag6 = !string.IsNullOrEmpty(menuInstance._selectedSkinInList) && availableStuffSkins.Contains(menuInstance._selectedSkinInList); GUILayout.BeginVertical(GUI.skin.box, Array.Empty()); if (flag6) { string text2 = menuInstance._selectedSkinInList.Replace(".bundle", ""); string text3 = "SIZE SETTINGS: " + text2; GUIStyle val = new GUIStyle(GUI.skin.label) { fontStyle = (FontStyle)1 }; val.normal.textColor = Color.cyan; GUILayout.Label(text3, val, Array.Empty()); string key = SelectedItemType + "_" + menuInstance._selectedSkinInList; float sizeTweak = StuffManager.GetSizeTweak(SelectedItemType, menuInstance._selectedSkinInList); if (ScaleInputStr == null) { ScaleInputStr = sizeTweak.ToString("F3"); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Scale Multiplier:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); ScaleInputStr = GUILayout.TextField(ScaleInputStr, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(80f) }); string s = ScaleInputStr.Replace(',', '.'); if (float.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, out var result) && Mathf.Abs(result - sizeTweak) > 0.001f) { StuffManager.SizeTweaks[key] = result; ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } if (GUILayout.Button("Reset Scale", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) })) { StuffManager.SizeTweaks.Remove(key); menuInstance.ResetInputStrings(); ConfigManager.SaveSettings(); SkinManager.FastUpdateNextFrame = true; } GUILayout.EndHorizontal(); } else { GUIStyle val2 = new GUIStyle(GUI.skin.label); val2.normal.textColor = Color.gray; GUILayout.Label("Select a skin below to edit its size.", val2, Array.Empty()); } GUILayout.EndVertical(); GUILayout.Space(5f); if (GUILayout.Button("CLEAR SKIN: " + SelectedItemType.ToUpper(), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { StuffManager.ActiveSkins.Remove(SelectedItemType); ConfigManager.SaveSettings(); if (StuffManager.CurrentMode == StuffManager.StuffMode.Custom) { SkinManager.FastUpdateNextFrame = true; } } GUILayout.Space(5f); _bundlesScrollPos = GUILayout.BeginScrollView(_bundlesScrollPos, GUI.skin.box); if (availableStuffSkins.Count == 0) { GUILayout.Label("No files in Stuff/" + SelectedItemType.ToUpper() + "/", Array.Empty()); } else { string text4 = ""; ulong localPlayerId = StuffManager.GetLocalPlayerId(); if (StuffManager.CurrentMode == StuffManager.StuffMode.Custom) { if (StuffManager.ActiveSkins.ContainsKey(SelectedItemType)) { text4 = StuffManager.ActiveSkins[SelectedItemType]; } } else if (StuffManager.CurrentMode == StuffManager.StuffMode.Random && localPlayerId != 0 && StuffManager.PersistentRandomStuff.ContainsKey(localPlayerId) && StuffManager.PersistentRandomStuff[localPlayerId].ContainsKey(SelectedItemType)) { text4 = StuffManager.PersistentRandomStuff[localPlayerId][SelectedItemType]; } foreach (string availableStuffSkin in availableStuffSkins) { GUILayout.BeginHorizontal(Array.Empty()); string item = SelectedItemType + "_" + availableStuffSkin; bool flag7 = !StuffManager.DisabledRandomStuffSkins.Contains(item); bool flag8 = GUILayout.Toggle(flag7, "", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(20f) }); if (flag8 != flag7) { if (flag8) { StuffManager.DisabledRandomStuffSkins.Remove(item); } else { StuffManager.DisabledRandomStuffSkins.Add(item); } ConfigManager.SaveSettings(); } if (availableStuffSkin == text4) { GUI.color = Color.yellow; } else if (menuInstance._selectedSkinInList == availableStuffSkin) { GUI.color = Color.cyan; } else { GUI.color = Color.white; } if (GUILayout.Button(availableStuffSkin.Replace(".bundle", ""), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { menuInstance._selectedSkinInList = availableStuffSkin; StuffManager.ActiveSkins[SelectedItemType] = availableStuffSkin; if (StuffManager.CurrentMode == StuffManager.StuffMode.Custom) { SkinManager.FastUpdateNextFrame = true; } ConfigManager.SaveSettings(); menuInstance.ResetInputStrings(); } GUI.color = Color.white; GUILayout.EndHorizontal(); } } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); } } }