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 LobbyAppearanceImprovements v1.4.0
LobbyAppearanceImprovements.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using HG; using HG.Reflection; using InLobbyConfig; using InLobbyConfig.Fields; using LeTai.Asset.TranslucentImage; using LobbyAppearanceImprovements.Layouts; using LobbyAppearanceImprovements.MannequinLayouts; using LobbyAppearanceImprovements.Scenes; using Microsoft.CodeAnalysis; using On.RoR2; using On.RoR2.SurvivorMannequins; using On.RoR2.UI; using PaladinMod.Misc; using R2API; using R2API.Utils; using RoR2; using RoR2.SurvivorMannequins; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.EventSystems; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; 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: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LobbyAppearanceImprovements")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Mod for Risk of Rain 2")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+115d72c5adde71810dd309f8e4530d3805b644d3")] [assembly: AssemblyProduct("LobbyAppearanceImprovements")] [assembly: AssemblyTitle("LobbyAppearanceImprovements")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } public static class QuaternionUtil { public static Quaternion AngVelToDeriv(Quaternion Current, Vector3 AngVel) { //IL_0003: 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) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0050: 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_005c: 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) Quaternion val = default(Quaternion); ((Quaternion)(ref val))..ctor(AngVel.x, AngVel.y, AngVel.z, 0f); Quaternion val2 = val * Current; return new Quaternion(0.5f * val2.x, 0.5f * val2.y, 0.5f * val2.z, 0.5f * val2.w); } public static Vector3 DerivToAngVel(Quaternion Current, Quaternion Deriv) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_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_003a: Unknown result type (might be due to invalid IL or missing references) Quaternion val = Deriv * Quaternion.Inverse(Current); return new Vector3(2f * val.x, 2f * val.y, 2f * val.z); } public static Quaternion IntegrateRotation(Quaternion Rotation, Vector3 AngularVelocity, float DeltaTime) { //IL_0011: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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_001f: 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_0037: 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_0046: 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_0055: 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_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_0064: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (DeltaTime < Mathf.Epsilon) { return Rotation; } Quaternion val = AngVelToDeriv(Rotation, AngularVelocity); Vector4 val2 = new Vector4(Rotation.x + val.x * DeltaTime, Rotation.y + val.y * DeltaTime, Rotation.z + val.z * DeltaTime, Rotation.w + val.w * DeltaTime); Vector4 normalized = ((Vector4)(ref val2)).normalized; return new Quaternion(normalized.x, normalized.y, normalized.z, normalized.w); } public static Quaternion SmoothDamp(Quaternion rot, Quaternion target, ref Quaternion deriv, float time) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_015c: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_00b0: 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_00c8: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) if (Time.deltaTime < Mathf.Epsilon) { return rot; } float num = Quaternion.Dot(rot, target); float num2 = ((num > 0f) ? 1f : (-1f)); target.x *= num2; target.y *= num2; target.z *= num2; target.w *= num2; Vector4 val = new Vector4(Mathf.SmoothDamp(rot.x, target.x, ref deriv.x, time), Mathf.SmoothDamp(rot.y, target.y, ref deriv.y, time), Mathf.SmoothDamp(rot.z, target.z, ref deriv.z, time), Mathf.SmoothDamp(rot.w, target.w, ref deriv.w, time)); Vector4 normalized = ((Vector4)(ref val)).normalized; Vector4 val2 = Vector4.Project(new Vector4(deriv.x, deriv.y, deriv.z, deriv.w), normalized); deriv.x -= val2.x; deriv.y -= val2.y; deriv.z -= val2.z; deriv.w -= val2.w; return new Quaternion(normalized.x, normalized.y, normalized.z, normalized.w); } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] [DebuggerNonUserCode] internal sealed class MemberNotNullAttribute : Attribute { public string[] Members { get; } public MemberNotNullAttribute(string member) { Members = new string[1] { member }; } public MemberNotNullAttribute(params string[] members) { Members = members; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] [DebuggerNonUserCode] internal sealed class MemberNotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public string[] Members { get; } public MemberNotNullWhenAttribute(bool returnValue, string member) { ReturnValue = returnValue; Members = new string[1] { member }; } public MemberNotNullWhenAttribute(bool returnValue, params string[] members) { ReturnValue = returnValue; Members = members; } } } namespace LobbyAppearanceImprovements { public static class Commands { public class LAI_SceneCycler : MonoBehaviour { public List<string> sceneNames = new List<string>(); public float durationPerScene = 3f; private float stopwatch = 0f; public int index = 0; private bool hasTakenScreenshot = false; private float delayBeforeScreenshot = 2f; public void Awake() { sceneNames = LAISceneManager.scenesDict.Keys.ToList(); Methods.SelectScene(sceneNames[index]); } public void Update() { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) stopwatch += Time.deltaTime; if (stopwatch > delayBeforeScreenshot && !hasTakenScreenshot) { hasTakenScreenshot = true; ScreenCapture.CaptureScreenshot("C:/Users/destr/Pictures/0Screenshots/" + sceneNames[index] + ".png"); } if (stopwatch < durationPerScene) { return; } stopwatch = 0f; index++; hasTakenScreenshot = false; try { Methods.SelectScene(sceneNames[index]); } catch (Exception ex) { Debug.Log((object)ex.ToString()); new GameObject().AddComponent<LAI_LayoutCycler>(); ((Behaviour)this).enabled = false; Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class LAI_LayoutCycler : MonoBehaviour { public List<string> layoutNames = new List<string>(); public float durationPerScene = 3f; private float stopwatch = 0f; public int index = 0; private bool hasTakenScreenshot = false; private float delayBeforeScreenshot = 2f; public void Awake() { layoutNames = LAILayoutManager.layoutsDict.Keys.ToList(); layoutNames.Sort(); while (layoutNames[index].StartsWith("any_")) { index++; } Methods.LoadSceneAndLayout(GetSceneNameFromLayout(layoutNames[index]), layoutNames[index]); Methods.SelectScene(layoutNames[index]); } public string GetSceneNameFromLayout(string layoutName) { string[] array = layoutName.Split('_'); return array[0]; } public void Update() { stopwatch += Time.deltaTime; if (stopwatch > delayBeforeScreenshot && !hasTakenScreenshot) { hasTakenScreenshot = true; ScreenCapture.CaptureScreenshot("C:/Users/destr/Pictures/0Screenshots/" + layoutNames[index] + ".png"); } if (stopwatch < durationPerScene) { return; } stopwatch = 0f; index++; hasTakenScreenshot = false; try { Methods.LoadSceneAndLayout(GetSceneNameFromLayout(layoutNames[index]), layoutNames[index]); } catch (Exception ex) { Debug.Log((object)ex.ToString()); ((Behaviour)this).enabled = false; Object.Destroy((Object)(object)((Component)this).gameObject); } } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_SpawnPrefab(ConCommandArgs args) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) string argString = ((ConCommandArgs)(ref args)).GetArgString(0); GameObject val = Addressables.LoadAssetAsync<GameObject>((object)argString).WaitForCompletion(); GameObject val2 = Object.Instantiate<GameObject>(val); val2.transform.position = new Vector3(((ConCommandArgs)(ref args)).GetArgFloat(1), ((ConCommandArgs)(ref args)).GetArgFloat(2), ((ConCommandArgs)(ref args)).GetArgFloat(3)); } public static void CMD_SpawnRestraintBar(ConCommandArgs args) { GameObject val = Object.Instantiate<GameObject>(SceneSetup.ContactLight_RestraintBar, Survivors.Commando.displayPrefab.transform); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_ListScene(ConCommandArgs args) { foreach (KeyValuePair<string, Type> item in LAISceneManager.scenesDict) { Debug.Log((object)item.Key); } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_SetScene(ConCommandArgs args) { if (((ConCommandArgs)(ref args)).Count == 1) { Methods.SelectScene(((ConCommandArgs)(ref args)).GetArgString(0)); } else { Methods.LoadSceneAndLayout(((ConCommandArgs)(ref args)).GetArgString(0), ((ConCommandArgs)(ref args)).GetArgString(1)); } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_ListLayouts(ConCommandArgs args) { if (((ConCommandArgs)(ref args)).Count == 1) { string argString = ((ConCommandArgs)(ref args)).GetArgString(0); { foreach (KeyValuePair<string, Type> item in LAILayoutManager.layoutsDict) { LAILayout lAILayout = (LAILayout)Activator.CreateInstance(item.Value); if (lAILayout.SceneName == argString) { Debug.Log((object)item.Key); } } return; } } foreach (KeyValuePair<string, Type> item2 in LAILayoutManager.layoutsDict) { Debug.Log((object)item2.Key); } } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_SetLayout(ConCommandArgs args) { Methods.SelectLayout(((ConCommandArgs)(ref args)).GetArgString(0)); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_GetPos(ConCommandArgs args) { //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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) string name = ((Object)((ConCommandArgs)(ref args)).senderBody).name; name = name.Remove(name.Length - 7); Vector3 footPosition = ((ConCommandArgs)(ref args)).senderBody.footPosition; Quaternion rotation = ((ConCommandArgs)(ref args)).senderBody.transform.rotation; string text = "{ \"" + name + "\", new [] {new Vector3(" + footPosition.x + "f, " + footPosition.y + "f, " + footPosition.z + "f), new Vector3(" + rotation.x + ", " + rotation.y + "f, " + rotation.z + "f) } },"; Debug.Log((object)text); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_CycleScenes(ConCommandArgs args) { } } public static class ConfigSetup { public enum LoggingStyle { None, UserShouldSee, ObscureSoOnlyDevSees } public static float UI_Scale_Min = 0.5f; public static float UI_Scale_Max = 1.75f; private static ModConfigEntry inLobbyConfigEntry; public static string tempSceneName; public static string tempLayoutName; public static bool tempConfirmChoice; public static Action<string> tempSelectSceneAction; public static Action<string> tempSelectLayoutAction; public static ConfigEntry<bool> UI_ShowFade { get; set; } public static ConfigEntry<int> UI_BlurOpacity { get; set; } public static ConfigEntry<float> UI_Scale { get; set; } public static ConfigEntry<string> MusicChoice { get; set; } public static ConfigEntry<bool> PostProcessing { get; set; } public static ConfigEntry<bool> Parallax { get; set; } public static ConfigEntry<Color> Light_Color { get; set; } public static ConfigEntry<bool> Light_Flicker { get; set; } public static ConfigEntry<float> Light_Intensity { get; set; } public static ConfigEntry<float> MannequinScale { get; set; } public static ConfigEntry<bool> MannequinEnableLocalTurn { get; set; } public static ConfigEntry<float> MannequinEnableLocalTurnMultiplier { get; set; } public static ConfigEntry<bool> MeshProps { get; set; } public static ConfigEntry<bool> PhysicsProps { get; set; } public static ConfigEntry<bool> Lobby_Shaking { get; set; } public static ConfigEntry<string> Scene_Selection { get; set; } public static ConfigEntry<bool> Scene_Header { get; set; } public static ConfigEntry<bool> Scene_Seer { get; set; } public static ConfigEntry<bool> SIL_LockedCharactersBlack { get; set; } public static ConfigEntry<string> SIL_SelectedLayout { get; set; } public static ConfigEntry<bool> SIL_ZoomEnable { get; set; } public static ConfigEntry<KeyCode> SIL_ResetCameraKey { get; set; } public static ConfigEntry<bool> SIL_ClickOnCharacterToSwap { get; set; } public static ConfigEntry<LoggingStyle> ShowLoggingText { get; set; } public static void Initialize(ConfigFile configFile) { Bind(configFile); InLobbyBind(); } public static void Bind(ConfigFile config) { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) string text = "Sound"; MusicChoice = config.Bind<string>(text, "Music", "auto", "Adjust: Sets the current musictrack of the lobby.\n\"default\" = Will play the default lobby music or, if the scene has one, the overrided music\n\"auto\" = Will auto choose the scene's track.For the rest, see the readme for valid tracks."); text = "UI"; UI_ShowFade = config.Bind<bool>(text, "Show Fade", true, "Toggle: Dark fade bars at the top and bottom of the lobby."); UI_BlurOpacity = config.Bind<int>(text, "Blur Opacity", 100, "Adjust: Blur opacity behind the UI.\n0:fully transparent - 100:default"); UI_Scale = config.Bind<float>(text, "UI Scale", 1f, "Adjust: Resizes the UIs on the left and right."); UI_Scale.Value = Mathf.Clamp(UI_Scale.Value, UI_Scale_Min, UI_Scale_Max); text = "Overlay"; PostProcessing = config.Bind<bool>(text, "Post Processing", true, "Toggle: Post processing."); Parallax = config.Bind<bool>(text, "Parallax", true, "Toggle: Parallax effect on the camera controlled by the position of the cursor."); text = "Lights"; Light_Color = config.Bind<Color>(text, "Color", new Color(0.9811f, 0.3564f, 0.3564f, 1f), "Adjust: The color of the lobby's light, include # for hex values"); Light_Flicker = config.Bind<bool>(text, "Flickering", true, "Toggle: Flickering of the Light."); Light_Intensity = config.Bind<float>(text, "Intensity", 0.4873f, "Adjust: Change the intensity of the light."); text = "Character Display"; MannequinScale = config.Bind<float>(text, "Character Display Scale", 1f, "Adjust: Resizes character displays."); MannequinEnableLocalTurn = config.Bind<bool>(text, "Character Rotate", true, "Toggle: Click and drag to rotate your character in the lobby."); MannequinEnableLocalTurnMultiplier = config.Bind<float>(text, "Character Rotate Speed", 2f, "Adjust: Sets the speed of character rotation."); text = "Background"; MeshProps = config.Bind<bool>(text, "LobbyScene: Show Static MeshProps", false, "Toggle: all the stationary meshprops."); PhysicsProps = config.Bind<bool>(text, "LobbyScene: Show Physics Props", false, "Toggle: all the physics props like the Chair."); Lobby_Shaking = config.Bind<bool>(text, "LobbyScene: Shaking", false, "Toggle: whether the physics objects are shaken periodically"); Scene_Selection = config.Bind<string>(text, "Select Scene", "lobby", "Adjust: Sets the current scene of the lobby."); Scene_Header = config.Bind<bool>(text, "Scene Header", true, "Toggle: Shows the scene's title and subtitle."); Scene_Seer = config.Bind<bool>(text, "Scene Seer", true, "Toggle: Shows the stage's seer text at the bottom."); SIL_LockedCharactersBlack = config.Bind<bool>(text, "Enable Unavailable Shadow Survivors", true, "Toggle: Any survivors in a character layout that you don't have unlocked become shadowy."); SIL_SelectedLayout = config.Bind<string>(text, "Character Layout Name", "any_empty", "Adjust: Shows background elements in certain orientations. Set to Any_Empty to disable."); SIL_ZoomEnable = config.Bind<bool>(text, "Zoom On Character Select", true, "Toggle: Selecting a character will zoom the camera onto that character."); SIL_ResetCameraKey = config.Bind<KeyCode>(text, "Reset Camera", (KeyCode)61, "Adjust: Sets keybind for resetting the "); SIL_ClickOnCharacterToSwap = config.Bind<bool>(text, "Click on bg char to select (EXPERIMENTAL)", true, "Allows clicking on a character to select them.\nExperimental: Clicking on the character might be unavailable, or offset."); ShowLoggingText = config.Bind<LoggingStyle>("zDebugging", "Print logging text to console", LoggingStyle.UserShouldSee, "If true, then some logging messages are sent to the console. Error and warning messages will still display."); tempSelectSceneAction = (Action<string>)Delegate.Combine(tempSelectSceneAction, new Action<string>(SetNewScene)); tempSelectLayoutAction = (Action<string>)Delegate.Combine(tempSelectLayoutAction, new Action<string>(SetNewLayout)); tempSceneName = Scene_Selection.Value; tempLayoutName = SIL_SelectedLayout.Value; } public static void InLobbyBind() { //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_0017: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Expected O, but got Unknown //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Expected O, but got Unknown //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Expected O, but got Unknown //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Expected O, but got Unknown //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Expected O, but got Unknown //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Expected O, but got Unknown //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Expected O, but got Unknown //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Expected O, but got Unknown //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Expected O, but got Unknown //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Expected O, but got Unknown //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06d2: Expected O, but got Unknown //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Expected O, but got Unknown //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Expected O, but got Unknown //IL_082d: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Expected O, but got Unknown //IL_0882: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Expected O, but got Unknown inLobbyConfigEntry = new ModConfigEntry { DisplayName = "Lobby Appearance Improvements" }; inLobbyConfigEntry.SectionFields["Sound"] = new List<IConfigField> { (IConfigField)new StringConfigField(((ConfigEntryBase)MusicChoice).Definition.Key, ((ConfigEntryBase)MusicChoice).Description.Description, (Func<string>)(() => MusicChoice.Value), (Action<string>)null, (Action<string>)HookMethods.Hook_MusicChoice) }; inLobbyConfigEntry.SectionFields["UI"] = new List<IConfigField> { (IConfigField)new BooleanConfigField(((ConfigEntryBase)UI_ShowFade).Definition.Key, ((ConfigEntryBase)UI_ShowFade).Description.Description, (Func<bool>)(() => UI_ShowFade.Value), (Action<bool>)HookMethods.Hook_UI_ShowFade), (IConfigField)new IntConfigField(((ConfigEntryBase)UI_BlurOpacity).Definition.Key, (Func<int>)(() => UI_BlurOpacity.Value), (Action<int>)HookMethods.Hook_UI_BlurOpacity, (Action<int>)null, (int?)0, (int?)100), (IConfigField)new FloatConfigField(((ConfigEntryBase)UI_Scale).Definition.Key, (Func<float>)(() => UI_Scale.Value), (Action<float>)null, (Action<float>)HookMethods.Hook_UIScale, (float?)UI_Scale_Min, (float?)UI_Scale_Max) }; inLobbyConfigEntry.SectionFields["Overlay"] = new List<IConfigField> { (IConfigField)new BooleanConfigField(((ConfigEntryBase)PostProcessing).Definition.Key, ((ConfigEntryBase)PostProcessing).Description.Description, (Func<bool>)(() => PostProcessing.Value), (Action<bool>)HookMethods.Hook_Overlay_ShowPostProcessing), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Parallax).Definition.Key, ((ConfigEntryBase)Parallax).Description.Description, (Func<bool>)(() => Parallax.Value), (Action<bool>)HookMethods.Hook_Overlay_Parallax) }; inLobbyConfigEntry.SectionFields["Lights"] = new List<IConfigField> { (IConfigField)new ColorConfigField(((ConfigEntryBase)Light_Color).Definition.Key, ((ConfigEntryBase)Light_Color).Description.Description, (Func<Color>)(() => Light_Color.Value), (Action<Color>)HookMethods.Hook_LightUpdate_Color, (Action<Color>)null, false), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Light_Flicker).Definition.Key, ((ConfigEntryBase)Light_Flicker).Description.Description, (Func<bool>)(() => Light_Flicker.Value), (Action<bool>)HookMethods.Hook_LightUpdate_Flicker), (IConfigField)new FloatConfigField(((ConfigEntryBase)Light_Intensity).Definition.Key, ((ConfigEntryBase)Light_Intensity).Description.Description, (Func<float>)(() => Light_Intensity.Value), (Action<float>)HookMethods.Hook_LightUpdate_Intensity, (Action<float>)null, (float?)null, (float?)null) }; inLobbyConfigEntry.SectionFields["Mannequins"] = new List<IConfigField> { (IConfigField)new FloatConfigField(((ConfigEntryBase)MannequinScale).Definition.Key, ((ConfigEntryBase)MannequinScale).Description.Description, (Func<float>)(() => MannequinScale.Value), (Action<float>)HookMethods.Hook_RescalePads, (Action<float>)null, (float?)null, (float?)null), (IConfigField)new BooleanConfigField(((ConfigEntryBase)MannequinEnableLocalTurn).Definition.Key, ((ConfigEntryBase)MannequinEnableLocalTurn).Description.Description, (Func<bool>)(() => MannequinEnableLocalTurn.Value), (Action<bool>)HookMethods.Hook_Rotate_Toggle), (IConfigField)new FloatConfigField(((ConfigEntryBase)MannequinEnableLocalTurnMultiplier).Definition.Key, ((ConfigEntryBase)MannequinEnableLocalTurnMultiplier).Description.Description, (Func<float>)(() => MannequinEnableLocalTurnMultiplier.Value), (Action<float>)HookMethods.Hook_Rotate_Speed, (Action<float>)null, (float?)null, (float?)null) }; inLobbyConfigEntry.SectionFields["Scenes+Layouts"] = new List<IConfigField> { (IConfigField)new BooleanConfigField(((ConfigEntryBase)Scene_Header).Definition.Key, ((ConfigEntryBase)Scene_Header).Description.Description, (Func<bool>)(() => Scene_Header.Value), (Action<bool>)HookMethods.Hook_ToggleSceneHeaderVisibility), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Scene_Seer).Definition.Key, ((ConfigEntryBase)Scene_Seer).Description.Description, (Func<bool>)(() => Scene_Seer.Value), (Action<bool>)HookMethods.Hook_ToggleSceneSeerVisibility), (IConfigField)new StringConfigField(((ConfigEntryBase)Scene_Selection).Definition.Key, ((ConfigEntryBase)Scene_Selection).Description.Description, (Func<string>)(() => Scene_Selection.Value), (Action<string>)null, tempSelectSceneAction), (IConfigField)new StringConfigField(((ConfigEntryBase)SIL_SelectedLayout).Definition.Key, ((ConfigEntryBase)SIL_SelectedLayout).Description.Description, (Func<string>)(() => SIL_SelectedLayout.Value), (Action<string>)null, tempSelectLayoutAction), (IConfigField)new BooleanConfigField("Confirm Choice", "Click to confirm choice for scene.", (Func<bool>)(() => tempConfirmChoice), (Action<bool>)SetSceneLayoutFromLobby), (IConfigField)new BooleanConfigField(((ConfigEntryBase)SIL_ZoomEnable).Definition.Key, ((ConfigEntryBase)SIL_ZoomEnable).Description.Description, (Func<bool>)(() => SIL_ZoomEnable.Value), (Action<bool>)HookMethods.Hook_ToggleZooming), (IConfigField)(object)new EnumConfigField<KeyCode>(((ConfigEntryBase)SIL_ResetCameraKey).Definition.Key, ((ConfigEntryBase)SIL_ResetCameraKey).Description.Description, (Func<KeyCode>)(() => SIL_ResetCameraKey.Value), (Action<KeyCode>)null), (IConfigField)new BooleanConfigField(((ConfigEntryBase)SIL_LockedCharactersBlack).Definition.Key, ((ConfigEntryBase)SIL_LockedCharactersBlack).Description.Description, (Func<bool>)(() => SIL_LockedCharactersBlack.Value), (Action<bool>)HookMethods.Hook_BlackenSurvivors) }; inLobbyConfigEntry.SectionFields["Scene: Lobby"] = new List<IConfigField> { (IConfigField)new BooleanConfigField(((ConfigEntryBase)MeshProps).Definition.Key, ((ConfigEntryBase)MeshProps).Description.Description, (Func<bool>)(() => MeshProps.Value), (Action<bool>)HookMethods.Hook_Lobby_HideProps), (IConfigField)new BooleanConfigField(((ConfigEntryBase)PhysicsProps).Definition.Key, ((ConfigEntryBase)PhysicsProps).Description.Description, (Func<bool>)(() => PhysicsProps.Value), (Action<bool>)HookMethods.Hook_Lobby_HidePhysicsProps), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Lobby_Shaking).Definition.Key, ((ConfigEntryBase)Lobby_Shaking).Description.Description, (Func<bool>)(() => Lobby_Shaking.Value), (Action<bool>)HookMethods.Hook_Lobby_DisableShaking) }; ModConfigCatalog.Add(inLobbyConfigEntry); } public static void SetNewScene(string value) { tempSceneName = value; } public static void SetNewLayout(string value) { tempLayoutName = value; } public static void SetNewMannequin(string value) { } public static void SetSceneLayoutFromLobby(bool value) { if (value) { Methods.LoadSceneAndLayoutResult loadSceneAndLayoutResult = Methods.LoadSceneAndLayout(tempSceneName, tempLayoutName); tempConfirmChoice = false; switch (loadSceneAndLayoutResult) { case Methods.LoadSceneAndLayoutResult.NoSceneNoLayout: break; case Methods.LoadSceneAndLayoutResult.NoScene: SIL_SelectedLayout.Value = tempLayoutName; break; case Methods.LoadSceneAndLayoutResult.NoLayout: Scene_Selection.Value = tempSceneName; break; default: Scene_Selection.Value = tempSceneName; SIL_SelectedLayout.Value = tempLayoutName; break; } } } } public static class LAIAssets { public static GameObject bombardierTextObject; public static async Task Init() { await Test().ConfigureAwait(continueOnCapturedContext: false); static async Task Test() { AsyncOperationHandle<GameObject> task1 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/CreditsPanel/HGCreditNameLabel.prefab"); AsyncOperationHandle<TMP_FontAsset> task2 = Addressables.LoadAssetAsync<TMP_FontAsset>((object)"RoR2/Base/Common/Fonts/Bombardier/tmpBombDropshadow.asset"); AsyncOperationHandle<Material> task3 = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/Fonts/Bombardier/tmpBombPlain.mat"); bombardierTextObject = PrefabAPI.InstantiateClone(await task1.Task, "LAI_BombardierTextObject", false); HGTextMeshProUGUI textmesh = bombardierTextObject.GetComponent<HGTextMeshProUGUI>(); HGTextMeshProUGUI val = textmesh; ((TMP_Text)val).font = await task2.Task; HGTextMeshProUGUI val2 = textmesh; ((Graphic)val2).material = await task3.Task; ((TMP_Text)textmesh).enableKerning = true; ((TMP_Text)textmesh).enableAutoSizing = true; ((TMP_Text)textmesh).fontSize = 38.5f; Object.Destroy((Object)(object)bombardierTextObject.GetComponent<ContentSizeFitter>()); } } } internal static class LAICameraManager { public class CameraController : MonoBehaviour { public float fov = 60f; public float pitch = 0f; public float yaw = 0f; public bool restart = false; public bool logit = false; private CameraRigController cam; public void SetCam(CameraRigController newCam) { cam = newCam; } public void FixedUpdate() { if (restart) { fov = 60f; pitch = 0f; yaw = 0f; restart = false; return; } cam.baseFov = fov; if (logit) { Debug.Log((object)$"new CameraSetting( {fov}, {pitch}, {yaw} )"); logit = false; } } } public static Dictionary<string, LAILayout.CameraSetting> currentCameraSettings = new Dictionary<string, LAILayout.CameraSetting>(); public static Methods.LAICameraController CurrentCameraController; private static CameraRigController _mainCameraRigController; public static CameraRigController MainCameraRigController { get { if (!Object.op_Implicit((Object)(object)_mainCameraRigController)) { _mainCameraRigController = GameObject.Find("Main Camera").GetComponent<CameraRigController>(); } return _mainCameraRigController; } set { _mainCameraRigController = value; } } public static void Init() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CameraRigController.Start += new hook_Start(CameraRigController_Start); } public static void CameraRigController_Start(orig_Start orig, CameraRigController self) { orig.Invoke(self); CameraController cameraController = ((Component)self).gameObject.AddComponent<CameraController>(); cameraController.SetCam(self); ((Behaviour)cameraController).enabled = false; } } internal static class LAILayoutManager { public static LAILayout chosenLayout = null; public static Dictionary<string, Type> layoutsDict = new Dictionary<string, Type>(); public static List<string> layoutNameList = new List<string>(); public static GameObject layoutInstance; public static string GetLayoutTitleToken() { return (chosenLayout != null) ? chosenLayout.LayoutTitleToken : string.Empty; } } internal static class LAILogging { internal static ManualLogSource _logger; public static void Init(ManualLogSource manualLogSource) { _logger = manualLogSource; } public static void LogError(string message, ConfigSetup.LoggingStyle loggingStyle) { if (ConfigSetup.ShowLoggingText.Value >= loggingStyle) { _logger.LogError((object)message); } } public static void LogMessage(string message, ConfigSetup.LoggingStyle loggingStyle) { if (ConfigSetup.ShowLoggingText.Value >= loggingStyle) { _logger.LogMessage((object)message); } } public static void LogWarning(string message, ConfigSetup.LoggingStyle loggingStyle) { if (ConfigSetup.ShowLoggingText.Value >= loggingStyle) { _logger.LogWarning((object)message); } } } internal static class LAIMannequinManager { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnable <>9__4_0; internal void <Init>b__4_0(orig_OnEnable orig, SurvivorMannequinDioramaController self) { mannequinDioramaController = self; orig.Invoke(self); } } public static SurvivorMannequinDioramaController mannequinDioramaController = null; public static BaseMannequinLayout chosenMannequinLayout = null; public static Dictionary<string, Type> mannequinLayoutsDict = new Dictionary<string, Type>(); public static List<string> mannequinLayoutNameList = new List<string>(); public static void Init() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__4_0; if (obj == null) { hook_OnEnable val = delegate(orig_OnEnable orig, SurvivorMannequinDioramaController self) { mannequinDioramaController = self; orig.Invoke(self); }; <>c.<>9__4_0 = val; obj = (object)val; } SurvivorMannequinDioramaController.OnEnable += (hook_OnEnable)obj; } } internal static class LAIMusicManager { public static MusicTrackOverride musicTrackOverride; public static void Init() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown CharacterSelectController.Awake += new hook_Awake(CharacterSelectController_Awake); } private static void CharacterSelectController_Awake(orig_Awake orig, CharacterSelectController self) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) musicTrackOverride = ((Component)self).gameObject.AddComponent<MusicTrackOverride>(); musicTrackOverride.priority = 99999; musicTrackOverride.track = Addressables.LoadAssetAsync<MusicTrackDef>((object)"RoR2/Base/Common/muLogbook").WaitForCompletion(); ((Behaviour)musicTrackOverride).enabled = false; orig.Invoke(self); } public static void OnSceneLoaded(LAIScene scene = null) { string value = ConfigSetup.MusicChoice.Value; if (scene == null) { scene = LAISceneManager.chosenScene; } LAILogging.LogMessage("Changing music track to \"" + value + "\"", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); if (value.ToLower() == "default") { ((Behaviour)musicTrackOverride).enabled = false; } else if (value.ToLower() == "auto") { ((Behaviour)musicTrackOverride).enabled = true; LAILogging.LogMessage($"Changing music track to {scene}'s \"{scene.MusicTrackName}\"", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); MusicTrackDef val = MusicTrackCatalog.FindMusicTrackDef(scene.MusicTrackName); if ((Object)(object)val == (Object)null) { ((Behaviour)musicTrackOverride).enabled = false; } musicTrackOverride.track = val; } else { ((Behaviour)musicTrackOverride).enabled = true; MusicTrackDef val2 = MusicTrackCatalog.FindMusicTrackDef(value); if ((Object)(object)val2 == (Object)null) { LAILogging.LogWarning("Couldn't find music choice \"{choice}\", defaulting...", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); ((Behaviour)musicTrackOverride).enabled = false; } else { musicTrackOverride.track = val2; } } } } internal class LAIPatches { public static void Init() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown CharacterSelectController.OnEnable += new hook_OnEnable(CharacterSelectController_OnEnable); CharacterSelectController.OnDisable += new hook_OnDisable(CharacterSelectController_OnDisable); } private static void CharacterSelectController_OnEnable(orig_OnEnable orig, CharacterSelectController self) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown orig.Invoke(self); ShakeEmitter.ComputeTotalShakeAtPoint += new hook_ComputeTotalShakeAtPoint(ShakeEmitter_ComputeTotalShakeAtPoint); } private static Vector3 ShakeEmitter_ComputeTotalShakeAtPoint(orig_ComputeTotalShakeAtPoint orig, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) return orig.Invoke(position) * (Object.op_Implicit((Object)(object)LAIPlugin.CharacterSelectController) ? LAIPlugin.CharacterSelectController.localUser.userProfile.screenShakeScale : 1f); } private static void CharacterSelectController_OnDisable(orig_OnDisable orig, CharacterSelectController self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ShakeEmitter.ComputeTotalShakeAtPoint -= new hook_ComputeTotalShakeAtPoint(ShakeEmitter_ComputeTotalShakeAtPoint); orig.Invoke(self); } } [BepInDependency("com.bepis.r2api", "5.0.10")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.DestroyedClone.LobbyAppearanceImprovements", "LobbyAppearanceImprovements", "1.4.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class LAIPlugin : BaseUnityPlugin { [CompilerGenerated] private sealed class <CallInit>d__11 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LAIPlugin <>4__this; private Task <initTask>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CallInit>d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <initTask>5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <initTask>5__1 = LAIAssets.Init(); break; case 1: <>1__state = -1; break; } if (!<initTask>5__1.IsCompleted) { <>2__current = null; <>1__state = 1; return true; } if (<initTask>5__1.Exception != null) { Debug.LogError((object)("Exception in LAIAssets.Init: " + <initTask>5__1.Exception)); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string ModVer = "1.4.0"; public const string ModName = "LobbyAppearanceImprovements"; public const string ModGuid = "com.DestroyedClone.LobbyAppearanceImprovements"; public static Transform CharSelUITransform; public static Transform LAITitleRef; public static GameObject LAITextHolder; private static CharacterSelectController _characterSelectController; public static StringBuilder stringBuilder = new StringBuilder(); public static CharacterSelectController CharacterSelectController { get { if (!Object.op_Implicit((Object)(object)_characterSelectController)) { _characterSelectController = Object.FindObjectOfType<CharacterSelectController>(); } return _characterSelectController; } set { _characterSelectController = value; } } public void Awake() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown LAILogging.Init(((BaseUnityPlugin)this).Logger); ((MonoBehaviour)this).StartCoroutine(CallInit()); ConfigSetup.Initialize(((BaseUnityPlugin)this).Config); LAIMannequinManager.Init(); LAICameraManager.Init(); LAIMusicManager.Init(); LAIPatches.Init(); CharacterSelectController.Awake += new hook_Awake(CharacterSelectController_Awake); LAISceneManager.Initialize(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(AssemblySetup)); PreGameShakeController.Awake += new hook_Awake(PreGameShakeController_Awake); } [IteratorStateMachine(typeof(<CallInit>d__11))] private IEnumerator CallInit() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CallInit>d__11(0) { <>4__this = this }; } private void PreGameShakeController_Awake(orig_Awake orig, PreGameShakeController self) { InstanceTracker.Add<LAIPlugin>(this); ((Component)self).gameObject.SetActive(ConfigSetup.Lobby_Shaking.Value); orig.Invoke(self); } private void CacheSkyboxMaterial(Stage obj) { stringBuilder.AppendLine($"{obj.sceneDef.cachedName} - {RenderSettings.skybox} - {((Object)RenderSettings.skybox).name}"); Debug.Log((object)stringBuilder.ToString()); } private void CharacterSelectController_Awake(orig_Awake orig, CharacterSelectController self) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown orig.Invoke(self); if (!Object.op_Implicit((Object)(object)Run.instance) && SceneManager.sceneCount == 1) { CharacterSelectController = self; if (!Object.op_Implicit((Object)(object)((Component)self).gameObject.GetComponent<Methods.LAICameraController>())) { ((Component)self).gameObject.AddComponent<Methods.LAICameraController>(); } CharSelUITransform = ((Component)self).transform; if (!Object.op_Implicit((Object)(object)LAITextHolder)) { LAITextHolder = new GameObject("LAI_TextHolder"); } LAITextHolder.transform.parent = ((Component)self).transform.Find("SafeArea"); LAITextHolder.transform.localPosition = new Vector3(100f, 0f, 0f); LAITitleRef = self.activeSurvivorInfoPanel.transform.Find("SurvivorNamePanel/SurvivorName"); ValidateConfig(); Methods.LoadSceneAndLayout(ConfigSetup.Scene_Selection.Value, ConfigSetup.SIL_SelectedLayout.Value); HookMethods.Hook_UI_ShowFade(ConfigSetup.UI_ShowFade.Value); HookMethods.Hook_UI_BlurOpacity(ConfigSetup.UI_BlurOpacity.Value); HookMethods.Hook_UIScale(ConfigSetup.UI_Scale.Value); HookMethods.Hook_Overlay_Parallax(ConfigSetup.Parallax.Value); HookMethods.Hook_RescalePads(ConfigSetup.MannequinScale.Value); HookMethods.Hook_Rotate_Toggle(ConfigSetup.MannequinEnableLocalTurn.Value); HookMethods.Hook_Rotate_Speed(ConfigSetup.MannequinEnableLocalTurnMultiplier.Value); HookMethods.Hook_ToggleZooming(ConfigSetup.SIL_ZoomEnable.Value); HookMethods.Hook_Lobby_DisableShaking(ConfigSetup.Lobby_Shaking.Value); } } private void ValidateConfig() { if (!LAISceneManager.sceneNameList.Contains(ConfigSetup.Scene_Selection.Value)) { LAILogging.LogWarning($"Invalid scene name: {ConfigSetup.Scene_Selection.Value}, switching to {((ConfigEntryBase)ConfigSetup.Scene_Selection).DefaultValue}", ConfigSetup.LoggingStyle.UserShouldSee); ConfigSetup.Scene_Selection.Value = (string)((ConfigEntryBase)ConfigSetup.Scene_Selection).DefaultValue; } if (!LAILayoutManager.layoutNameList.Contains(ConfigSetup.SIL_SelectedLayout.Value)) { LAILogging.LogWarning($"Invalid layout name: {ConfigSetup.SIL_SelectedLayout.Value}, switching to {((ConfigEntryBase)ConfigSetup.SIL_SelectedLayout).DefaultValue}", ConfigSetup.LoggingStyle.UserShouldSee); ConfigSetup.SIL_SelectedLayout.Value = (string)((ConfigEntryBase)ConfigSetup.SIL_SelectedLayout).DefaultValue; } } public void AssemblySetup() { Type typeFromHandle = typeof(LAIScene); Type typeFromHandle2 = typeof(LAILayout); Type typeFromHandle3 = typeof(BaseMannequinLayout); Type[] types = Assembly.GetExecutingAssembly().GetTypes(); foreach (Type type in types) { if (type.IsAbstract) { continue; } if (typeFromHandle.IsAssignableFrom(type)) { LAIScene lAIScene = (LAIScene)Activator.CreateInstance(type); if (lAIScene.CanLoadScene()) { string text = type.Name.ToLower(); LAISceneManager.scenesDict[text] = type; LAISceneManager.scenesReverseDict[type] = ((Object)this).name; LAISceneManager.sceneNameList.Add(text); lAIScene.Init(); } } else if (typeFromHandle2.IsAssignableFrom(type)) { LAILayout lAILayout = (LAILayout)Activator.CreateInstance(type); if (lAILayout.CanLoadLayout()) { string text2 = type.Name.ToLower(); LAILayoutManager.layoutsDict[text2] = type; LAILayoutManager.layoutNameList.Add(text2); LAILogging.LogMessage("Initializing Scene: " + type, ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); lAILayout.Init(); } } } } } internal static class LAISceneManager { public class VoteStartedEventController : MonoBehaviour { public VoteController voteController; public float stopwatch; public float duration = 1f; public void Start() { voteController = ((Component)PreGameController.instance).GetComponent<VoteController>(); } public void FixedUpdate() { stopwatch -= Time.fixedDeltaTime; if (!(stopwatch > 0f)) { stopwatch = duration; if (!VoteHasStarted && voteController.NetworktimerIsActive) { onVoteStarted(chosenScene); } VoteHasStarted = voteController.NetworktimerIsActive; } } } public static LAIScene chosenScene = null; public static string chosenSceneAsString = "None"; public static Dictionary<string, Type> scenesDict = new Dictionary<string, Type>(); public static Dictionary<Type, string> scenesReverseDict = new Dictionary<Type, string>(); public static List<string> sceneNameList = new List<string>(); public static GameObject sceneInstance; public static GameObject TitleInstance; public static GameObject SubTitleInstance; public static GameObject LayoutTitleInstance; public static GameObject SeerTextInstance; public static Action<LAIScene> onVoteStarted; public static bool VoteHasStarted = false; public static void Initialize() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown SceneSetup.Init(); PreGameController.RefreshLobbyBackground += new hook_RefreshLobbyBackground(RemoveDefaultLobby); LAIScene.onSceneLoaded = (Action<LAIScene>)Delegate.Combine(LAIScene.onSceneLoaded, new Action<LAIScene>(CreateHeaderIfMissing)); LAIScene.onSceneLoaded = (Action<LAIScene>)Delegate.Combine(LAIScene.onSceneLoaded, new Action<LAIScene>(OnSceneLoaded)); LAILayout.onLayoutLoaded = (Action<LAILayout>)Delegate.Combine(LAILayout.onLayoutLoaded, new Action<LAILayout>(OnLayoutLoaded)); PreGameController.Start += new hook_Start(PreGameController_Start); LAIScene.onSceneLoaded = (Action<LAIScene>)Delegate.Combine(LAIScene.onSceneLoaded, new Action<LAIScene>(ActivateVoteStartEffectIfNewSceneLoaded)); LAIScene.onSceneUnloaded = (Action<LAIScene>)Delegate.Combine(LAIScene.onSceneUnloaded, new Action<LAIScene>(DestroySeerText)); } private static void DestroySeerText(LAIScene scene) { if (!Object.op_Implicit((Object)(object)SeerTextInstance)) { } } private static void CreateSeerTextOnLoad(LAIScene scene) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)SeerTextInstance)) { SeerTextInstance = Object.Instantiate<GameObject>(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)SeerTextInstance).name = "LobbyAppearanceImprovements_Seer_Text"; SeerTextInstance.transform.localPosition = new Vector3(0f, -480f, 0f); ((TMP_Text)SeerTextInstance.GetComponent<HGTextMeshProUGUI>()).fontSizeMin = 50f; } ((TMP_Text)SeerTextInstance.GetComponent<HGTextMeshProUGUI>()).text = Language.GetStringFormatted("LAI_MAP_LAYOUT_FORMAT", new object[1] { Language.GetString(chosenScene.SeerToken) }); HookMethods.Hook_ToggleSceneSeerVisibility(ConfigSetup.Scene_Seer.Value); } private static void ActivateVoteStartEffectIfNewSceneLoaded(LAIScene scene) { if (VoteHasStarted) { onVoteStarted(scene); } } private static void PreGameController_Start(orig_Start orig, PreGameController self) { orig.Invoke(self); VoteHasStarted = false; ((Component)self).gameObject.AddComponent<VoteStartedEventController>(); } private static void OnSceneLoaded(LAIScene scene) { HookMethods.Hook_MusicChoice(ConfigSetup.MusicChoice.Value); HookMethods.Hook_Lobby_DisableShaking(ConfigSetup.Lobby_Shaking.Value); RenderSettings.skybox = scene.SkyboxOverride; } private static void OnLayoutLoaded(LAILayout layout) { CreateOrUpdateHeaderText(); } private static void RemoveDefaultLobby(orig_RefreshLobbyBackground orig, PreGameController self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self.lobbyBackground)) { self.lobbyBackground.SetActive(false); } } private static void CreateHeaderIfMissing(LAIScene scene) { if (scene != null) { CreateOrUpdateHeaderText(); } } public static void CreateOrUpdateHeaderText() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)TitleInstance)) { TitleInstance = Object.Instantiate<GameObject>(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)TitleInstance).name = "LobbyAppearanceImprovements_Scene_Title"; TitleInstance.transform.localPosition = new Vector3(0f, 450f, 0f); ((TMP_Text)TitleInstance.GetComponent<HGTextMeshProUGUI>()).fontSizeMin = 80f; } ((TMP_Text)TitleInstance.GetComponent<HGTextMeshProUGUI>()).text = Language.GetString(chosenScene.SceneTitleToken); if (!Object.op_Implicit((Object)(object)SubTitleInstance)) { SubTitleInstance = Object.Instantiate<GameObject>(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)SubTitleInstance).name = "LobbyAppearanceImprovements_Scene_Subtitle"; SubTitleInstance.transform.localPosition = new Vector3(0f, 400f, 0f); ((TMP_Text)SubTitleInstance.GetComponent<HGTextMeshProUGUI>()).fontSizeMin = 50f; } ((TMP_Text)SubTitleInstance.GetComponent<HGTextMeshProUGUI>()).text = Language.GetStringFormatted("LAI_MAP_SUBTTILE_FORMAT", new object[1] { Language.GetString(chosenScene.SceneSubtitleToken) }); if (!Object.op_Implicit((Object)(object)LayoutTitleInstance)) { LayoutTitleInstance = Object.Instantiate<GameObject>(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)LayoutTitleInstance).name = "LobbyAppearanceImprovements_Layout_Title"; LayoutTitleInstance.transform.localPosition = new Vector3(0f, 360f, 0f); ((TMP_Text)LayoutTitleInstance.GetComponent<HGTextMeshProUGUI>()).fontSizeMin = 40f; } ((TMP_Text)LayoutTitleInstance.GetComponent<HGTextMeshProUGUI>()).text = Language.GetStringFormatted("LAI_MAP_LAYOUT_FORMAT", new object[1] { Language.GetString(LAILayoutManager.GetLayoutTitleToken()) }); HookMethods.Hook_ToggleSceneHeaderVisibility(ConfigSetup.Scene_Header.Value); CreateSeerTextOnLoad(chosenScene); } } public static class Methods { public class LAI_CharDisplayTracker : MonoBehaviour { public CharacterModel characterModel; public bool hasUnlocked = false; public void Awake() { InstanceTracker.Add<LAI_CharDisplayTracker>(this); } public void OnDestroy() { InstanceTracker.Remove<LAI_CharDisplayTracker>(this); } public void ToggleShadow(bool value) { if (Object.op_Implicit((Object)(object)characterModel)) { characterModel.isDoppelganger = value && !hasUnlocked; } } } public enum LoadSceneAndLayoutResult { NoSceneNoLayout, NoScene, NoLayout, Loaded } public class ClickToSelectCharacter : MonoBehaviour { private BoxCollider boxCollider; public SurvivorDef survivorDef; public Highlight highlight; public bool survivorUnlocked = false; public LocalUser localUser; private CharacterSelectController characterSelectController; private bool screenIsFocused = true; public void Start() { //IL_001c: 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_0074: Unknown result type (might be due to invalid IL or missing references) characterSelectController = GameObject.Find("CharacterSelectUI").GetComponent<CharacterSelectController>(); localUser = ((MPEventSystem)EventSystem.current).localUser; if (Object.op_Implicit((Object)(object)survivorDef)) { survivorUnlocked = SurvivorCatalog.SurvivorIsUnlockedOnThisClient(survivorDef.survivorIndex); highlight = ((Component)this).gameObject.AddComponent<Highlight>(); highlight.highlightColor = (HighlightColor)((!survivorUnlocked) ? 4 : 0); highlight.isOn = false; highlight.targetRenderer = (Renderer)(object)GetTargetRenderer(survivorDef.cachedName); } else { LAILogging.LogWarning("ClickToSelectCharacter :: No SurvivorDef found for " + ((Object)((Component)this).gameObject).name, ConfigSetup.LoggingStyle.UserShouldSee); } SetupBoxColliderOld(); } public void SetupBoxCollider() { //IL_001f: 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_0027: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) boxCollider = ((Component)this).gameObject.AddComponent<BoxCollider>(); Renderer targetRenderer = highlight.targetRenderer; Bounds bounds = targetRenderer.bounds; Vector3 size = ((Bounds)(ref bounds)).size; Vector3 center = ((Bounds)(ref bounds)).center; boxCollider.size = size; boxCollider.center = center; } public void SetupBoxColliderOld() { //IL_001f: 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_0027: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0046: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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) //IL_006c: Unknown result type (might be due to invalid IL or missing references) boxCollider = ((Component)this).gameObject.AddComponent<BoxCollider>(); Renderer targetRenderer = highlight.targetRenderer; Bounds bounds = targetRenderer.bounds; Vector3 size = ((Bounds)(ref bounds)).size; Vector3 center = ((Bounds)(ref bounds)).center; size = ((Component)boxCollider).transform.InverseTransformVector(size); center = ((Component)boxCollider).transform.InverseTransformPoint(center); boxCollider.size = size; boxCollider.center = center; } public SkinnedMeshRenderer GetTargetRenderer(string cachedName) { LAILogging.LogMessage("ClickToSelectCharacter.GetTargetRenderer :: Checking cached name " + cachedName + ".", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); string text = ""; switch (cachedName) { case "Commando": text = "mdlCommandoDualies/CommandoMesh"; break; case "Huntress": text = "mdlHuntress (1)/HuntressMesh"; break; case "Engi": case "Mage": case "Merc": case "Croco": text = "mdl" + cachedName + "/" + cachedName + "Mesh"; break; case "Toolbot": text = "Base/mdlToolbot/ToolbotMesh"; break; case "Treebot": text = ""; break; case "Enforcer": text = "meshEnforcer"; break; case "Nemforcer": text = "Nemforcer"; break; case "SniperClassic": text = "SniperMesh"; break; case "HAND": case "HAN-D": text = "HAN-DMesh"; break; case "Miner": text = "MinerDisplay/MinerBody"; break; case "RobPaladin": text = "meshPaladin"; break; case "CHEF": case "Chef": text = "Chef"; break; } Transform val = ((Component)this).gameObject.transform.Find(text); return (text != "" && Object.op_Implicit((Object)(object)val)) ? ((Component)val).GetComponent<SkinnedMeshRenderer>() : null; } public SkinnedMeshRenderer GetTargetRendererFallback() { Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>(); string value = Language.GetString(survivorDef.displayNameToken).ToLower(); Transform[] array = componentsInChildren; foreach (Transform val in array) { string text = ((Object)val).name.ToLower(); if (text.Contains(value) && text.Contains("mesh")) { SkinnedMeshRenderer component = ((Component)val).gameObject.GetComponent<SkinnedMeshRenderer>(); if (Object.op_Implicit((Object)(object)component)) { return component; } } } return null; } public void OnMouseOver() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (screenIsFocused && Input.GetKey((KeyCode)323) && survivorUnlocked) { LocalUserManager.GetFirstLocalUser().userProfile.SetSurvivorPreference(survivorDef); characterSelectController.SetSurvivorInfoPanelActive(true); if (Object.op_Implicit((Object)(object)localUser.currentNetworkUser)) { localUser.currentNetworkUser.CallCmdSetBodyPreference(BodyCatalog.FindBodyIndex(survivorDef.bodyPrefab)); } } } public void OnApplicationFocus(bool hasFocus) { screenIsFocused = hasFocus; } public void OnMouseEnter() { if (Object.op_Implicit((Object)(object)highlight)) { highlight.isOn = true; } } public void OnMouseExit() { if (Object.op_Implicit((Object)(object)highlight)) { highlight.isOn = false; } } } public class LAICameraController : MonoBehaviour { public static LAICameraController instance; public GameObject sceneCamera; public static readonly Vector3 _defaultCameraPosition = new Vector3(0f, 1.24f, 0f); public readonly Quaternion DefaultCameraRotation = Quaternion.identity; private Vector3 desiredPosition; private Vector3 _desiredCenterPosition; private Vector3 lastDesiredCenterPosition; public Quaternion desiredRotation; private Vector3 dampPositionVelocity; private Quaternion dampRotationVelocity; private readonly float screenLimitDistance = 0.25f; private readonly float forwardLimit = 5f; private readonly float forwardMult = 0.25f; public Vector3 rotate_initialPosition; public Vector3 rotate_currentPosition; public float rotate_multiplier = 2f; public Vector3 rotate_defaultRotationChar; private bool screenIsFocused = true; private Vector3 MousePosition; private bool mouse0Click = false; public CharacterSelectController characterSelectController; public SurvivorMannequinDioramaController survivorMannequinDioramaController = null; public static bool isFreeCam = false; public float freeCamMultiplier = 1f; public Vector3 DefaultCameraPosition { get { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_003d: Unknown result type (might be due to invalid IL or missing references) if (LAISceneManager.chosenScene != null && LAISceneManager.chosenScene.cameraPosition != default(Vector3)) { return LAISceneManager.chosenScene.cameraPosition; } return _defaultCameraPosition; } } public Vector3 DesiredCenterPosition { get { //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_000a: Unknown result type (might be due to invalid IL or missing references) return _desiredCenterPosition; } set { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) lastDesiredCenterPosition = DesiredCenterPosition; _desiredCenterPosition = value; } } public SurvivorMannequinSlotController[] survivorMannequinSlotControllers { get; set; } public void Awake() { //IL_0092: 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_009e: 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_00b7: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)instance)) { instance = this; } else { LAILogging.LogWarning("Two instances of LAICameraController were spawned?", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); } sceneCamera = GameObject.Find("Main Camera/Scene Camera"); if (!Object.op_Implicit((Object)(object)characterSelectController)) { characterSelectController = Object.FindObjectOfType<CharacterSelectController>(); survivorMannequinDioramaController = Object.FindObjectOfType<SurvivorMannequinDioramaController>(); survivorMannequinSlotControllers = survivorMannequinDioramaController.mannequinSlots; rotate_defaultRotationChar = new Vector3(0f, 219.0844f, 0f); } lastDesiredCenterPosition = DefaultCameraPosition; DesiredCenterPosition = DefaultCameraPosition; desiredPosition = DefaultCameraPosition; desiredRotation = DefaultCameraRotation; if ((Object)(object)LAICameraManager.CurrentCameraController != (Object)null && (Object)(object)LAICameraManager.CurrentCameraController != (Object)(object)this) { LAILogging.LogWarning("Somehow there are two camera parallaxes?", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); } LAICameraManager.CurrentCameraController = this; } public void AdjustRotateSpeed(float speed) { rotate_multiplier = speed; } public void OnDestroy() { LAICameraManager.CurrentCameraController = null; } public void Update() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_008e: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if (screenIsFocused) { if (isFreeCam) { FreeCamPostion(); } else { MousePosition = Input.mousePosition; if (ConfigSetup.Parallax.Value) { desiredPosition = GetDesiredPositionFromScreenFraction(); } else { desiredPosition = DesiredCenterPosition; } if (ConfigSetup.MannequinEnableLocalTurn.Value) { RotateCamera(); } if (Input.GetKeyDown(ConfigSetup.SIL_ResetCameraKey.Value)) { if (DesiredCenterPosition == DefaultCameraPosition) { HookMethods.SetCameraFromSurvivor(LocalUserManager.GetFirstLocalUser().userProfile.GetSurvivorPreference().survivorIndex); } else { SetCamera(); } } } } DampPosition(); DampRotation(); } private void DampRotation() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) sceneCamera.transform.rotation = QuaternionUtil.SmoothDamp(sceneCamera.transform.rotation, desiredRotation, ref dampRotationVelocity, 0.4f); } public void FreeCamPostion() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0048: 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_0068: 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_0095: 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_009f: 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_00cb: 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_00ee: 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_010d: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)273)) { desiredPosition += new Vector3(0f, 0f, freeCamMultiplier); } if (Input.GetKeyDown((KeyCode)274)) { desiredPosition += new Vector3(0f, 0f, 0f - freeCamMultiplier); } if (Input.GetKeyDown((KeyCode)276)) { desiredPosition += new Vector3(0f - freeCamMultiplier, 0f, 0f); } if (Input.GetKeyDown((KeyCode)275)) { desiredPosition += new Vector3(freeCamMultiplier, 0f, 0f); } if (Input.GetKeyDown((KeyCode)304)) { desiredPosition += new Vector3(0f, freeCamMultiplier, 0f); } if (Input.GetKeyDown((KeyCode)306)) { desiredPosition += new Vector3(0f, 0f - freeCamMultiplier, 0f); } if (Input.GetKeyDown((KeyCode)32)) { desiredPosition = DefaultCameraPosition; } if (Input.GetKeyDown((KeyCode)112)) { LAILogging.LogMessage($"position = new Vector3({desiredPosition.x}f, {desiredPosition.y}f, {desiredPosition.z}f)", ConfigSetup.LoggingStyle.None); } } public void RotateCamera(bool reset = false) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00f0: 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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) if (reset) { rotate_initialPosition = DefaultCameraPosition; rotate_currentPosition = DefaultCameraPosition; if (survivorMannequinSlotControllers == null) { LAILogging.LogError("survivorMannequinSlotControllers is missing!", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return; } if ((Object)(object)survivorMannequinSlotControllers[0] == (Object)null) { LAILogging.LogError("survivorMannequinSlotControllers[0] is missing!", ConfigSetup.LoggingStyle.UserShouldSee); return; } if ((Object)(object)survivorMannequinSlotControllers[0].mannequinInstanceTransform == (Object)null) { LAILogging.LogError("survivorMannequinSlotControllers[0].mannequinInstanceTransform is missing!", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return; } survivorMannequinSlotControllers[0].mannequinInstanceTransform.eulerAngles = rotate_initialPosition; } if (Input.GetMouseButtonDown(0)) { rotate_initialPosition = MousePosition; } if (Input.GetMouseButton(0)) { rotate_currentPosition = MousePosition; } if (Input.GetMouseButtonUp(0)) { rotate_initialPosition = DefaultCameraPosition; rotate_currentPosition = DefaultCameraPosition; survivorMannequinSlotControllers[0].mannequinInstanceTransform.eulerAngles = rotate_defaultRotationChar; } if (survivorMannequinSlotControllers != null && (Object)(object)survivorMannequinSlotControllers[0] != (Object)null && Object.op_Implicit((Object)(object)survivorMannequinSlotControllers[0].mannequinInstanceTransform)) { float num = rotate_initialPosition.x - rotate_currentPosition.x; float num2 = num * rotate_multiplier; survivorMannequinSlotControllers[0].mannequinInstanceTransform.eulerAngles = rotate_defaultRotationChar + num2 * Vector3.up; } } private void OnApplicationFocus(bool hasFocus) { screenIsFocused = hasFocus; } public void DampPosition() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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) sceneCamera.transform.position = Vector3.SmoothDamp(sceneCamera.transform.position, desiredPosition, ref dampPositionVelocity, 0.4f, float.PositiveInfinity, Time.deltaTime); } public Vector3 GetDesiredPositionFromScreenFraction(bool reset = false) { //IL_0021: 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_0070: 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_00a1: 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_00c8: 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_00f1: 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_010d: 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) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) if (reset) { return Vector3.one * 0.5f; } Vector3 result = default(Vector3); float num = ((float)Screen.width - MousePosition.x) / (float)Screen.width; float num2 = ((float)Screen.height - MousePosition.y) / (float)Screen.height; result.x = Mathf.Lerp(DesiredCenterPosition.x + screenLimitDistance, DesiredCenterPosition.x - screenLimitDistance, num); result.y = Mathf.Lerp(DesiredCenterPosition.y + screenLimitDistance, DesiredCenterPosition.y - screenLimitDistance, num2); float num3 = DesiredCenterPosition.z + Input.mouseScrollDelta.y * forwardMult; result.z = Mathf.Clamp(num3, DesiredCenterPosition.z - forwardLimit, DesiredCenterPosition.z + forwardLimit); return result; } public void OnDisable() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) desiredPosition = DefaultCameraPosition; } } public class DelaySetupMeshCollider : MonoBehaviour { public float delayInSeconds; public MeshCollider meshCollider; public Mesh meshToBind; private float stopwatch = 0f; public void Update() { stopwatch += Time.deltaTime; if (stopwatch >= delayInSeconds) { meshCollider.sharedMesh = meshToBind; ((Behaviour)this).enabled = false; } } } public static void SetCamera(CameraRigController cameraRig, LAILayout.CameraSetting cameraSetting) { //IL_000b: 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) SetCamera(cameraRig, cameraSetting.fov, cameraSetting.position, cameraSetting.rotation); } public static void SetCamera(CameraRigController cameraRig = null, float fov = 60f, Vector3 position = default(Vector3), Vector3 rotation = default(Vector3)) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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_00aa: 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_00b7: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: 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_00e1: 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_00ce: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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_00fd: 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_0132: 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_013b: 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) if (!Object.op_Implicit((Object)(object)cameraRig)) { cameraRig = LAICameraManager.MainCameraRigController; } float num = 0f; if (fov != 60f) { float num2 = 5f; float num3 = fov - num2; float num4 = fov + num2; float num5 = 3f; if (num3 <= cameraRig.baseFov && cameraRig.baseFov <= num4) { num = Random.Range(0f - num5, num5); } } cameraRig.baseFov = fov + num; LAICameraController currentCameraController = LAICameraManager.CurrentCameraController; Vector3 val = currentCameraController.DefaultCameraPosition; Quaternion val2 = currentCameraController.DefaultCameraRotation; if (LAISceneManager.chosenScene != null) { if (LAISceneManager.chosenScene.cameraPosition != default(Vector3)) { val = LAISceneManager.chosenScene.cameraPosition; } if (LAISceneManager.chosenScene.cameraRotation != default(Vector3)) { val2 = Quaternion.Euler(LAISceneManager.chosenScene.cameraRotation); } } Vector3 desiredCenterPosition = ((position == default(Vector3)) ? val : position); currentCameraController.DesiredCenterPosition = desiredCenterPosition; Quaternion desiredRotation = ((rotation == default(Vector3)) ? val2 : Quaternion.Euler(rotation)); currentCameraController.desiredRotation = desiredRotation; } public static GameObject CreateDisplay(string bodyPrefabName, Vector3 position, Vector3 rotation, Transform parent = null, bool addCollider = false) { //IL_008c: 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_008e: Unknown result type (might be due to invalid IL or missing references) bool strict = false; if (bodyPrefabName.StartsWith("!")) { strict = true; bodyPrefabName = bodyPrefabName.Substring(1); } GameObject bodyPrefab = GetBodyPrefab(bodyPrefabName, strict); if (!Object.op_Implicit((Object)(object)bodyPrefab)) { LAILogging.LogMessage("CreateDisplay :: Aborted, no body prefab found for " + bodyPrefabName, ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return null; } SurvivorDef val = SurvivorCatalog.FindSurvivorDefFromBody(bodyPrefab); if (!Object.op_Implicit((Object)(object)val)) { LAILogging.LogMessage("CreateDisplay :: Aborted, no SurvivorDef found for " + bodyPrefabName, ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return null; } GameObject displayPrefab = val.displayPrefab; GameObject val2 = Object.Instantiate<GameObject>(displayPrefab, position, Quaternion.Euler(rotation), parent); LAI_CharDisplayTracker lAI_CharDisplayTracker = val2.AddComponent<LAI_CharDisplayTracker>(); if (addCollider && ConfigSetup.SIL_ClickOnCharacterToSwap.Value) { CapsuleCollider val3 = val2.AddComponent<CapsuleCollider>(); val3.radius = 1f; ClickToSelectCharacter clickToSelectCharacter = val2.AddComponent<ClickToSelectCharacter>(); clickToSelectCharacter.survivorDef = val; } bool hasUnlocked = LocalUserManager.GetFirstLocalUser().userProfile.HasUnlockable(val.unlockableDef); lAI_CharDisplayTracker.hasUnlocked = hasUnlocked; CharacterModel[] componentsInChildren = ((Component)val2.transform).GetComponentsInChildren<CharacterModel>(); if (componentsInChildren.Length != 0) { lAI_CharDisplayTracker.characterModel = componentsInChildren[0]; lAI_CharDisplayTracker.ToggleShadow(ConfigSetup.SIL_LockedCharactersBlack.Value); } switch (bodyPrefabName) { case "Croco": ((Component)((Component)((Component)val2.transform.Find("mdlCroco")).transform.Find("Spawn")).transform.Find("FloorMesh")).gameObject.SetActive(false); break; case "Treebot": ((Behaviour)((Component)val2.transform.Find("ModelBase/mdlTreebot")).gameObject.GetComponent<CharacterModel>()).enabled = false; break; case "Toolbot": ((Behaviour)((Component)val2.transform.Find("Base/mdlToolbot")).gameObject.GetComponent<CharacterModel>()).enabled = false; break; case "HANDOverclocked": { Transform val4 = LAISceneManager.sceneInstance.transform.Find("HANDTeaser"); if (Object.op_Implicit((Object)(object)val4)) { ((Component)val4).gameObject.SetActive(false); } break; } case "RobPaladin": if (Chainloader.PluginInfos.ContainsKey("com.rob.Paladin")) { SetupPaladinDisplay(val2); } break; case "Chef": ((Behaviour)((Component)val2.transform.Find("mdlChef")).gameObject.GetComponent<CharacterModel>()).enabled = false; break; } LAILayout.LAI_CharacterDisplay lAI_CharacterDisplay = val2.AddComponent<LAILayout.LAI_CharacterDisplay>(); lAI_CharacterDisplay.bodyName = bodyPrefabName; lAI_CharacterDisplay.survivorDef = val; return val2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetupPaladinDisplay(GameObject gameObject) { MenuSound val = default(MenuSound); if (gameObject.TryGetComponent<MenuSound>(ref val)) { Object.Destroy((Object)(object)gameObject.GetComponent<MenuSound>()); } } public static GameObject GetBodyPrefab(string bodyPrefabName, bool strict = false) { if (!strict) { bodyPrefabName += "Body"; } GameObject val = BodyCatalog.FindBodyPrefab(bodyPrefabName); if (!Object.op_Implicit((Object)(object)val)) { return null; } return val; } public static void SelectScene(string sceneName) { string text = sceneName.ToLower(); if (!LAISceneManager.scenesDict.TryGetValue(text, out var value)) { LAILogging.LogWarning("SelectScene :: " + sceneName + " (parsed as '" + text + ")' not found!", ConfigSetup.LoggingStyle.UserShouldSee); return; } if (Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance)) { LAISceneManager.chosenScene.OnDestroy(); Object.Destroy((Object)(object)LAISceneManager.sceneInstance); } if (Object.op_Implicit((Object)(object)PreGameController.instance) && Object.op_Implicit((Object)(object)PreGameController.instance.lobbyBackground)) { PreGameController.instance.lobbyBackground.SetActive(false); } LAIScene lAIScene = (LAISceneManager.chosenScene = (LAIScene)Activator.CreateInstance(value)); LAISceneManager.chosenSceneAsString = text; lAIScene.CreateScene(selectScene: true); ConfigSetup.Scene_Selection.Value = text; } public static void SelectLayout(string layoutName, bool saveChanges = true) { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_00e6: Unknown result type (might be due to invalid IL or missing references) string text = layoutName.ToLower(); if (!LAILayoutManager.layoutsDict.TryGetValue(text, out var value)) { LAILogging.LogWarning("SelectLayout :: " + layoutName + " '(parsed as " + text + ")' not found!", ConfigSetup.LoggingStyle.UserShouldSee); return; } if (Object.op_Implicit((Object)(object)LAILayoutManager.layoutInstance)) { if (ConfigSetup.SIL_SelectedLayout.Value.ToLower() == text) { return; } LAILayoutManager.chosenLayout.OnDestroy(); Object.Destroy((Object)(object)LAILayoutManager.layoutInstance); } LAILayoutManager.layoutInstance = (LAILayoutManager.chosenLayout = (LAILayout)Activator.CreateInstance(value)).CreateLayout(); if (saveChanges) { ConfigSetup.SIL_SelectedLayout.Value = text; } SetCamera(); } public static string GetDefaultLayoutNameForScene(string sceneName) { using (Dictionary<string, Type>.Enumerator enumerator = LAILayoutManager.layoutsDict.GetEnumerator()) { if (enumerator.MoveNext()) { KeyValuePair<string, Type> current = enumerator.Current; if (current.Key.ToLower().Contains(sceneName.ToLower()) && current.Key.ToLower().Contains("default")) { return current.Key; } return "Any_Empty"; } } return null; } public static LoadSceneAndLayoutResult LoadSceneAndLayout(string sceneName, string layoutName = null, bool saveChanges = true) { bool resultScene = false; bool flag = false; if (sceneName != null) { if (!LAISceneManager.scenesDict.ContainsKey(sceneName)) { LAILogging.LogWarning("LoadSceneAndLayout :: Could not find scene \"" + sceneName + "\"!", ConfigSetup.LoggingStyle.UserShouldSee); } else { SelectScene(sceneName); resultScene = true; } } if (Utility.IsNullOrWhiteSpace(layoutName)) { layoutName = ((LAISceneManager.chosenScene.PreferredLayout != null) ? LAISceneManager.chosenScene.PreferredLayout : "Any_Empty"); } SelectLayout(layoutName, saveChanges); flag = true; return UnderstandConceptOfLove(resultScene, flag); } public static LoadSceneAndLayoutResult UnderstandConceptOfLove(bool resultScene, bool resultLayout) { if (resultScene && resultLayout) { return LoadSceneAndLayoutResult.Loaded; } if (resultScene && !resultLayout) { return LoadSceneAndLayoutResult.NoLayout; } if (!resultScene && resultLayout) { return LoadSceneAndLayoutResult.NoScene; } return LoadSceneAndLayoutResult.NoSceneNoLayout; } } public static class SceneMethods { public static List<string> GetScenes() { return LAISceneManager.sceneNameList; } } public static class HookMethods { public static void Hook_MusicChoice(string value) { ConfigSetup.MusicChoice.Value = value; LAIMusicManager.OnSceneLoaded(); } public static void Hook_UI_ShowFade(bool value) { ConfigSetup.UI_ShowFade.Value = value; ((Component)LAIPlugin.CharSelUITransform.Find("BottomSideFade")).gameObject.SetActive(value); ((Component)LAIPlugin.CharSelUITransform.Find("TopSideFade")).gameObject.SetActive(value); } public static void Hook_Lobby_DisableShaking(bool value) { ConfigSetup.Lobby_Shaking.Value = value; List<PreGameShakeController> instancesList = InstanceTracker.GetInstancesList<PreGameShakeController>(); if (instancesList.Count > 0 && Object.op_Implicit((Object)(object)instancesList[0])) { ((Component)instancesList[0]).gameObject.SetActive(ConfigSetup.Lobby_Shaking.Value); } foreach (LAIScene.ShakingMarker instances in InstanceTracker.GetInstancesList<LAIScene.ShakingMarker>()) { foreach (GameObject shakingObject in instances.shakingObjects) { shakingObject.SetActive(value); } foreach (ShakeEmitter shakeEmitter in instances.shakeEmitters) { ((Behaviour)shakeEmitter).enabled = value; } } } public static void Hook_UI_BlurOpacity(int value) { //IL_007a: 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_0092: 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_00c9: 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_00e1: 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_0110: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp((float)value, 0f, 100f); ConfigSetup.UI_BlurOpacity.Value = Mathf.CeilToInt(num); Transform transform = ((Component)LAIPlugin.CharSelUITransform.Find("SafeArea")).transform; Transform val = transform.Find("LeftHandPanel (Layer: