Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Big Baller Suit Pack v1.1.5
BepInEx/FreshLethal/FreshLethal.dll
Decompiled 2 years agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(/*Could not decode attribute arguments.*/)] [assembly: AssemblyTitle("FreshLethal")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("FreshLethal")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] [assembly: TargetFramework(".NETCore,Version=v5.0", FrameworkDisplayName = ".NET for Windows Universal")] [assembly: AssemblyVersion("1.0.0.0")] namespace FreshLethal; [BepInPlugin("Fresh.Lethal.bepx", "Fresh Lethal", "0.0.10")] public class ModBase : BaseUnityPlugin { private const string modUID = "Fresh.Lethal.bepx"; private const string modName = "Fresh Lethal"; private const string modVersion = "0.0.10"; private readonly Harmony harmony = new Harmony("Fresh.Lethal.bepx"); private static ModBase Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("Fresh.Lethal.bepx"); mls.LogInfo((object)"########::::'###:::'##::: ##:::'######::'#######::::::"); mls.LogInfo((object)"##.... ##::'## ##:::###:: ##::'##... ##'##.... ##:::::"); mls.LogInfo((object)"##:::: ##:'##:. ##::####: ##:::##:::..::##:::: ##:::::"); mls.LogInfo((object)"########:'##:::. ##:## ## ##:::##:::::::##:::: ##:::::"); mls.LogInfo((object)"##.... ##:#########:##. ####:::##:::::::##:::: ##:::::"); mls.LogInfo((object)"##:::: ##:##.... ##:##:. ###:::##::: ##:##:::: ##'###:"); mls.LogInfo((object)"########::##:::: ##:##::. ##::. ######:. #######::###:"); mls.LogInfo((object)"........::..:::::..:..::::..::::......:::.......::...::"); mls.LogInfo((object)"Fresh Lethal Loaded."); harmony.PatchAll(typeof(ModBase)); } }
BepInEx/FreshLethal/MS.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("MoreSuits")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("A mod that adds more suit options to Lethal Company")] [assembly: AssemblyFileVersion("1.4.1.0")] [assembly: AssemblyInformationalVersion("1.4.1")] [assembly: AssemblyProduct("MoreSuits")] [assembly: AssemblyTitle("MoreSuits")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.1.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 MoreSuits { [BepInPlugin("x753.More_Suits", "More Suits", "1.4.1")] public class MoreSuitsMod : BaseUnityPlugin { [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPrefix] private static void StartPatch(ref StartOfRound __instance) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Expected O, but got Unknown //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Expected O, but got Unknown //IL_0667: Unknown result type (might be due to invalid IL or missing references) try { if (SuitsAdded) { return; } int count = __instance.unlockablesList.unlockables.Count; UnlockableItem val = new UnlockableItem(); int num = 0; for (int i = 0; i < __instance.unlockablesList.unlockables.Count; i++) { UnlockableItem val2 = __instance.unlockablesList.unlockables[i]; if (!((Object)(object)val2.suitMaterial != (Object)null) || !val2.alreadyUnlocked) { continue; } val = val2; List<string> list = Directory.GetDirectories(Paths.PluginPath, "moresuits", SearchOption.AllDirectories).ToList(); List<string> list2 = new List<string>(); List<string> list3 = new List<string>(); List<string> list4 = DisabledSuits.ToLower().Replace(".png", "").Split(',') .ToList(); List<string> list5 = new List<string>(); if (!LoadAllSuits) { foreach (string item2 in list) { if (File.Exists(Path.Combine(item2, "!less-suits.txt"))) { string[] collection = new string[9] { "glow", "kirby", "knuckles", "luigi", "mario", "minion", "skeleton", "slayer", "smile" }; list5.AddRange(collection); break; } } } foreach (string item3 in list) { if (item3 != "") { string[] files = Directory.GetFiles(item3, "*.png"); string[] files2 = Directory.GetFiles(item3, "*.matbundle"); list2.AddRange(files); list3.AddRange(files2); } } list3.Sort(); list2.Sort(); try { foreach (string item4 in list3) { Object[] array = AssetBundle.LoadFromFile(item4).LoadAllAssets(); Object[] array2 = array; foreach (Object val3 in array2) { if (val3 is Material) { Material item = (Material)val3; customMaterials.Add(item); } } } } catch (Exception ex) { Debug.Log((object)("Something went wrong with More Suits! Could not load materials from asset bundle(s). Error: " + ex)); } foreach (string item5 in list2) { if (list4.Contains(Path.GetFileNameWithoutExtension(item5).ToLower())) { continue; } string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (list5.Contains(Path.GetFileNameWithoutExtension(item5).ToLower()) && item5.Contains(directoryName)) { continue; } UnlockableItem val4; Material val5; if (Path.GetFileNameWithoutExtension(item5).ToLower() == "default") { val4 = val; val5 = val4.suitMaterial; } else { val4 = JsonUtility.FromJson<UnlockableItem>(JsonUtility.ToJson((object)val)); val5 = Object.Instantiate<Material>(val4.suitMaterial); } byte[] array3 = File.ReadAllBytes(item5); Texture2D val6 = new Texture2D(2, 2); ImageConversion.LoadImage(val6, array3); val5.mainTexture = (Texture)(object)val6; val4.unlockableName = Path.GetFileNameWithoutExtension(item5); try { string path = Path.Combine(Path.GetDirectoryName(item5), "advanced", val4.unlockableName + ".json"); if (File.Exists(path)) { string[] array4 = File.ReadAllLines(path); for (int k = 0; k < array4.Length; k++) { string[] array5 = array4[k].Trim().Split(':'); if (array5.Length != 2) { continue; } string text = array5[0].Trim('"', ' ', ','); string text2 = array5[1].Trim('"', ' ', ','); if (text2.Contains(".png")) { byte[] array6 = File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(item5), "advanced", text2)); Texture2D val7 = new Texture2D(2, 2); ImageConversion.LoadImage(val7, array6); val5.SetTexture(text, (Texture)(object)val7); continue; } if (text == "PRICE" && int.TryParse(text2, out var result)) { try { val4 = AddToRotatingShop(val4, result, __instance.unlockablesList.unlockables.Count); } catch (Exception ex2) { Debug.Log((object)("Something went wrong with More Suits! Could not add a suit to the rotating shop. Error: " + ex2)); } continue; } switch (text2) { case "KEYWORD": val5.EnableKeyword(text); continue; case "DISABLEKEYWORD": val5.DisableKeyword(text); continue; case "SHADERPASS": val5.SetShaderPassEnabled(text, true); continue; case "DISABLESHADERPASS": val5.SetShaderPassEnabled(text, false); continue; } float result2; Vector4 vector; if (text == "SHADER") { Shader shader = Shader.Find(text2); val5.shader = shader; } else if (text == "MATERIAL") { foreach (Material customMaterial in customMaterials) { if (((Object)customMaterial).name == text2) { val5 = Object.Instantiate<Material>(customMaterial); val5.mainTexture = (Texture)(object)val6; break; } } } else if (float.TryParse(text2, out result2)) { val5.SetFloat(text, result2); } else if (TryParseVector4(text2, out vector)) { val5.SetVector(text, vector); } } } } catch (Exception ex3) { Debug.Log((object)("Something went wrong with More Suits! Error: " + ex3)); } val4.suitMaterial = val5; if (val4.unlockableName.ToLower() != "default") { __instance.unlockablesList.unlockables.Add(val4); } } SuitsAdded = true; break; } } catch (Exception ex4) { Debug.Log((object)("Something went wrong with More Suits! Error: " + ex4)); } } [HarmonyPatch("PositionSuitsOnRack")] [HarmonyPrefix] private static bool PositionSuitsOnRackPatch(ref StartOfRound __instance) { //IL_0050: 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_00c2: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) List<UnlockableSuit> source = Object.FindObjectsOfType<UnlockableSuit>().ToList(); source = source.OrderBy((UnlockableSuit suit) => suit.syncedSuitID.Value).ToList(); int num = 0; foreach (UnlockableSuit item in source) { AutoParentToShip component = ((Component)item).gameObject.GetComponent<AutoParentToShip>(); component.overrideOffset = true; float num2 = 0.18f; if (MakeSuitsFitOnRack && source.Count > 13) { num2 /= (float)Math.Min(source.Count, 20) / 12f; } component.positionOffset = new Vector3(-2.45f, 2.75f, -8.41f) + __instance.rightmostSuitPosition.forward * num2 * (float)num; component.rotationOffset = new Vector3(0f, 90f, 0f); num++; } return false; } } private const string modGUID = "x753.More_Suits"; private const string modName = "More Suits"; private const string modVersion = "1.4.1"; private readonly Harmony harmony = new Harmony("x753.More_Suits"); private static MoreSuitsMod Instance; public static bool SuitsAdded = false; public static string DisabledSuits; public static bool LoadAllSuits; public static bool MakeSuitsFitOnRack; public static int MaxSuits; public static List<Material> customMaterials = new List<Material>(); private static TerminalNode cancelPurchase; private static TerminalKeyword buyKeyword; private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if ((Object)Instance == (Object)null) { Instance = this; } DisabledSuits = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Disabled Suit List", "UglySuit751.png,UglySuit752.png,UglySuit753.png", "Comma-separated list of suits that shouldn't be loaded").Value; LoadAllSuits = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Ignore !less-suits.txt", true, "If true, ignores the !less-suits.txt file and will attempt to load every suit, except those in the disabled list. This should be true if you're not worried about having too many suits.").Value; MakeSuitsFitOnRack = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Make Suits Fit on Rack", true, "If true, squishes the suits together so more can fit on the rack.").Value; harmony.PatchAll(); } private static UnlockableItem AddToRotatingShop(UnlockableItem newSuit, int price, int unlockableID) { //IL_0073: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_0120: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Expected O, but got Unknown Terminal val = Object.FindObjectOfType<Terminal>(); for (int i = 0; i < val.terminalNodes.allKeywords.Length; i++) { if (((Object)val.terminalNodes.allKeywords[i]).name == "Buy") { buyKeyword = val.terminalNodes.allKeywords[i]; break; } } newSuit.alreadyUnlocked = false; newSuit.hasBeenMoved = false; newSuit.placedPosition = Vector3.zero; newSuit.placedRotation = Vector3.zero; newSuit.shopSelectionNode = ScriptableObject.CreateInstance<TerminalNode>(); ((Object)newSuit.shopSelectionNode).name = newSuit.unlockableName + "SuitBuy1"; newSuit.shopSelectionNode.creatureName = newSuit.unlockableName + " suit"; newSuit.shopSelectionNode.displayText = "You have requested to order " + newSuit.unlockableName + " suits.\nTotal cost of item: [totalCost].\n\nPlease CONFIRM or DENY.\n\n"; newSuit.shopSelectionNode.clearPreviousText = true; newSuit.shopSelectionNode.shipUnlockableID = unlockableID; newSuit.shopSelectionNode.itemCost = price; newSuit.shopSelectionNode.overrideOptions = true; CompatibleNoun val2 = new CompatibleNoun(); val2.noun = ScriptableObject.CreateInstance<TerminalKeyword>(); val2.noun.word = "confirm"; val2.noun.isVerb = true; val2.result = ScriptableObject.CreateInstance<TerminalNode>(); ((Object)val2.result).name = newSuit.unlockableName + "SuitBuyConfirm"; val2.result.creatureName = ""; val2.result.displayText = "Ordered " + newSuit.unlockableName + " suits! Your new balance is [playerCredits].\n\n"; val2.result.clearPreviousText = true; val2.result.shipUnlockableID = unlockableID; val2.result.buyUnlockable = true; val2.result.itemCost = price; val2.result.terminalEvent = ""; CompatibleNoun val3 = new CompatibleNoun(); val3.noun = ScriptableObject.CreateInstance<TerminalKeyword>(); val3.noun.word = "deny"; val3.noun.isVerb = true; if ((Object)(object)cancelPurchase == (Object)null) { cancelPurchase = ScriptableObject.CreateInstance<TerminalNode>(); } val3.result = cancelPurchase; ((Object)val3.result).name = "MoreSuitsCancelPurchase"; val3.result.displayText = "Cancelled order.\n"; newSuit.shopSelectionNode.terminalOptions = (CompatibleNoun[])(object)new CompatibleNoun[2] { val2, val3 }; TerminalKeyword val4 = ScriptableObject.CreateInstance<TerminalKeyword>(); ((Object)val4).name = newSuit.unlockableName + "Suit"; val4.word = newSuit.unlockableName.ToLower() + " suit"; val4.defaultVerb = buyKeyword; CompatibleNoun val5 = new CompatibleNoun(); val5.noun = val4; val5.result = newSuit.shopSelectionNode; List<CompatibleNoun> list = buyKeyword.compatibleNouns.ToList(); list.Add(val5); buyKeyword.compatibleNouns = list.ToArray(); List<TerminalKeyword> list2 = val.terminalNodes.allKeywords.ToList(); list2.Add(val4); list2.Add(val2.noun); list2.Add(val3.noun); val.terminalNodes.allKeywords = list2.ToArray(); return newSuit; } public static bool TryParseVector4(string input, out Vector4 vector) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) vector = Vector4.zero; string[] array = input.Split(','); if (array.Length == 4 && float.TryParse(array[0], out var result) && float.TryParse(array[1], out var result2) && float.TryParse(array[2], out var result3) && float.TryParse(array[3], out var result4)) { vector = new Vector4(result, result2, result3, result4); return true; } return false; } } }
BepInEx/FreshLethal/TMS.dll
Decompiled 2 years agousing System; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using TooManySuits.Helper; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("TooManySuits")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TooManySuits")] [assembly: AssemblyTitle("TooManySuits")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [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 TooManySuits { [BepInPlugin("TooManySuits", "Too Many Suits", "1.0.4")] public class Plugin : BaseUnityPlugin { public static ManualLogSource LogSource; public static ConfigEntry<string> NextButton; public static ConfigEntry<string> BackButton; public static ConfigEntry<float> TextScale; private void Awake() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown LogSource = Logger.CreateLogSource("TooManySuits"); NextButton = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Next-Page-Keybind", "<Keyboard>/n", "Next page button."); BackButton = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Back-Page-Keybind", "<Keyboard>/b", "Back page button."); TextScale = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Text-Scale", 0.003f, "Size of the text above the suit rack."); GameObject val = new GameObject("TooManySuits"); val.AddComponent<PluginLoader>(); ((Object)val).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)val); } } public class PluginLoader : MonoBehaviour { private class Hooks { public static bool SetUI; public static GameObject SuitPanel; public static void HookStartGame() { Plugin.LogSource.LogInfo((object)"StartOfRound!"); Object.Instantiate<GameObject>(suitSelectBundle.LoadAsset<GameObject>("SuitSelect")); SuitPanel = GameObject.Find("SuitPanel"); SuitPanel.SetActive(false); SetUI = true; } } private readonly Harmony Harmony = new Harmony("TooManySuits"); private InputAction moveRightAction; private InputAction moveLeftAction; private int currentPage; private int suitsPerPage = 15; private int suitsLength; private UnlockableSuit[] allSuits; private static AssetBundle suitSelectBundle; private void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown moveRightAction = new InputAction((string)null, (InputActionType)0, Plugin.NextButton.Value, (string)null, (string)null, (string)null); moveRightAction.performed += MoveRightAction; moveRightAction.Enable(); moveLeftAction = new InputAction((string)null, (InputActionType)0, Plugin.BackButton.Value, (string)null, (string)null, (string)null); moveLeftAction.performed += MoveLeftAction; moveLeftAction.Enable(); MethodInfo method = typeof(StartOfRound).GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic); MethodInfo method2 = typeof(Hooks).GetMethod("HookStartGame"); Harmony.Patch((MethodBase)method, (HarmonyMethod)null, new HarmonyMethod(method2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); MethodInfo method3 = typeof(PlayerControllerB).GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic); MethodInfo method4 = typeof(LocalPlayer).GetMethod("PlayerControllerStart"); Harmony.Patch((MethodBase)method3, (HarmonyMethod)null, new HarmonyMethod(method4), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Plugin.LogSource.LogInfo((object)"TooManySuits Ex. Loaded."); suitSelectBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "suitselect")); } private void Update() { if (!((Object)(object)StartOfRound.Instance == (Object)null)) { allSuits = (from suit in Resources.FindObjectsOfTypeAll<UnlockableSuit>() orderby suit.syncedSuitID.Value select suit).ToArray(); DisplaySuits(); } } private void DisplaySuits() { //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0296: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) if (allSuits.Length == 0) { return; } int num = currentPage * suitsPerPage; int num2 = Mathf.Min(num + suitsPerPage, allSuits.Length); int num3 = 0; for (int i = 0; i < allSuits.Length; i++) { UnlockableSuit val = allSuits[i]; AutoParentToShip component = ((Component)val).gameObject.GetComponent<AutoParentToShip>(); if (!((Object)(object)component == (Object)null)) { bool flag = i >= num && i < num2; ((Component)val).gameObject.SetActive(flag); if (flag) { component.overrideOffset = true; component.positionOffset = new Vector3(-2.45f, 2.75f, -8.41f) + StartOfRound.Instance.rightmostSuitPosition.forward * (0.18f * (float)num3); component.rotationOffset = new Vector3(0f, 90f, 0f); num3++; } } } suitsLength = allSuits.Length; if (!LocalPlayer.isActive()) { return; } if (LocalPlayer.localPlayer.isInHangarShipRoom) { TextMeshProUGUI componentInChildren = Hooks.SuitPanel.GetComponentInChildren<TextMeshProUGUI>(); Plugin.LogSource.LogInfo((object)((Object)componentInChildren).name); if ((Object)(object)componentInChildren != (Object)null) { Hooks.SuitPanel.SetActive(true); ((TMP_Text)componentInChildren).text = $"Page {currentPage + 1}/{suitsLength / suitsPerPage + 1}"; } return; } Hooks.SuitPanel.SetActive(false); if (Hooks.SetUI) { Hooks.SetUI = false; Hooks.SuitPanel.GetComponentInParent<Canvas>().renderMode = (RenderMode)2; Hooks.SuitPanel.GetComponentInParent<Canvas>().worldCamera = LocalPlayer.localPlayer.gameplayCamera; Transform transform = Hooks.SuitPanel.transform; Bounds bounds = StartOfRound.Instance.shipBounds.bounds; transform.position = ((Bounds)(ref bounds)).center - new Vector3(2.8992f, 0.7998f, 2f); Hooks.SuitPanel.transform.rotation = Quaternion.Euler(0f, 180f, 0f); Hooks.SuitPanel.transform.localScale = new Vector3(Plugin.TextScale.Value, Plugin.TextScale.Value, Plugin.TextScale.Value); Hooks.SuitPanel.SetActive(true); } } private void MoveRightAction(CallbackContext obj) { currentPage = Mathf.Min(currentPage + 1, Mathf.CeilToInt((float)suitsLength / (float)suitsPerPage) - 1); } private void MoveLeftAction(CallbackContext obj) { currentPage = Mathf.Max(currentPage - 1, 0); } } } namespace TooManySuits.Helper { public class LocalPlayer { public static PlayerControllerB localPlayer; public static bool isActive() { return (Object)(object)localPlayer != (Object)null; } public static void PlayerControllerStart(PlayerControllerB __instance) { if (NetworkManager.Singleton.LocalClientId == __instance.playerClientId) { localPlayer = __instance; } } } }