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 sceneNames = new List(); 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(); ((Behaviour)this).enabled = false; Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class LAI_LayoutCycler : MonoBehaviour { public List layoutNames = new List(); 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((object)argString).WaitForCompletion(); GameObject val2 = Object.Instantiate(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(SceneSetup.ContactLight_RestraintBar, Survivors.Commando.displayPrefab.transform); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void CMD_ListScene(ConCommandArgs args) { foreach (KeyValuePair 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 item in LAILayoutManager.layoutsDict) { LAILayout lAILayout = (LAILayout)Activator.CreateInstance(item.Value); if (lAILayout.SceneName == argString) { Debug.Log((object)item.Key); } } return; } } foreach (KeyValuePair 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 tempSelectSceneAction; public static Action tempSelectLayoutAction; public static ConfigEntry UI_ShowFade { get; set; } public static ConfigEntry UI_BlurOpacity { get; set; } public static ConfigEntry UI_Scale { get; set; } public static ConfigEntry MusicChoice { get; set; } public static ConfigEntry PostProcessing { get; set; } public static ConfigEntry Parallax { get; set; } public static ConfigEntry Light_Color { get; set; } public static ConfigEntry Light_Flicker { get; set; } public static ConfigEntry Light_Intensity { get; set; } public static ConfigEntry MannequinScale { get; set; } public static ConfigEntry MannequinEnableLocalTurn { get; set; } public static ConfigEntry MannequinEnableLocalTurnMultiplier { get; set; } public static ConfigEntry MeshProps { get; set; } public static ConfigEntry PhysicsProps { get; set; } public static ConfigEntry Lobby_Shaking { get; set; } public static ConfigEntry Scene_Selection { get; set; } public static ConfigEntry Scene_Header { get; set; } public static ConfigEntry Scene_Seer { get; set; } public static ConfigEntry SIL_LockedCharactersBlack { get; set; } public static ConfigEntry SIL_SelectedLayout { get; set; } public static ConfigEntry SIL_ZoomEnable { get; set; } public static ConfigEntry SIL_ResetCameraKey { get; set; } public static ConfigEntry SIL_ClickOnCharacterToSwap { get; set; } public static ConfigEntry 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(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(text, "Show Fade", true, "Toggle: Dark fade bars at the top and bottom of the lobby."); UI_BlurOpacity = config.Bind(text, "Blur Opacity", 100, "Adjust: Blur opacity behind the UI.\n0:fully transparent - 100:default"); UI_Scale = config.Bind(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(text, "Post Processing", true, "Toggle: Post processing."); Parallax = config.Bind(text, "Parallax", true, "Toggle: Parallax effect on the camera controlled by the position of the cursor."); text = "Lights"; Light_Color = config.Bind(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(text, "Flickering", true, "Toggle: Flickering of the Light."); Light_Intensity = config.Bind(text, "Intensity", 0.4873f, "Adjust: Change the intensity of the light."); text = "Character Display"; MannequinScale = config.Bind(text, "Character Display Scale", 1f, "Adjust: Resizes character displays."); MannequinEnableLocalTurn = config.Bind(text, "Character Rotate", true, "Toggle: Click and drag to rotate your character in the lobby."); MannequinEnableLocalTurnMultiplier = config.Bind(text, "Character Rotate Speed", 2f, "Adjust: Sets the speed of character rotation."); text = "Background"; MeshProps = config.Bind(text, "LobbyScene: Show Static MeshProps", false, "Toggle: all the stationary meshprops."); PhysicsProps = config.Bind(text, "LobbyScene: Show Physics Props", false, "Toggle: all the physics props like the Chair."); Lobby_Shaking = config.Bind(text, "LobbyScene: Shaking", false, "Toggle: whether the physics objects are shaken periodically"); Scene_Selection = config.Bind(text, "Select Scene", "lobby", "Adjust: Sets the current scene of the lobby."); Scene_Header = config.Bind(text, "Scene Header", true, "Toggle: Shows the scene's title and subtitle."); Scene_Seer = config.Bind(text, "Scene Seer", true, "Toggle: Shows the stage's seer text at the bottom."); SIL_LockedCharactersBlack = config.Bind(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(text, "Character Layout Name", "any_empty", "Adjust: Shows background elements in certain orientations. Set to Any_Empty to disable."); SIL_ZoomEnable = config.Bind(text, "Zoom On Character Select", true, "Toggle: Selecting a character will zoom the camera onto that character."); SIL_ResetCameraKey = config.Bind(text, "Reset Camera", (KeyCode)61, "Adjust: Sets keybind for resetting the "); SIL_ClickOnCharacterToSwap = config.Bind(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("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)Delegate.Combine(tempSelectSceneAction, new Action(SetNewScene)); tempSelectLayoutAction = (Action)Delegate.Combine(tempSelectLayoutAction, new Action(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)new StringConfigField(((ConfigEntryBase)MusicChoice).Definition.Key, ((ConfigEntryBase)MusicChoice).Description.Description, (Func)(() => MusicChoice.Value), (Action)null, (Action)HookMethods.Hook_MusicChoice) }; inLobbyConfigEntry.SectionFields["UI"] = new List { (IConfigField)new BooleanConfigField(((ConfigEntryBase)UI_ShowFade).Definition.Key, ((ConfigEntryBase)UI_ShowFade).Description.Description, (Func)(() => UI_ShowFade.Value), (Action)HookMethods.Hook_UI_ShowFade), (IConfigField)new IntConfigField(((ConfigEntryBase)UI_BlurOpacity).Definition.Key, (Func)(() => UI_BlurOpacity.Value), (Action)HookMethods.Hook_UI_BlurOpacity, (Action)null, (int?)0, (int?)100), (IConfigField)new FloatConfigField(((ConfigEntryBase)UI_Scale).Definition.Key, (Func)(() => UI_Scale.Value), (Action)null, (Action)HookMethods.Hook_UIScale, (float?)UI_Scale_Min, (float?)UI_Scale_Max) }; inLobbyConfigEntry.SectionFields["Overlay"] = new List { (IConfigField)new BooleanConfigField(((ConfigEntryBase)PostProcessing).Definition.Key, ((ConfigEntryBase)PostProcessing).Description.Description, (Func)(() => PostProcessing.Value), (Action)HookMethods.Hook_Overlay_ShowPostProcessing), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Parallax).Definition.Key, ((ConfigEntryBase)Parallax).Description.Description, (Func)(() => Parallax.Value), (Action)HookMethods.Hook_Overlay_Parallax) }; inLobbyConfigEntry.SectionFields["Lights"] = new List { (IConfigField)new ColorConfigField(((ConfigEntryBase)Light_Color).Definition.Key, ((ConfigEntryBase)Light_Color).Description.Description, (Func)(() => Light_Color.Value), (Action)HookMethods.Hook_LightUpdate_Color, (Action)null, false), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Light_Flicker).Definition.Key, ((ConfigEntryBase)Light_Flicker).Description.Description, (Func)(() => Light_Flicker.Value), (Action)HookMethods.Hook_LightUpdate_Flicker), (IConfigField)new FloatConfigField(((ConfigEntryBase)Light_Intensity).Definition.Key, ((ConfigEntryBase)Light_Intensity).Description.Description, (Func)(() => Light_Intensity.Value), (Action)HookMethods.Hook_LightUpdate_Intensity, (Action)null, (float?)null, (float?)null) }; inLobbyConfigEntry.SectionFields["Mannequins"] = new List { (IConfigField)new FloatConfigField(((ConfigEntryBase)MannequinScale).Definition.Key, ((ConfigEntryBase)MannequinScale).Description.Description, (Func)(() => MannequinScale.Value), (Action)HookMethods.Hook_RescalePads, (Action)null, (float?)null, (float?)null), (IConfigField)new BooleanConfigField(((ConfigEntryBase)MannequinEnableLocalTurn).Definition.Key, ((ConfigEntryBase)MannequinEnableLocalTurn).Description.Description, (Func)(() => MannequinEnableLocalTurn.Value), (Action)HookMethods.Hook_Rotate_Toggle), (IConfigField)new FloatConfigField(((ConfigEntryBase)MannequinEnableLocalTurnMultiplier).Definition.Key, ((ConfigEntryBase)MannequinEnableLocalTurnMultiplier).Description.Description, (Func)(() => MannequinEnableLocalTurnMultiplier.Value), (Action)HookMethods.Hook_Rotate_Speed, (Action)null, (float?)null, (float?)null) }; inLobbyConfigEntry.SectionFields["Scenes+Layouts"] = new List { (IConfigField)new BooleanConfigField(((ConfigEntryBase)Scene_Header).Definition.Key, ((ConfigEntryBase)Scene_Header).Description.Description, (Func)(() => Scene_Header.Value), (Action)HookMethods.Hook_ToggleSceneHeaderVisibility), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Scene_Seer).Definition.Key, ((ConfigEntryBase)Scene_Seer).Description.Description, (Func)(() => Scene_Seer.Value), (Action)HookMethods.Hook_ToggleSceneSeerVisibility), (IConfigField)new StringConfigField(((ConfigEntryBase)Scene_Selection).Definition.Key, ((ConfigEntryBase)Scene_Selection).Description.Description, (Func)(() => Scene_Selection.Value), (Action)null, tempSelectSceneAction), (IConfigField)new StringConfigField(((ConfigEntryBase)SIL_SelectedLayout).Definition.Key, ((ConfigEntryBase)SIL_SelectedLayout).Description.Description, (Func)(() => SIL_SelectedLayout.Value), (Action)null, tempSelectLayoutAction), (IConfigField)new BooleanConfigField("Confirm Choice", "Click to confirm choice for scene.", (Func)(() => tempConfirmChoice), (Action)SetSceneLayoutFromLobby), (IConfigField)new BooleanConfigField(((ConfigEntryBase)SIL_ZoomEnable).Definition.Key, ((ConfigEntryBase)SIL_ZoomEnable).Description.Description, (Func)(() => SIL_ZoomEnable.Value), (Action)HookMethods.Hook_ToggleZooming), (IConfigField)(object)new EnumConfigField(((ConfigEntryBase)SIL_ResetCameraKey).Definition.Key, ((ConfigEntryBase)SIL_ResetCameraKey).Description.Description, (Func)(() => SIL_ResetCameraKey.Value), (Action)null), (IConfigField)new BooleanConfigField(((ConfigEntryBase)SIL_LockedCharactersBlack).Definition.Key, ((ConfigEntryBase)SIL_LockedCharactersBlack).Description.Description, (Func)(() => SIL_LockedCharactersBlack.Value), (Action)HookMethods.Hook_BlackenSurvivors) }; inLobbyConfigEntry.SectionFields["Scene: Lobby"] = new List { (IConfigField)new BooleanConfigField(((ConfigEntryBase)MeshProps).Definition.Key, ((ConfigEntryBase)MeshProps).Description.Description, (Func)(() => MeshProps.Value), (Action)HookMethods.Hook_Lobby_HideProps), (IConfigField)new BooleanConfigField(((ConfigEntryBase)PhysicsProps).Definition.Key, ((ConfigEntryBase)PhysicsProps).Description.Description, (Func)(() => PhysicsProps.Value), (Action)HookMethods.Hook_Lobby_HidePhysicsProps), (IConfigField)new BooleanConfigField(((ConfigEntryBase)Lobby_Shaking).Definition.Key, ((ConfigEntryBase)Lobby_Shaking).Description.Description, (Func)(() => Lobby_Shaking.Value), (Action)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 task1 = Addressables.LoadAssetAsync((object)"RoR2/Base/UI/CreditsPanel/HGCreditNameLabel.prefab"); AsyncOperationHandle task2 = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Fonts/Bombardier/tmpBombDropshadow.asset"); AsyncOperationHandle task3 = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/Fonts/Bombardier/tmpBombPlain.mat"); bombardierTextObject = PrefabAPI.InstantiateClone(await task1.Task, "LAI_BombardierTextObject", false); HGTextMeshProUGUI textmesh = bombardierTextObject.GetComponent(); 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()); } } } 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 currentCameraSettings = new Dictionary(); 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(); } 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.SetCam(self); ((Behaviour)cameraController).enabled = false; } } internal static class LAILayoutManager { public static LAILayout chosenLayout = null; public static Dictionary layoutsDict = new Dictionary(); public static List layoutNameList = new List(); 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 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 mannequinLayoutsDict = new Dictionary(); public static List mannequinLayoutNameList = new List(); 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.priority = 99999; musicTrackOverride.track = Addressables.LoadAssetAsync((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 d__11 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LAIPlugin <>4__this; private Task 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = LAIAssets.Init(); break; case 1: <>1__state = -1; break; } if (!5__1.IsCompleted) { <>2__current = null; <>1__state = 1; return true; } if (5__1.Exception != null) { Debug.LogError((object)("Exception in LAIAssets.Init: " + 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(); } 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(d__11))] private IEnumerator CallInit() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { <>4__this = this }; } private void PreGameShakeController_Awake(orig_Awake orig, PreGameShakeController self) { InstanceTracker.Add(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())) { ((Component)self).gameObject.AddComponent(); } 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(); } 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 scenesDict = new Dictionary(); public static Dictionary scenesReverseDict = new Dictionary(); public static List sceneNameList = new List(); public static GameObject sceneInstance; public static GameObject TitleInstance; public static GameObject SubTitleInstance; public static GameObject LayoutTitleInstance; public static GameObject SeerTextInstance; public static Action 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)Delegate.Combine(LAIScene.onSceneLoaded, new Action(CreateHeaderIfMissing)); LAIScene.onSceneLoaded = (Action)Delegate.Combine(LAIScene.onSceneLoaded, new Action(OnSceneLoaded)); LAILayout.onLayoutLoaded = (Action)Delegate.Combine(LAILayout.onLayoutLoaded, new Action(OnLayoutLoaded)); PreGameController.Start += new hook_Start(PreGameController_Start); LAIScene.onSceneLoaded = (Action)Delegate.Combine(LAIScene.onSceneLoaded, new Action(ActivateVoteStartEffectIfNewSceneLoaded)); LAIScene.onSceneUnloaded = (Action)Delegate.Combine(LAIScene.onSceneUnloaded, new Action(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(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)SeerTextInstance).name = "LobbyAppearanceImprovements_Seer_Text"; SeerTextInstance.transform.localPosition = new Vector3(0f, -480f, 0f); ((TMP_Text)SeerTextInstance.GetComponent()).fontSizeMin = 50f; } ((TMP_Text)SeerTextInstance.GetComponent()).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(); } 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(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)TitleInstance).name = "LobbyAppearanceImprovements_Scene_Title"; TitleInstance.transform.localPosition = new Vector3(0f, 450f, 0f); ((TMP_Text)TitleInstance.GetComponent()).fontSizeMin = 80f; } ((TMP_Text)TitleInstance.GetComponent()).text = Language.GetString(chosenScene.SceneTitleToken); if (!Object.op_Implicit((Object)(object)SubTitleInstance)) { SubTitleInstance = Object.Instantiate(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)SubTitleInstance).name = "LobbyAppearanceImprovements_Scene_Subtitle"; SubTitleInstance.transform.localPosition = new Vector3(0f, 400f, 0f); ((TMP_Text)SubTitleInstance.GetComponent()).fontSizeMin = 50f; } ((TMP_Text)SubTitleInstance.GetComponent()).text = Language.GetStringFormatted("LAI_MAP_SUBTTILE_FORMAT", new object[1] { Language.GetString(chosenScene.SceneSubtitleToken) }); if (!Object.op_Implicit((Object)(object)LayoutTitleInstance)) { LayoutTitleInstance = Object.Instantiate(LAIAssets.bombardierTextObject, LAIPlugin.LAITextHolder.transform); ((Object)LayoutTitleInstance).name = "LobbyAppearanceImprovements_Layout_Title"; LayoutTitleInstance.transform.localPosition = new Vector3(0f, 360f, 0f); ((TMP_Text)LayoutTitleInstance.GetComponent()).fontSizeMin = 40f; } ((TMP_Text)LayoutTitleInstance.GetComponent()).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(this); } public void OnDestroy() { InstanceTracker.Remove(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(); localUser = ((MPEventSystem)EventSystem.current).localUser; if (Object.op_Implicit((Object)(object)survivorDef)) { survivorUnlocked = SurvivorCatalog.SurvivorIsUnlockedOnThisClient(survivorDef.survivorIndex); highlight = ((Component)this).gameObject.AddComponent(); 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(); 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(); 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() : null; } public SkinnedMeshRenderer GetTargetRendererFallback() { Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren(); 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(); 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(); survivorMannequinDioramaController = Object.FindObjectOfType(); 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(displayPrefab, position, Quaternion.Euler(rotation), parent); LAI_CharDisplayTracker lAI_CharDisplayTracker = val2.AddComponent(); if (addCollider && ConfigSetup.SIL_ClickOnCharacterToSwap.Value) { CapsuleCollider val3 = val2.AddComponent(); val3.radius = 1f; ClickToSelectCharacter clickToSelectCharacter = val2.AddComponent(); clickToSelectCharacter.survivorDef = val; } bool hasUnlocked = LocalUserManager.GetFirstLocalUser().userProfile.HasUnlockable(val.unlockableDef); lAI_CharDisplayTracker.hasUnlocked = hasUnlocked; CharacterModel[] componentsInChildren = ((Component)val2.transform).GetComponentsInChildren(); 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()).enabled = false; break; case "Toolbot": ((Behaviour)((Component)val2.transform.Find("Base/mdlToolbot")).gameObject.GetComponent()).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()).enabled = false; break; } LAILayout.LAI_CharacterDisplay lAI_CharacterDisplay = val2.AddComponent(); 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(ref val)) { Object.Destroy((Object)(object)gameObject.GetComponent()); } } 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.Enumerator enumerator = LAILayoutManager.layoutsDict.GetEnumerator()) { if (enumerator.MoveNext()) { KeyValuePair 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 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 instancesList = InstanceTracker.GetInstancesList(); 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()) { 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: Main)"); Transform val2 = transform.Find("RightHandPanel"); float num2 = (float)ConfigSetup.UI_BlurOpacity.Value / 100f; TranslucentImage component = ((Component)val.Find("BlurPanel")).GetComponent(); ((Graphic)component).color = new Color(((Graphic)component).color.r, ((Graphic)component).color.g, ((Graphic)component).color.b, num2); TranslucentImage component2 = ((Component)val2.Find("RuleVerticalLayout").Find("BlurPanel")).GetComponent(); ((Graphic)component2).color = new Color(((Graphic)component2).color.r, ((Graphic)component2).color.g, ((Graphic)component2).color.b, num2); LAILogging.LogMessage($"Transparency Value: {num2}" + $"\nColor transparency: {((Graphic)component).color.a}", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); } public static void Hook_UIScale(float value) { //IL_003b: 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_004d: 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) ConfigSetup.UI_Scale.Value = value; Transform transform = ((Component)LAIPlugin.CharSelUITransform.Find("SafeArea")).transform; Transform val = transform.Find("LeftHandPanel (Layer: Main)"); Transform val2 = transform.Find("RightHandPanel"); val.localScale = Vector3.one * value; val2.localScale = Vector3.one * value; } public static void Hook_Overlay_ShowPostProcessing(bool value) { ConfigSetup.PostProcessing.Value = value; if (!Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance)) { return; } Transform val = LAISceneManager.sceneInstance.transform.Find("PP"); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(value); } foreach (LAIScene.PostProcessingMarker instances in InstanceTracker.GetInstancesList()) { foreach (GameObject postProcessingObject in instances.postProcessingObjects) { postProcessingObject.SetActive(value); } } } public static void Hook_LightUpdate_Color(Color color) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ConfigSetup.Light_Color.Value = color; UpdateDirectionalLight(); } public static void Hook_LightUpdate_Flicker(bool flicker) { ConfigSetup.Light_Flicker.Value = flicker; UpdateDirectionalLight(); } public static void Hook_LightUpdate_Intensity(float intensity) { ConfigSetup.Light_Intensity.Value = intensity; UpdateDirectionalLight(); } public static void UpdateDirectionalLight() { //IL_003e: 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_0068: 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_008d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance) && Object.op_Implicit((Object)(object)Lobby.DirectionalLight)) { Light component = Lobby.DirectionalLight.GetComponent(); component.color = new Color(ConfigSetup.Light_Color.Value.r / 255f, ConfigSetup.Light_Color.Value.g / 255f, ConfigSetup.Light_Color.Value.b / 255f, ConfigSetup.Light_Color.Value.a / 255f); component.intensity = ConfigSetup.Light_Intensity.Value; FlickerLight component2 = Lobby.DirectionalLight.GetComponent(); ((Behaviour)component2).enabled = ConfigSetup.Light_Flicker.Value; component2.initialLightIntensity = ConfigSetup.Light_Intensity.Value; component.intensity = ConfigSetup.Light_Intensity.Value; } } public static void Hook_RescalePads(float size) { //IL_002b: 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) ConfigSetup.MannequinScale.Value = size; SurvivorMannequinDioramaController val = Object.FindObjectOfType(); GameObject gameObject = ((Component)val).gameObject; if (Object.op_Implicit((Object)(object)gameObject)) { gameObject.transform.localScale = Vector3.one * size; } } public static void Hook_Rotate_Toggle(bool value) { ConfigSetup.MannequinEnableLocalTurn.Value = value; if (Object.op_Implicit((Object)(object)LAICameraManager.CurrentCameraController)) { LAICameraManager.CurrentCameraController.RotateCamera(reset: true); } } public static void Hook_Rotate_Speed(float speed) { ConfigSetup.MannequinEnableLocalTurnMultiplier.Value = speed; if (Object.op_Implicit((Object)(object)LAICameraManager.CurrentCameraController)) { LAICameraManager.CurrentCameraController.AdjustRotateSpeed(speed); } } public static void Hook_Lobby_HideProps(bool value) { ConfigSetup.MeshProps.Value = value; string[] meshPropNames = Lobby.MeshPropNames; foreach (string text in meshPropNames) { GameObject val = GameObject.Find(text); if (Object.op_Implicit((Object)(object)val)) { val.SetActive(ConfigSetup.MeshProps.Value); } } Hook_Lobby_HidePhysicsProps(ConfigSetup.PhysicsProps.Value); } public static void Hook_Lobby_HidePhysicsProps(bool value) { ConfigSetup.PhysicsProps.Value = value; if (!(LAISceneManager.chosenScene is Lobby)) { return; } if (!Object.op_Implicit((Object)(object)Lobby.MeshPropsRef)) { LAILogging.LogWarning("Hook_HidePhysicsProps: Missing MeshPropsRef for Lobby scene", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return; } Transform transform = Lobby.MeshPropsRef.transform; if (!Object.op_Implicit((Object)(object)transform)) { return; } string[] physicsPropNames = Lobby.PhysicsPropNames; foreach (string text in physicsPropNames) { Transform val = transform.Find(text); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.SetActive(value); } } } public static void Hook_Overlay_Parallax(bool value) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) ConfigSetup.Parallax.Value = value; if (Object.op_Implicit((Object)(object)LAICameraManager.CurrentCameraController)) { LAICameraManager.CurrentCameraController.GetDesiredPositionFromScreenFraction(reset: true); } } public static void Hook_ToggleSceneHeaderVisibility(bool value) { ConfigSetup.Scene_Header.Value = value; if (LAISceneManager.chosenScene != null) { LAISceneManager.TitleInstance.SetActive(value); LAISceneManager.SubTitleInstance.SetActive(value); LAISceneManager.LayoutTitleInstance.SetActive(value); } } public static void Hook_ToggleSceneSeerVisibility(bool value) { ConfigSetup.Scene_Seer.Value = value; if (LAISceneManager.chosenScene != null) { LAISceneManager.SeerTextInstance.SetActive(value); } } public static void Hook_BlackenSurvivors(bool value) { ConfigSetup.SIL_LockedCharactersBlack.Value = value; List instancesList = InstanceTracker.GetInstancesList(); if (instancesList == null || instancesList.Count == 0) { return; } foreach (Methods.LAI_CharDisplayTracker item in instancesList) { if (Object.op_Implicit((Object)(object)item)) { item.ToggleShadow(value); } } } public static void Hook_ToggleZooming(bool value) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) ConfigSetup.SIL_ZoomEnable.Value = value; if (value) { UserProfile.onSurvivorPreferenceChangedGlobal += MoveCameraOnSurvivorPreferenceChange; return; } UserProfile.onSurvivorPreferenceChangedGlobal -= MoveCameraOnSurvivorPreferenceChange; Methods.SetCamera(); } private static void MoveCameraOnSurvivorPreferenceChange(UserProfile userProfile) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) SetCameraFromSurvivor(userProfile.GetSurvivorPreference().survivorIndex); } public static void SetCameraFromSurvivor(SurvivorIndex survivorIndex) { //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) string bodyName = BodyCatalog.GetBodyName(SurvivorCatalog.GetBodyIndexFromSurvivorIndex(survivorIndex)); SetCameraFromBodyName(bodyName); } public static void SetCameraFromBodyName(string bodyName) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0057: Unknown result type (might be due to invalid IL or missing references) if (LAILayoutManager.chosenLayout != null && LAILayoutManager.chosenLayout.CharacterCameraSettings != null) { if (LAILayoutManager.chosenLayout.CharacterCameraSettings.TryGetValue(bodyName, out var value)) { Methods.SetCamera(null, value); } else { Methods.SetCamera(); } } } } public static class SceneSetup { public static Action SceneAssetAPI_IntroAction; public static Action SceneAssetAPI_LobbyAction; public static Action SceneAssetAPI_TitleAction; public static Action SceneAssetAPI_VoidOutroAction; public static Action SceneAssetAPI_itmoonAction; public static Action SceneAssetAPI_BazaarAction; public static Action SceneAssetAPI_LemurianTempleAction; public static Action SceneAssetAPI_OutroAction; public static GameObject outroArenaStuff; public static GameObject chefLemTempleStuff; public static GameObject VoidOutroSet7; public static GameObject SpaceCabin; public static GameObject CaptainHelmObject; public static GameObject ContactLightPrefab; public static GameObject ContactLight_RestraintBar; public static GameObject ContactLight_Commando; public static GameObject ContactLight_Enforcer; public static GameObject ContactLight_Bandit2; public static GameObject ContactLight_Huntress; public static GameObject ContactLight_HAND; public static GameObject ContactLight_Engineer; public static GameObject ContactLight_Miner; public static GameObject ContactLight_Sniper; public static GameObject ContactLight_Acrid; public static GameObject ContactLight_Mercenary; public static GameObject ContactLight_Loader; public static GameObject ContactLight_CHEF; public static GameObject BazaarStoreObject; public static void Init() { SceneAssetAPI_IntroAction = (Action)Delegate.Combine(SceneAssetAPI_IntroAction, new Action(CaptainHelm_Setup)); SceneAssetAPI.AddAssetRequest("intro", SceneAssetAPI_IntroAction); SceneAssetAPI_TitleAction = (Action)Delegate.Combine(SceneAssetAPI_TitleAction, new Action(LobbyMulti_Setup)); SceneAssetAPI.AddAssetRequest("title", SceneAssetAPI_TitleAction); SceneAssetAPI_VoidOutroAction = (Action)Delegate.Combine(SceneAssetAPI_VoidOutroAction, new Action(VoidOceanFloor_Setup)); SceneAssetAPI.AddAssetRequest("voidoutro", SceneAssetAPI_VoidOutroAction); } private static void OutroSetup(GameObject[] obj) { foreach (GameObject val in obj) { if (((Object)val).name == "Set 4 - Arena") { val.SetActive(true); ((Component)val.transform.Find("FX")).gameObject.SetActive(false); outroArenaStuff = PrefabAPI.InstantiateClone(val, "LAI_OutroArena"); break; } } } private static void LemurianTempleSetup(GameObject[] obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown GameObject val = new GameObject(); foreach (GameObject val2 in obj) { if (((Object)val2).name == "HOLDER: ChefZone") { val2.transform.parent = val.transform; } else if (((Object)val2).name == "HOLDER:Terrain") { val2.transform.parent = val.transform; Object.Destroy((Object)(object)((Component)val2.transform.Find("Water Plane")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("Water Plane (1)")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("Water Plane (2)")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("Water Plane (3)")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("LTAltar")).gameObject); } else if (((Object)val2).name == "HOLDER: Prop") { val2.transform.parent = val.transform; Object.Destroy((Object)(object)((Component)val2.transform.Find("YellowCoral")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("Crystal")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("LTPebbles")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("GoldDecal")).gameObject); Object.Destroy((Object)(object)((Component)val2.transform.Find("RedRoots")).gameObject); } else if (((Object)val2).name == "Weather, LemurianTemple") { val2.transform.parent = val.transform; } } chefLemTempleStuff = PrefabAPI.InstantiateClone(val, "LAI_CHEFROOM", false); Object.Destroy((Object)(object)val); } public static string GetPath(this Transform current) { if ((Object)(object)current.parent == (Object)null) { return "/" + ((Object)current).name; } return current.parent.GetPath() + "/" + ((Object)current).name; } private static void VoidOceanFloor_Setup(GameObject[] obj) { foreach (GameObject val in obj) { if (((Object)val).name == "Set 7: Bottom of the Ocean") { VoidOutroSet7 = PrefabAPI.InstantiateClone(val, "LAI_VOIDOUTROSET7", false); ((Behaviour)((Component)VoidOutroSet7.transform.Find("CrabHolder")).GetComponent()).enabled = false; VoidOutroSet7.SetActive(true); break; } } } private static void LobbyMulti_Setup(GameObject[] gameObjects) { foreach (GameObject val in gameObjects) { if (((Object)val).name == "MainMenu") { SpaceCabin = PrefabAPI.InstantiateClone(((Component)val.transform.Find("MENU: Multiplayer/World Position/HOLDER: Background")).gameObject, "LAI_SPACECABIN", false); SpaceCabin.isStatic = false; Transform[] componentsInChildren = ((Component)SpaceCabin.transform).GetComponentsInChildren(); foreach (Transform val2 in componentsInChildren) { ((Component)val2).gameObject.isStatic = false; } break; } } } public static void CaptainHelm_Setup(GameObject[] gameObjects) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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) GameObject val = null; GameObject val2 = null; GameObject val3 = null; foreach (GameObject val4 in gameObjects) { switch (((Object)val4).name) { case "Set 2 - Cabin": val = val4; val.SetActive(true); break; case "Cutscene Space Skybox": val2 = val4; break; case "Set 3 - Space, Small Planet": val3 = val4; val3.SetActive(false); break; } } GameObject val5 = new GameObject(); val.transform.parent = val5.transform; val.transform.position = new Vector3(1f, 1f, 1f); ((Component)val.transform.Find("CabinPosition")).transform.localScale = Vector3.one * 200f; ((Component)val.transform.Find("CabinPosition")).transform.localPosition = new Vector3(-18f, 4.2f, 6f); val2.transform.parent = val5.transform; val2.transform.localScale = Vector3.one * 30f; val3.transform.parent = val5.transform; CaptainHelmObject = PrefabAPI.InstantiateClone(val5, "LAI_CaptainsHelm_Cabin", false); Object.Destroy((Object)(object)val5); } public static void SceneAssetAPI_GetLobbyObjects(GameObject[] gameObjects) { foreach (GameObject val in gameObjects) { if (((Object)val).name == "MeshProps") { GameObject val2 = GameObject.Find("spacecabin"); CaptainHelmObject = PrefabAPI.InstantiateClone(val2, "Cabin", false); } } } public static void SetupContactLight() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown Mesh mesh = ((Component)Survivors.Croco.displayPrefab.transform.Find("mdlCroco/Spawn/SpawnFX/Chunks, Solid")).GetComponent().mesh; GameObject val = new GameObject(); ContactLightPrefab = PrefabAPI.InstantiateClone(val, "Contact Light Prefab", false); ContactLight_RestraintBar = new GameObject(); ContactLight_RestraintBar = PrefabAPI.InstantiateClone(val, "RestraintBar", false); MeshRenderer val2 = ContactLight_RestraintBar.AddComponent(); MeshFilter val3 = ContactLight_RestraintBar.AddComponent(); val3.mesh = mesh; SetupCommando(); SetupBandit2(); Object.Destroy((Object)(object)val); } public static void SetupCommando() { //IL_0034: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) ContactLight_Commando = PrefabAPI.InstantiateClone(Survivors.Commando.displayPrefab, "ContactLight_Commando", false); ContactLight_Commando.transform.localEulerAngles = new Vector3(0f, 180f, 0f); ContactLight_Commando.transform.position = new Vector3(0f, 0f, 2f); GameObject val = PrefabAPI.InstantiateClone(ContactLight_RestraintBar, "Commando_RestraintBar", false); val.transform.SetParent(ContactLight_Commando.transform); val.transform.localEulerAngles = new Vector3(310f, 0f, 0f); val.transform.localScale = new Vector3(0.25f, 0.6f, 0.4f); val.transform.localPosition = new Vector3(0.02f, 1.4f, 0.2f); ((Behaviour)ContactLight_Commando.GetComponentInChildren()).enabled = false; Transform val2 = ContactLight_Commando.transform.Find("mdlCommandoDualies/CommandoArmature/ROOT/base/stomach/chest"); val2.Find("upper_arm.l").localEulerAngles = new Vector3(0f, 0f, 145f); val2.Find("upper_arm.l/lower_arm.l").localEulerAngles = new Vector3(340f, 270f, 240f); val2.Find("upper_arm.l/lower_arm.l/hand.l").localEulerAngles = new Vector3(15f, 35f, -8.8389f); val2.Find("upper_arm.l/lower_arm.l/hand.l/gun.l").localScale = Vector3.zero; val2.Find("upper_arm.r").localEulerAngles = new Vector3(3f, 4f, 205f); val2.Find("upper_arm.r/lower_arm.r").localEulerAngles = new Vector3(340f, 270f, 240f); val2.Find("upper_arm.r/lower_arm.r/hand.r").localEulerAngles = new Vector3(15f, 35f, -8.8389f); ((Component)val2.Find("upper_arm.r/lower_arm.r/hand.r/gun.r")).transform.localScale = Vector3.zero; } public static void SetupBandit2() { //IL_0034: 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_00b0: 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_00f0: Unknown result type (might be due to invalid IL or missing references) ContactLight_Bandit2 = PrefabAPI.InstantiateClone(Survivors.Bandit2.displayPrefab, "ContactLight_Bandit2", false); ContactLight_Bandit2.transform.localEulerAngles = new Vector3(0f, 180f, 0f); ContactLight_Bandit2.transform.position = new Vector3(0f, 0f, 2f); ((Behaviour)ContactLight_Commando.GetComponentInChildren()).enabled = false; GameObject val = PrefabAPI.InstantiateClone(ContactLight_RestraintBar, "Commando_RestraintBar", false); val.transform.SetParent(ContactLight_Bandit2.transform); val.transform.localEulerAngles = new Vector3(310f, 0f, 0f); val.transform.localScale = new Vector3(0.25f, 0.6f, 0.4f); val.transform.localPosition = new Vector3(-0.06f, 1.6f, 2.75f); } public static void BazaarStoreObject_Setup(GameObject[] gameObjects) { //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; GameObject val2 = null; GameObject val3 = null; foreach (GameObject val4 in gameObjects) { switch (((Object)val4).name) { case "HOLDER: Store": val = val4; break; case "HOLDER: Starting Cave": val2 = ((Component)val4.transform.Find("Static")).gameObject; break; case "SceneInfo": val3 = val4; break; } } string[] array = new string[11] { "HOLDER: Store Platforms/LockedMage", "CauldronShop/LunarCauldron, GreenToRed", "CauldronShop/LunarCauldron, WhiteToGreen", "SeerShop/SeerStation (1)", "SeerShop/SeerStation", "LunarShop/LunarRecycler", "LunarShop/LunarTable/LunarShopTerminal (1)", "LunarShop/LunarTable/LunarShopTerminal", "LunarShop/LunarTable/LunarShopTerminal", "LunarShop/LunarTable/LunarShopTerminal", "LunarShop/LunarTable/LunarShopTerminal" }; PurchaseAvailabilityIndicator val6 = default(PurchaseAvailabilityIndicator); PurchaseInteraction val7 = default(PurchaseInteraction); ShopTerminalBehavior val8 = default(ShopTerminalBehavior); foreach (string text in array) { Transform val5 = val.transform.Find(text); GameObject gameObject = ((Component)val5).gameObject; ((Object)gameObject).name = ((Object)gameObject).name + "d"; if (((Component)val5).TryGetComponent(ref val6)) { Object.Destroy((Object)(object)val6); } if (((Component)val5).TryGetComponent(ref val7)) { Object.Destroy((Object)(object)val7); } if (((Component)val5).TryGetComponent(ref val8)) { Object.Destroy((Object)(object)val8); } } int num = 0; NetworkStateMachine[] componentsInChildren = val.GetComponentsInChildren(); foreach (NetworkStateMachine val9 in componentsInChildren) { num++; ((Behaviour)val9).enabled = false; } Debug.Log((object)("NSMs: " + num)); GameObject val10 = new GameObject(); val.transform.parent = val10.transform; val.transform.position = Vector3.zero; val2.transform.parent = val10.transform; val2.transform.position = Vector3.zero; PickupDisplay[] componentsInChildren2 = val.GetComponentsInChildren(); foreach (PickupDisplay val11 in componentsInChildren2) { } val3.transform.Find("PP, Global").parent = val10.transform; BazaarStoreObject = PrefabAPI.InstantiateClone(val10, "LAI_Bazaar_Store", false); Object.Destroy((Object)(object)val10); } private static void GlobalEventManager_OnEnable(orig_OnEnable orig, GlobalEventManager self) { if (Object.op_Implicit((Object)(object)GlobalEventManager.instance)) { LAILogging.LogMessage("GEM OnEnable", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); ((Behaviour)self).enabled = false; } else { orig.Invoke(self); } } public static void DestroyComponentInChildren(Transform parent) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown NetworkStateMachine val = default(NetworkStateMachine); if (((Component)parent).TryGetComponent(ref val)) { Object.Destroy((Object)(object)val); } foreach (Transform item in parent) { Transform parent2 = item; DestroyComponentInChildren(parent2); } } } } namespace LobbyAppearanceImprovements.Scenes { public class AncientLoft : LAIScene { public override string SceneNameToken => "MAP_ANCIENTLOFT"; public override string SeerToken => "BAZAAR_SEER_ANCIENTLOFT"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/DLC1/ancientloft/AncientLoftDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(0f, -3.5f, 11f); public override Quaternion Rotation => Quaternion.Euler(0f, 180f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC1/ancientloft/matSkyboxAncientLoft.mat"); public override string MusicTrackName => "muGameplayDLC1_01"; } public class Arena : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_ARENA"; public override string SeerToken => "LAI_SEER_ARENA"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(3.5f, -3.1f, 3f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/arena/matSkyboxArena.mat"); public override string MusicTrackName => "muSong08"; public override void Init() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_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) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/arena/ArenaDioramaDisplay.prefab", "LAI_Scene_Arena"); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/arena/Arena_NullifierGemProp.prefab", display.transform); val.transform.position = new Vector3(3.9f, 0.2f, 8.3f); val.transform.localScale = Vector3.one * 2f; PrefabSpawner prefabSpawner = display.AddComponent(); prefabSpawner.AssetPath = "RoR2/Base/PortalArena/PortalArena.prefab"; prefabSpawner.localPosition = new Vector3(9f, 0f, 28f); ((Behaviour)prefabSpawner).enabled = false; GameObject val2 = LAIScene.CloneFromAddressable("RoR2/Base/arena/Arena_Skybox.prefab"); val2.transform.parent = display.transform; } public override void OnVoteStarted(LAIScene scene) { if (scene.IsSceneOfType()) { GameObject sceneInstance = LAISceneManager.sceneInstance; if (Object.op_Implicit((Object)(object)sceneInstance)) { ((Behaviour)sceneInstance.GetComponent()).enabled = true; } } } } public class ArtifactWorld : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_ARTIFACTWORLD"; public override string SeerToken => "LAI_SEER_ARTIFACTWORLD"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(-2f, -11f, 7f); public override Quaternion Rotation => Quaternion.Euler(0f, 90f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/artifactworld/matSkyboxArtifactWorld.mat"); public override string MusicTrackName => "muSong13"; public override void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0061: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/artifactworld/ArtifactworldDioramaDisplay.prefab", "LAI_Scene_ArtifactWorld"); PrefabSpawner prefabSpawner = display.AddComponent(); prefabSpawner.AssetPath = "RoR2/Base/PortalArtifactworld/PortalArtifactworld.prefab"; prefabSpawner.localPosition = new Vector3(-20f, 46f, 5f); prefabSpawner.rotation = Quaternion.Euler(0f, 270f, 0f); ((Behaviour)prefabSpawner).enabled = false; LAIScene.CloneFromAddressable("RoR2/Base/artifactworld/ArtifactWorldSkybox.prefab", display.transform); } public override void OnVoteStarted(LAIScene scene) { base.OnVoteStarted(scene); if (scene.IsSceneOfType()) { GameObject sceneInstance = LAISceneManager.sceneInstance; if (Object.op_Implicit((Object)(object)sceneInstance)) { ((Behaviour)sceneInstance.GetComponent()).enabled = true; } } } } public class ArtifactWorld01 : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_ARTIFACTWORLD01"; public override string SeerToken => "LAI_SEER_ARTIFACTWORLD"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(-2f, -6f, 14f); public override Quaternion Rotation => Quaternion.Euler(0f, 90f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/artifactworld/matSkyboxArtifactWorld.mat"); public override string MusicTrackName => "muSong13"; public override void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0061: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/artifactworld01/Artifactworld01DioramaDisplay.prefab", "LAI_Scene_ArtifactWorld"); PrefabSpawner prefabSpawner = display.AddComponent(); prefabSpawner.AssetPath = "RoR2/Base/PortalArtifactworld/PortalArtifactworld.prefab"; prefabSpawner.localPosition = new Vector3(-20f, 16f, 5f); prefabSpawner.rotation = Quaternion.Euler(0f, 270f, 0f); ((Behaviour)prefabSpawner).enabled = false; LAIScene.CloneFromAddressable("RoR2/Base/artifactworld/ArtifactWorldSkybox.prefab", display.transform); } public override void OnVoteStarted(LAIScene scene) { base.OnVoteStarted(scene); if (scene.IsSceneOfType()) { GameObject sceneInstance = LAISceneManager.sceneInstance; if (Object.op_Implicit((Object)(object)sceneInstance)) { ((Behaviour)sceneInstance.GetComponent()).enabled = true; } } } } public class ArtifactWorld02 : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_ARTIFACTWORLD02"; public override string SeerToken => "LAI_SEER_ARTIFACTWORLD"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(-9f, -8f, 32f); public override Quaternion Rotation => Quaternion.Euler(0f, 90f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/artifactworld/matSkyboxArtifactWorld.mat"); public override string MusicTrackName => "muSong13"; public override void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0061: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/artifactworld02/Artifactworld02DioramaDisplay.prefab", "LAI_Scene_ArtifactWorld"); PrefabSpawner prefabSpawner = display.AddComponent(); prefabSpawner.AssetPath = "RoR2/Base/PortalArtifactworld/PortalArtifactworld.prefab"; prefabSpawner.localPosition = new Vector3(-20f, 46f, 5f); prefabSpawner.rotation = Quaternion.Euler(0f, 270f, 0f); ((Behaviour)prefabSpawner).enabled = false; LAIScene.CloneFromAddressable("RoR2/Base/artifactworld/ArtifactWorldSkybox.prefab", display.transform); } public override void OnVoteStarted(LAIScene scene) { base.OnVoteStarted(scene); if (scene.IsSceneOfType()) { GameObject sceneInstance = LAISceneManager.sceneInstance; if (Object.op_Implicit((Object)(object)sceneInstance)) { ((Behaviour)sceneInstance.GetComponent()).enabled = true; } } } } public class ArtifactWorld03 : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_ARTIFACTWORLD03"; public override string SeerToken => "LAI_SEER_ARTIFACTWORLD"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(-7f, -5f, 8f); public override Quaternion Rotation => Quaternion.Euler(0f, 285f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/artifactworld/matSkyboxArtifactWorld.mat"); public override string MusicTrackName => "muSong13"; public override void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0061: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/artifactworld03/Artifactworld03DioramaDisplay.prefab", "LAI_Scene_ArtifactWorld"); PrefabSpawner prefabSpawner = display.AddComponent(); prefabSpawner.AssetPath = "RoR2/Base/PortalArtifactworld/PortalArtifactworld.prefab"; prefabSpawner.localPosition = new Vector3(10f, 9f, 39f); prefabSpawner.rotation = Quaternion.Euler(0f, 90f, 0f); ((Behaviour)prefabSpawner).enabled = false; LAIScene.CloneFromAddressable("RoR2/Base/artifactworld/ArtifactWorldSkybox.prefab", display.transform); } public override void OnVoteStarted(LAIScene scene) { base.OnVoteStarted(scene); if (scene.IsSceneOfType()) { GameObject sceneInstance = LAISceneManager.sceneInstance; if (Object.op_Implicit((Object)(object)sceneInstance)) { ((Behaviour)sceneInstance.GetComponent()).enabled = true; } } } } public class BattleMoon : LAIScene { public override string SceneNameToken => "LAI_MAP_BATTLEMOON"; public override string SeerToken => "LAI_SEER_BATTLEMOON"; public override GameObject BackgroundPrefab => SceneSetup.outroArenaStuff; public override Vector3 Position => new Vector3(-16.7f, -3.7f, 8f); public override Quaternion Rotation => Quaternion.Euler(0f, 180f, 0f); public override Vector3 Scale => Vector3.one; public override string PreferredLayout => "CaptainsHelm_Default"; public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/intro/matIntroSkybox.mat"); public override string MusicTrackName => "muSong25"; } public class BlackBeach : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_BLACKBEACH"; public override string SeerToken => "BAZAAR_SEER_BLACKBEACH"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -2.4f, 5f); public override Quaternion Rotation => default(Quaternion); public override Vector3 Scale => new Vector3(1f, 0.5f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/Common/Skyboxes/matSkyboxFoggy.mat"); public override string MusicTrackName => "muFULLSong07"; public override void Init() { //IL_00a1: 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_00de: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/blackbeach/BlackbeachDioramaDisplay.prefab", "LAI_Scene_BlackBeach"); LAIScene.CloneFromAddressable("RoR2/Base/blackbeach/BBSkybox.prefab", display.transform); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/bazaar/Bazaar_Light.prefab", display.transform); ((Component)val.transform.Find("FireLODLevel")).gameObject.SetActive(false); GameObject gameObject = ((Component)val.transform.Find("Point Light")).gameObject; ((Behaviour)gameObject.GetComponent()).enabled = false; Light component = gameObject.GetComponent(); component.color = new Color(0.6306f, 0.5548f, 0.82f, 1f); component.intensity = 200f; val.transform.localPosition = new Vector3(2f, 16.8f, 9f); val.transform.localScale = Vector3.zero; } } public class CaptainsHelm : LAIScene { public override string SceneNameToken => "LAI_MAP_CAPTAINSHELM"; public override string SeerToken => "LAI_SEER_CAPTAINSHELM"; public override GameObject BackgroundPrefab => SceneSetup.CaptainHelmObject; public override Vector3 Position => new Vector3(-16.7f, -3.7f, 8f); public override Quaternion Rotation => Quaternion.Euler(0f, 180f, 0f); public override Vector3 Scale => Vector3.one; public override string PreferredLayout => "CaptainsHelm_Default"; public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/intro/matIntroSkybox.mat"); public override string MusicTrackName => "muIntroCutscene"; } public class Codes : LAIScene { public static GameObject display; public override string SceneNameToken => "LAI_MAP_CODES"; public override string SeerToken => "LAI_SEER_CODES"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(17f, -26.2f, 107f); public override Quaternion Rotation => Quaternion.Euler(0f, 165f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/skymeadow/matSMSkybox.mat"); public override string MusicTrackName => "muSong14"; public override void Init() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/skymeadow/PortalDialerEvent.prefab", "LAI_Scene_Codes"); Transform val = display.transform.Find("Final Zone"); val.localPosition = Vector3.zero; Transform val2 = val.Find("ButtonContainer"); for (int i = 1; i < 10; i++) { Transform val3 = val2.Find("PortalDialerButton " + i); if (Object.op_Implicit((Object)(object)val3)) { Object.Destroy((Object)(object)((Component)val3).gameObject); } } Transform val4 = val2.Find("PortalDialer"); Object.Destroy((Object)(object)((Component)val4).GetComponent()); Object.Destroy((Object)(object)((Component)val4).GetComponent()); Object.Destroy((Object)(object)((Component)val4).GetComponent()); Object.Destroy((Object)(object)((Component)val4).GetComponent()); Object.Destroy((Object)(object)((Component)val4).GetComponent()); Object.Destroy((Object)(object)((Component)val4).GetComponent()); PrefabSpawner prefabSpawner = display.AddComponent(); PortalDialerController component = ((Component)display.transform.Find("Final Zone/ButtonContainer/PortalDialer")).GetComponent(); prefabSpawner.localPosition = component.portalSpawnLocation.position; prefabSpawner.rotation = component.portalSpawnLocation.rotation; ((Behaviour)prefabSpawner).enabled = false; prefabSpawner.AssetPath = "RoR2/Base/PortalArtifactworld/PortalArtifactworld.prefab"; } public override void OnVoteStarted(LAIScene scene) { base.OnVoteStarted(scene); if (scene.IsSceneOfType() && Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance)) { ((Behaviour)LAISceneManager.sceneInstance.GetComponent()).enabled = true; } } } public class Eclipse : LAIScene { public static GameObject eclipseLobby; public override string SceneNameToken => "LAI_MAP_COOLERECLIPSELOBBY"; public override string SeerToken => "LAI_SEER_ECLIPSE"; public override GameObject BackgroundPrefab => eclipseLobby; public override Vector3 Position => new Vector3(0f, 0f, 0f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/mysteryspace/matSkyboxMysterySpace.mat"); public override string MusicTrackName => "muMenuDLC1"; public override string Credit => "Nuxlar"; public override void Init() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) base.Init(); GameObject val = Addressables.LoadAssetAsync((object)"RoR2/Base/eclipseworld/Weather, Eclipse.prefab").WaitForCompletion(); eclipseLobby = PrefabAPI.InstantiateClone(((Run)Addressables.LoadAssetAsync((object)"RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerRun.prefab").WaitForCompletion().GetComponent()).lobbyBackgroundPrefab, "LAI_CoolerEclipseLobbyNux", false); ((Component)eclipseLobby.transform.GetChild(6)).gameObject.SetActive(true); ((Component)eclipseLobby.transform.GetChild(6).GetChild(0)).gameObject.SetActive(true); ((Component)eclipseLobby.transform.GetChild(7)).gameObject.SetActive(false); ((Component)eclipseLobby.transform.GetChild(8)).gameObject.SetActive(false); ((Component)eclipseLobby.transform.GetChild(9).GetChild(11)).gameObject.SetActive(false); ((Component)eclipseLobby.transform.GetChild(9).GetChild(12)).gameObject.SetActive(false); ((Component)eclipseLobby.transform.GetChild(11)).gameObject.SetActive(false); GameObject val2 = Object.Instantiate(val, eclipseLobby.transform); ((Component)val2.transform.GetChild(2)).GetComponent().ApplyLighting(); ((Component)val2.transform.GetChild(1)).gameObject.SetActive(false); Transform child = val2.transform.GetChild(3).GetChild(2); ((Component)child).gameObject.SetActive(true); child.localPosition = new Vector3(-0.6f, 0f, -0.95f); child.localEulerAngles = new Vector3(0f, 270f, 0f); child.localScale = new Vector3(0.25f, 0.25f, 0.25f); Transform child2 = child.GetChild(0); child2.localPosition = Vector3.zero; child2.localEulerAngles = new Vector3(0f, 120f, 0f); } } public class DampCave : LAIScene { public override string SceneNameToken => "MAP_DAMPCAVE"; public override string SeerToken => "BAZAAR_SEER_DAMPCAVESIMPLE"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/dampcavesimple/DampcaveDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(4f, -1.6f, 4f); public override Quaternion Rotation => Quaternion.Euler(0f, 60f, 0f); public override Vector3 Scale => new Vector3(1f, 0.5f, 1f); public override string MusicTrackName => "muFULLSong19"; } public class FoggySwamp : LAIScene { public override string SceneNameToken => "MAP_FOGGYSWAMP"; public override string SeerToken => "BAZAAR_SEER_FOGGYSWAMP"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/foggyswamp/FoggyswampDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(0f, -2.7f, 16f); public override Quaternion Rotation => Quaternion.Euler(0f, 30f, 0f); public override Vector3 Scale => new Vector3(1f, 0.5f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/goldshores/matSkyboxGoldshores.mat"); public override string MusicTrackName => "muFULLSong06"; } public class FrozenWall : LAIScene { public override string SceneNameToken => "MAP_FROZENWALL"; public override string SeerToken => "BAZAAR_SEER_FROZENWALL"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/frozenwall/FrozenwallDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(7f, -2.25f, 7f); public override Quaternion Rotation => Quaternion.Euler(0f, 260f, 0f); public override Vector3 Scale => new Vector3(0.5f, 0.5f, 0.5f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/frozenwall/matSkyboxFrozenwallNight.mat"); public override string MusicTrackName => "muFULLSong02"; } public class GoldShores : LAIScene { public static GameObject display; public static GameObject voteStartedObject; public override string SceneNameToken => "MAP_GOLDSHORES"; public override string SeerToken => "BAZAAR_SEER_GOLDSHORES"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -3.1f, 16f); public override Quaternion Rotation => Quaternion.Euler(0f, 30f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/goldshores/matSkyboxGoldshores.mat"); public override string MusicTrackName => "muFULLSong02"; public override void Init() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/goldshores/GoldshoresDiorama.prefab", "LAI_Scene_GoldShores"); LAIScene.CloneFromAddressable("RoR2/Base/goldshores/GoldshoresSkybox.prefab", display.transform); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/bazaar/Bazaar_Light.prefab", display.transform); ((Component)val.transform.Find("FireLODLevel")).gameObject.SetActive(false); GameObject gameObject = ((Component)val.transform.Find("Point Light")).gameObject; ((Behaviour)gameObject.GetComponent()).enabled = false; Light component = gameObject.GetComponent(); component.color = new Color(1f, 0.88f, 0f, 1f); val.transform.localPosition = new Vector3(2.5f, 8.3f, -4.3301f); val.transform.localScale = Vector3.zero; GameObject val2 = LAIScene.CloneFromAddressable("RoR2/Base/goldshores/GoldshoresBeacon.prefab", display.transform); val2.transform.localPosition = new Vector3(4f, 0f, 19f); Object.Destroy((Object)(object)val2.GetComponent()); Object.Destroy((Object)(object)val2.GetComponent()); Object.Destroy((Object)(object)val2.GetComponent()); PrefabSpawner prefabSpawner = display.AddComponent(); prefabSpawner.AssetPath = "RoR2/Base/PortalGoldshores/PortalGoldshores.prefab"; prefabSpawner.localPosition = new Vector3(0f, 0f, 33f); prefabSpawner.rotation = Quaternion.identity; } public override void OnVoteStarted(LAIScene scene) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown base.OnVoteStarted(scene); if (scene.IsSceneOfType() && Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance) && !Object.op_Implicit((Object)(object)voteStartedObject)) { EffectManager.SpawnEffect(LAIScene.LoadAsset("RoR2/Base/goldshores/ActivateGoldBeacon.prefab"), new EffectData { origin = new Vector3(4f, 10f, 19f) }, false); } } } public class GolemPlains : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_GOLEMPLAINS"; public override string SeerToken => "BAZAAR_SEER_GOLEMPLAINS"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(4f, -3f, 24f); public override Quaternion Rotation => Quaternion.Euler(0f, 240f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/golemplains/matSkyboxGolemplainsFoggy.mat"); public override string MusicTrackName => "muFULLSong18"; public override void Init() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/golemplains/GolemplainsDioramaDisplay.prefab", "LAI_Scene_GolemPlains"); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/bazaar/Bazaar_Light.prefab", display.transform); ((Component)val.transform.Find("FireLODLevel")).gameObject.SetActive(false); GameObject gameObject = ((Component)val.transform.Find("Point Light")).gameObject; ((Behaviour)gameObject.GetComponent()).enabled = false; Light component = gameObject.GetComponent(); component.color = new Color(0.76f, 0.7925f, 0f, 1f); val.transform.localPosition = new Vector3(1f, 6.5f, 21f); val.transform.localScale = Vector3.zero; } } public class GooLake : LAIScene { public override string SceneNameToken => "MAP_GOOLAKE"; public override string SeerToken => "BAZAAR_SEER_GOOLAKE"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/goolake/GoolakeDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(0f, -5f, 8f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => Vector3.one; public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/goolake/matSkyboxGoolake.mat"); public override string MusicTrackName => "muFULLSong19"; } public class Habitat : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_HABITAT"; public override string SeerToken => "BAZAAR_SEER_HABITAT"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -2.7f, 20.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 330f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/habitat/Assets/matBHSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/habitat/BHDioramaDisplay.prefab", "LAI_Scene_Habitat"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/habitat/Weather, Habitat.prefab"); val.transform.parent = display.transform; } } public class HabitatFall : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_HABITATFALL"; public override string SeerToken => "BAZAAR_SEER_HABITATFALL"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -2.7f, 20.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 330f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/habitatfall/Assets/matBHFallSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/habitatfall/BHFallDioramaDisplay.prefab", "LAI_Scene_HabitatFall"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/habitatfall/Weather, HabitatFall.prefab"); val.transform.parent = display.transform; } } public class HelminthRoost : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_HELMINTHROOST"; public override string SeerToken => "BAZAAR_SEER_HELMINTH"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 120f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/helminthroost/Assets/matSkyboxHelminthGrey.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/helminthroost/HRDioramaDisplay.prefab", "LAI_Scene_HelminthRoost"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/helminthroost/Weather, Helminthroost.prefab"); val.transform.parent = display.transform; } } public abstract class LAIScene { public class PrefabSpawner : MonoBehaviour { public string AssetPath; public Vector3 localPosition; public Quaternion rotation; public GameObject spawnedObject; public bool hasSpawned = false; public Action onObjectSpawned; public void Awake() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) spawnedObject = CloneFromAddressable(AssetPath, ((Component)this).transform); _ = rotation; if (true) { spawnedObject.transform.rotation = rotation; } _ = localPosition; if (true) { spawnedObject.transform.position = localPosition; } onObjectSpawned?.Invoke(spawnedObject); ((Behaviour)this).enabled = false; } public void Editor_RespawnObject() { Object.Destroy((Object)(object)spawnedObject); Awake(); } } public class PostProcessingMarker : MonoBehaviour { public List postProcessingObjects = new List(); public void Awake() { InstanceTracker.Add(this); } public void OnDestroy() { InstanceTracker.Remove(this); } } public class ShakingMarker : MonoBehaviour { public List shakingObjects = new List(); public List shakeEmitters = new List(); public void Awake() { InstanceTracker.Add(this); } public void OnDestroy() { InstanceTracker.Remove(this); } } public static Action onSceneLoaded; public static Action onSceneInstanceLoaded; public static Action onSceneUnloaded; public bool HasSetup = false; public static Material defaultSkyboxMaterial = LoadAsset("RoR2/Base/Common/Skyboxes/matSkybox1.mat"); public static MusicTrackDef defaultMusicTrackDef = null; public abstract string SceneNameToken { get; } public abstract string SeerToken { get; } public abstract GameObject BackgroundPrefab { get; } public abstract Vector3 Position { get; } public abstract Quaternion Rotation { get; } public abstract Vector3 Scale { get; } public virtual string PreferredLayout { get; } public virtual string[] RequiredModGUIDs { get; } public virtual Material SkyboxOverride { get; } = defaultSkyboxMaterial; public virtual string Credit { get; } public virtual string MusicTrackName { get; } = null; public virtual MusicTrackDef MusicTrackDef { get; set; } = defaultMusicTrackDef; public virtual Vector3 cameraPosition { get; } = default(Vector3); public virtual Vector3 cameraRotation { get; } = default(Vector3); public string SceneTitleToken => SceneNameToken + "_TITLE"; public string SceneSubtitleToken => SceneNameToken + "_SUBTITLE"; public LAIScene() { }//IL_002a: 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) public virtual void Init() { string name = GetType().Name; LAILogging.LogMessage(name + ".Init :: Setting up scene.", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); if (HasSetup) { LAILogging.LogMessage(name + ".Init :: Ran Init(), but has already set up!", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return; } HasSetup = true; LAISceneManager.onVoteStarted = (Action)Delegate.Combine(LAISceneManager.onVoteStarted, new Action(OnVoteStarted)); onSceneLoaded = (Action)Delegate.Combine(onSceneLoaded, new Action(ActivateVoteStartEventSingleplayer)); } private void ActivateVoteStartEventSingleplayer(LAIScene scene) { if (RoR2Application.isInSinglePlayer) { OnVoteStarted(scene); } } public virtual void OnVoteStarted(LAIScene scene) { } public bool CanLoadScene() { if (RequiredModGUIDs != null && RequiredModGUIDs.Length != 0) { string[] requiredModGUIDs = RequiredModGUIDs; foreach (string text in requiredModGUIDs) { if (!Chainloader.PluginInfos.ContainsKey(text)) { LAILogging.LogMessage("Refused to load scene \"" + GetType().Name + "\" because GUID \"" + text + "\" was not loaded!", ConfigSetup.LoggingStyle.UserShouldSee); return false; } } } return true; } public bool IsSceneOfType() { return this is T; } public GameObject CreateScene(bool selectScene) { //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_003e: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; if (Object.op_Implicit((Object)(object)BackgroundPrefab)) { val = Object.Instantiate(BackgroundPrefab); val.transform.SetPositionAndRotation(Position, Rotation); val.transform.localScale = Scale; } if (selectScene) { LAISceneManager.sceneInstance = val; HookMethods.Hook_Overlay_ShowPostProcessing(ConfigSetup.PostProcessing.Value); onSceneLoaded?.Invoke(this); onSceneInstanceLoaded?.Invoke(this, val); } return val; } public void OnDestroy() { onSceneUnloaded?.Invoke(this); } public static T LoadAsset(string path) { //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) return Addressables.LoadAssetAsync((object)path).WaitForCompletion(); } public static GameObject LoadAsset(string path) { return LoadAsset(path); } public static GameObject PrefabCloneFromAddressable(string path, string name) { return PrefabAPI.InstantiateClone(LoadAsset(path), name, false); } public static GameObject CloneFromAddressable(string path, Transform parentTransform = null) { GameObject val = Object.Instantiate(LoadAsset(path)); if (Object.op_Implicit((Object)(object)parentTransform)) { val.transform.parent = parentTransform; } return val; } } public class Lakes : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_LAKES"; public override string SeerToken => "BAZAAR_SEER_LAKES"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/CU8/lakes/matTLSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/lakes/TLDioramaDisplay.prefab", "LAI_Scene_Lakes"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/lakes/Weather, Lakes.prefab"); val.transform.parent = display.transform; } } public class LakesNight : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_LAKESNIGHT"; public override string SeerToken => "BAZAAR_SEER_LAKESNIGHT"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/lakesnight/Assets/matTLNightSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/lakesnight/TLNightDioramaDisplay.prefab", "LAI_Scene_LakesNight"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/lakesnight/Weather, Lakesnight.prefab"); val.transform.parent = display.transform; } } public class LemurianTemple : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_LEMURIANTEMPLE"; public override string SeerToken => "BAZAAR_SEER_LEMURIANTEMPLE"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 195f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/lemuriantemple/matLTSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/lemuriantemple/LTDioramaDisplay.prefab", "LAI_Scene_LemurianTemple"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/lemuriantemple/Weather, LemurianTemple.prefab"); val.transform.parent = display.transform; } } public class Limbo : LAIScene { public override string SceneNameToken => "MAP_LIMBO"; public override string SeerToken => "LAI_SEER_LIMBO"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/limbo/LimboDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(0f, -3.05f, 0f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/mysteryspace/matSkyboxMysterySpace.mat"); public override string MusicTrackName => "muSong21"; } public class Lobby : LAIScene { public static string[] PhysicsPropNames = new string[12] { "PropAnchor", "ExtinguisherMesh", "FolderMesh", "LaptopMesh (1)", "ChairPropAnchor", "ChairMesh", "ChairWeight", "PropAnchor (1)", "ExtinguisherMesh (1)", "ExtinguisherMesh (2)", "FolderMesh (1)", "LaptopMesh (2)" }; public static string[] MeshPropNames = new string[4] { "HANDTeaser", "HumanCrate1Mesh", "HumanCrate2Mesh", "HumanCanister1Mesh" }; public static GameObject MeshPropsRef; public static GameObject DirectionalLight; public override string SceneNameToken => "LAI_MAP_LOBBY"; public override string SeerToken => "LAI_SEER_LOBBY"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/Common/DefaultLobbyBackground.prefab"); public override Vector3 Position => Vector3.zero; public override Quaternion Rotation => Quaternion.identity; public override Vector3 Scale => Vector3.one; public override string MusicTrackName => "muLogbook"; public override string PreferredLayout => "Lobby_ROR2"; public override void Init() { base.Init(); LAIScene.onSceneLoaded = (Action)Delegate.Combine(LAIScene.onSceneLoaded, new Action(OnSceneLoaded)); } private void OnSceneLoaded(LAIScene scene) { if (LAISceneManager.chosenScene is Lobby && Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance)) { MeshPropsRef = ((Component)LAISceneManager.sceneInstance.transform.Find("MeshProps")).gameObject; DirectionalLight = ((Component)LAISceneManager.sceneInstance.transform.Find("Directional Light")).gameObject; HookMethods.UpdateDirectionalLight(); HookMethods.Hook_Lobby_HideProps(ConfigSetup.MeshProps.Value); HookMethods.Hook_Lobby_HidePhysicsProps(ConfigSetup.PhysicsProps.Value); } } } public class LobbyVoid : LAIScene { public override string SceneNameToken => "LAI_MAP_LOBBY_INFINITETOWER"; public override string SeerToken => "LAI_SEER_LOBBYVOID"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/DLC1/Common/LobbyBackgrounds/InfiniteTowerLobbyBackground.prefab"); public override Vector3 Position => Vector3.zero; public override Quaternion Rotation => Quaternion.identity; public override Vector3 Scale => Vector3.one; public override string MusicTrackName => "muMenuDLC1"; } public class Meridian : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_MERIDIAN"; public override string SeerToken => "BAZAAR_SEER_MERIDIAN"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/meridian/matSkyboxPM.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/meridian/PMDioramaDisplay.prefab", "LAI_Scene_Meridian"); ChildLocator val = display.AddComponent(); GameObject val2 = LAIScene.CloneFromAddressable("RoR2/DLC2/meridian/Weather, Meridian.prefab"); val2.transform.parent = display.transform; GameObject val3 = LAIScene.CloneFromAddressable("RoR2/DLC2/meridian/Assets/PMHead.prefab"); val3.transform.parent = display.transform; val3.transform.localScale = Vector3.one * 0.05f; val3.transform.rotation = Quaternion.Euler(330f, 180f, 0f); val3.transform.localPosition = new Vector3(-3f, 4f, 12f); ((Component)val3.transform.Find("Point Light")).gameObject.SetActive(false); Transform val4 = val3.transform.Find("meshPMEyesGlow"); ((Component)val4).gameObject.SetActive(false); Transform val5 = val3.transform.Find("meshPMCrownAuraBeams"); ((Component)val5).gameObject.SetActive(false); Transform val6 = val3.transform.Find("meshPMCrownGlow"); ((Component)val6).gameObject.SetActive(false); Transform val7 = val3.transform.Find("ColossusGoldEnergyDecal"); ((Component)val7).gameObject.SetActive(false); val.transformPairs = (NameTransformPair[])(object)new NameTransformPair[4] { new NameTransformPair { name = "eyeGlow", transform = val4 }, new NameTransformPair { name = "crownAuraBeams", transform = val5 }, new NameTransformPair { name = "crownGlow", transform = val6 }, new NameTransformPair { name = "goldDecal", transform = val7 } }; } public override void OnVoteStarted(LAIScene scene) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) base.OnVoteStarted(scene); if (scene.IsSceneOfType() && Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance)) { ChildLocator component = LAISceneManager.sceneInstance.GetComponent(); NameTransformPair[] transformPairs = component.transformPairs; foreach (NameTransformPair val in transformPairs) { ((Component)val.transform).gameObject.SetActive(true); } } } } public class Moon : LAIScene { public static GameObject MoonDioramaFinal; public static GameObject display; public override string SceneNameToken => "MAP_MOON"; public override string SeerToken => "BAZAAR_SEER_MOON"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -4.6f, 25f); public override Quaternion Rotation => Quaternion.Euler(0f, 90f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override string MusicTrackName => "muSong24"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/moon/MoonDioramaDissplay.prefab", "LAI_Scene_Moon"); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/moon/MoonSkyboxPrefab.prefab", display.transform); } } public class MysterySpace : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_MYSTERYSPACE"; public override string SeerToken => "LAI_SEER_MYSTERYSPACE"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -5f, 30f); public override Quaternion Rotation => Quaternion.Euler(0f, 345f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/mysteryspace/matSkyboxMysterySpace.mat"); public override string MusicTrackName => "muSong21"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/mysteryspace/MysteryspaceDioramaDisplay.prefab", "LAI_Scene_MysterySpace"); Transform val = display.transform.Find("Ring/Ruins/MSObelisk"); Object.Destroy((Object)(object)((Component)val).GetComponent()); LAIScene.CloneFromAddressable("RoR2/Base/mysteryspace/MSSkybox.prefab", display.transform); } public override void OnVoteStarted(LAIScene scene) { if (scene.IsSceneOfType()) { GameObject sceneInstance = LAISceneManager.sceneInstance; if (Object.op_Implicit((Object)(object)LAISceneManager.sceneInstance)) { ((Component)sceneInstance.transform.Find("Ring/Ruins/MSObelisk/Stage1FX/")).gameObject.SetActive(true); } } } } public class RescueShip : LAIScene { public static GameObject display; public override string SceneNameToken => "LAI_MAP_RESCUESHIP"; public override string SeerToken => "LAI_SEER_RESCUESHIP"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(-1f, 5.5f, 35.1f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override string MusicTrackName => "muSong24"; public override void Init() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/moon2/RescueshipMoon.prefab", "LAI_Scene_RescueShip"); ((Component)display.transform.Find("escapeship")).transform.localPosition = Vector3.zero; } } public class RootJungle : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_ROOTJUNGLE"; public override string SeerToken => "BAZAAR_SEER_ROOTJUNGLE"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -3.3f, 28.1f); public override Quaternion Rotation => Quaternion.Euler(0f, 345f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/rootjungle/skyboxJungle.mat"); public override string MusicTrackName => "muGameplayBase_09"; public override void Init() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/rootjungle/RootjungleDioramaDisplay.prefab", "LAI_Scene_RootJungle"); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/bazaar/Bazaar_Light.prefab", display.transform); ((Component)val.transform.Find("FireLODLevel")).gameObject.SetActive(false); GameObject gameObject = ((Component)val.transform.Find("Point Light")).gameObject; ((Behaviour)gameObject.GetComponent()).enabled = false; val.transform.localPosition = new Vector3(-4.4258f, 8.5f, -16.5173f); val.transform.localScale = Vector3.zero; } } public class ShipGraveyard : LAIScene { public override string SceneNameToken => "MAP_SHIPGRAVEYARD"; public override string SeerToken => "BAZAAR_SEER_SHIPGRAVEYARD"; public override GameObject BackgroundPrefab => LAIScene.LoadAsset("RoR2/Base/shipgraveyard/ShipgraveyardDioramaDisplay.prefab"); public override Vector3 Position => new Vector3(5f, -3f, 15f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/goldshores/matSkyboxGoldshores.mat"); public override string MusicTrackName => "muSong13"; } public class SkyMeadow : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_SKYMEADOW"; public override string SeerToken => "BAZAAR_SEER_SKYMEADOW"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -3f, 0f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/skymeadow/matSMSkybox.mat"); public override string MusicTrackName => "muSong14"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/skymeadow/SkyMeadowDioramaDisplay.prefab", "LAI_Scene_SkyMeadow"); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/skymeadow/SM_SkyboxPrefab.prefab", display.transform); } } public class SnowyForest : LAIScene { public override string SceneNameToken => "MAP_SNOWYFOREST"; public override string SeerToken => "BAZAAR_SEER_SNOWYFOREST"; public override GameObject BackgroundPrefab => Addressables.LoadAssetAsync((object)"RoR2/DLC1/snowyforest/SnowyForestDioramaDisplay.prefab").WaitForCompletion(); public override Vector3 Position => new Vector3(3.5f, -4.6f, 21f); public override Quaternion Rotation => Quaternion.Euler(0f, 210f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC1/snowyforest/matSkyboxSF.mat"); public override string MusicTrackName => "muGameplayDLC1_03"; } public class SulfurPools : LAIScene { public override string SceneNameToken => "MAP_SULFURPOOLS"; public override string SeerToken => "BAZAAR_SEER_SULFURPOOLS"; public override GameObject BackgroundPrefab => Addressables.LoadAssetAsync((object)"RoR2/DLC1/sulfurpools/SulfurpoolsDioramaDisplay.prefab").WaitForCompletion(); public override Vector3 Position => new Vector3(3.5f, -6f, 20f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC1/sulfurpools/matSkyboxSP.mat"); public override string MusicTrackName => "muGameplayDLC1_06"; } public class Village : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_VILLAGE"; public override string SeerToken => "BAZAAR_SEER_VILLAGE"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/village/Assets/matLVSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/village/LVDioramaDisplay.prefab", "LAI_Scene_Village"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/village/Weather, Village.prefab"); val.transform.parent = display.transform; } } public class VillageNight : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_VILLAGENIGHT"; public override string SeerToken => "BAZAAR_SEER_VILLAGENIGHT"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(2.5f, -5.25f, 24.5f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC2/villagenight/Assets/matLVnightSkybox.mat"); public override string MusicTrackName => "muGameplayDLC2_01"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/DLC2/villagenight/LVnightDioramaDisplay.prefab", "LAI_Scene_VillageNight"); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC2/villagenight/Weather, Villagenight.prefab"); val.transform.parent = display.transform; } } internal class VoidOceanFloor : LAIScene { public override string SceneNameToken => "LAI_MAP_VOIDOUTROFLOOR"; public override string SeerToken => "LAI_SEER_VOIDOCEANFLOOR"; public override GameObject BackgroundPrefab => SceneSetup.VoidOutroSet7; public override Vector3 Position => new Vector3(0f, -65.65f, 13f); public override Quaternion Rotation => Quaternion.Euler(358.0001f, 89.9999f, 349.9999f); public override Vector3 Scale => Vector3.one; public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC1/voidstage/matSkyboxVoidStage.mat"); public override string MusicTrackName => "muIntroCutscene"; } public class VoidRaid : LAIScene { public override string SceneNameToken => "MAP_VOIDRAID"; public override string SeerToken => "LAI_SEER_VOIDRAID"; public override GameObject BackgroundPrefab => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidraid/VoidRaidDioramaDisplay.prefab").WaitForCompletion(); public override Vector3 Position => new Vector3(5.5f, -2.8f, 20f); public override Quaternion Rotation => Quaternion.Euler(340f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC1/voidstage/matSkyboxVoidStage.mat"); public override string MusicTrackName => "muGameplayDLC1_08"; } public class VoidStage : LAIScene { public override string SceneNameToken => "MAP_VOIDSTAGE"; public override string SeerToken => "BAZAAR_SEER_VOIDSTAGE"; public override GameObject BackgroundPrefab => Addressables.LoadAssetAsync((object)"RoR2/DLC1/voidstage/VoidStageDiorama.prefab").WaitForCompletion(); public override Vector3 Position => new Vector3(-44.1364f, -20.5f, 55.4364f); public override Quaternion Rotation => Quaternion.Euler(0f, 260f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/DLC1/voidstage/matSkyboxVoidStage.mat"); public override string MusicTrackName => "muGameplayDLC1_08"; } public class WispGraveyard : LAIScene { public static GameObject display; public override string SceneNameToken => "MAP_WISPGRAVEYARD"; public override string SeerToken => "BAZAAR_SEER_WISPGRAVEYARD"; public override GameObject BackgroundPrefab => display; public override Vector3 Position => new Vector3(0f, -10.7f, 15f); public override Quaternion Rotation => Quaternion.Euler(0f, 0f, 0f); public override Vector3 Scale => new Vector3(1f, 1f, 1f); public override Material SkyboxOverride => LAIScene.LoadAsset("RoR2/Base/bazaar/matSkybox4.mat"); public override string MusicTrackName => "muFULLSong18"; public override void Init() { base.Init(); display = LAIScene.PrefabCloneFromAddressable("RoR2/Base/wispgraveyard/WispgraveyardDioramaDisplay.prefab", "LAI_Scene_WispGraveyard"); GameObject val = LAIScene.CloneFromAddressable("RoR2/Base/wispgraveyard/WPSkybox.prefab", display.transform); } } } namespace LobbyAppearanceImprovements.readme { public static class ReadmeController { public const string thing = "| {0} | {1} | {2} | {3} "; public static void Output() { StringBuilder stringBuilder = StringBuilderPool.RentStringBuilder(); foreach (KeyValuePair item in LAILayoutManager.layoutsDict) { StringBuilder stringBuilder2 = StringBuilderPool.RentStringBuilder(); LAILayout lAILayout = (LAILayout)Activator.CreateInstance(item.Value); foreach (KeyValuePair characterLayout in lAILayout.CharacterLayouts) { stringBuilder2.Append(characterLayout.Key + ", "); } string text = ((lAILayout.RequiredModGUIDs.Length == 0) ? "\ud83d\udd12" : ""); text += lAILayout.SceneName; stringBuilder.AppendLine($"| {text} | {lAILayout.SceneLayout} | {stringBuilder2.ToString()} | {lAILayout.ReadmeDescription} "); StringBuilderPool.ReturnStringBuilder(stringBuilder2); } Debug.Log((object)stringBuilder.ToString()); StringBuilderPool.ReturnStringBuilder(stringBuilder); } } } namespace LobbyAppearanceImprovements.Modules { public static class Mannequins { 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 SurvivorMannequinDioramaController.SetSlots += new hook_SetSlots(SurvivorMannequinDioramaController_SetSlots); } private static void SurvivorMannequinDioramaController_SetSlots(orig_SetSlots orig, SurvivorMannequinDioramaController self, SurvivorMannequinSlotController[] newMannequinSlots) { orig.Invoke(self, newMannequinSlots); } } } namespace LobbyAppearanceImprovements.MannequinLayouts { public abstract class BaseMannequinLayout { public struct TransformInfo { public Vector3 position; public Vector3 rotation; public Vector3 scale; public TransformInfo(Vector3 position, Vector3 rotation, Vector3 scale) { //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_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) this.position = position; this.rotation = rotation; this.scale = scale; } } public bool HasSetup = false; public abstract string NameToken { get; } public abstract string InternalName { get; } public virtual string Credit { get; } public abstract List MannequinTransforms { get; } public BaseMannequinLayout() { } public virtual void Init() { string name = GetType().Name; LAILogging.LogMessage(name + ".Init :: Setting up mannequin layout.", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); if (HasSetup) { LAILogging.LogMessage(name + ".Init :: Ran Init(), but has already set up!", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); } else { HasSetup = true; } } public void CreateMannequinLayout() { } public bool IsOfType() { return this is T; } public virtual void ModifyMannequin(GameObject mannequinGameObject) { } } public class Quadrant : BaseMannequinLayout { public override string NameToken => "QUADRANT"; public override string InternalName => "Quadrant"; public override List MannequinTransforms => new List { new TransformInfo(default(Vector3), default(Vector3), Vector3.one), new TransformInfo(default(Vector3), default(Vector3), Vector3.one), new TransformInfo(default(Vector3), default(Vector3), Vector3.one), new TransformInfo(default(Vector3), default(Vector3), Vector3.one) }; } } namespace LobbyAppearanceImprovements.Layouts { public class Any_Empty : LAILayout { public override string SceneLayout => "Any_Empty"; public override string SceneName => "Any"; public override string Author => "DestroyedClone"; public override string ReadmeDescription => "The designated blank layout."; public override string LayoutNameToken => "LAI_EMPTY"; public override Dictionary CharacterLayouts => new Dictionary(); } internal class CaptainsHelm_Default : LAILayout { public override string SceneLayout => "CaptainsHelm_Default"; public override string SceneName => "CaptainsHelm"; public override string Author => "DestroyedClone"; public override string LayoutNameToken => "LAI_LAYOUT_CAPTAINSHELM"; public override string ReadmeDescription => "Default layout for Captain's Helm"; public override Dictionary CharacterLayouts => new Dictionary(); public override Dictionary CharacterCameraSettings => new Dictionary { { "CaptainBody", new CameraSetting(60f, new Vector3(1.153385f, 2.327963f, 23f)) } }; } public abstract class LAILayout { public struct CameraSetting { public float fov { get; } public Vector3 position { get; } public Vector3 rotation { get; } public CameraSetting(float Fov = 60f, Vector3 Position = default(Vector3), Vector3 Rotation = default(Vector3)) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) fov = Fov; rotation = Rotation; position = Position; } } public class LAI_CharacterDisplay : MonoBehaviour { public string bodyName; public SurvivorDef survivorDef; public static Dictionary map = new Dictionary(); public string nameOfThis = ""; public string exposed = ""; public void Awake() { InstanceTracker.Add(this); } public void OnDestroy() { InstanceTracker.Remove(this); } public void Update() { //IL_0033: 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_005d: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) string[] obj = new string[5] { "{ \"", ((Object)((Component)this).gameObject).name, "\", new Vector3[] {", $"new Vector3({((Component)this).transform.localPosition.x}f, {((Component)this).transform.localPosition.y}f, {((Component)this).transform.localPosition.z}f), ", null }; Quaternion localRotation = ((Component)this).transform.localRotation; object arg = ((Quaternion)(ref localRotation)).eulerAngles.x; localRotation = ((Component)this).transform.localRotation; object arg2 = ((Quaternion)(ref localRotation)).eulerAngles.y; localRotation = ((Component)this).transform.localRotation; obj[4] = $"new Vector3({arg}f, {arg2}f, {((Quaternion)(ref localRotation)).eulerAngles.z}f)}} }},"; exposed = string.Concat(obj); } } public static Action onLayoutLoaded; public static Action onLayoutUnloaded; public bool HasSetup = false; public abstract string SceneLayout { get; } public abstract string SceneName { get; } public abstract string Author { get; } public virtual string LayoutNameToken { get; } public string LayoutTitleToken => Utility.IsNullOrWhiteSpace(LayoutNameToken) ? string.Empty : (LayoutNameToken + "_TITLE"); public virtual string ReadmeDescription { get; } public virtual string[] RequiredModGUIDs { get; } public abstract Dictionary CharacterLayouts { get; } public virtual Dictionary CharacterCameraSettings { get; } public LAILayout() { } public bool CanLoadLayout() { if (RequiredModGUIDs != null && RequiredModGUIDs.Length != 0) { string[] requiredModGUIDs = RequiredModGUIDs; foreach (string text in requiredModGUIDs) { if (!Chainloader.PluginInfos.ContainsKey(text)) { LAILogging.LogMessage("Refused to load layout \"" + SceneLayout + "\" because GUID \"" + text + "\" was not loaded!", ConfigSetup.LoggingStyle.UserShouldSee); return false; } } } return true; } public bool IsLayoutOfType() { return this is T; } public GameObject CreateLayout() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_004a: 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) GameObject val = new GameObject(); ((Object)val).name = "HOLDER: LAYOUT (" + SceneLayout + ")"; foreach (KeyValuePair characterLayout in CharacterLayouts) { Methods.CreateDisplay(characterLayout.Key, characterLayout.Value[0], characterLayout.Value[1], val.transform); } foreach (GameObject item in CreateAdditionalObjectsOnLoad()) { item.transform.parent = val.transform; } onLayoutLoaded?.Invoke(this); return val; } public virtual List CreateAdditionalObjectsOnLoad() { return new List(); } public virtual void Init() { LAILogging.LogMessage(SceneLayout + ".Init :: Setting up layout.", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); if (HasSetup) { LAILogging.LogMessage(SceneLayout + ".Init :: Ran Init(), but has already set up!", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); } else { HasSetup = true; } } public void OnDestroy() { onLayoutUnloaded?.Invoke(this); } } public class Lobby_ROR2 : LAILayout { public override string SceneLayout => "Lobby_ROR2"; public override string SceneName => "Lobby"; public override string Author => "DestroyedClone"; public override string LayoutNameToken => "LAI_LAYOUT_ROR2"; public override string ReadmeDescription => "Only the characters from RoR2"; public override Dictionary CharacterLayouts { get { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_018b: 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) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) Dictionary dictionary = new Dictionary(); dictionary.Add("Commando", (Vector3[])(object)new Vector3[2] { new Vector3(2.65f, 0.01f, 6f), new Vector3(0f, 240f, 0f) }); dictionary.Add("Bandit2", (Vector3[])(object)new Vector3[2] { new Vector3(3.79f, 0.01f, 11.5f), new Vector3(0f, 240f, 0f) }); dictionary.Add("Huntress", (Vector3[])(object)new Vector3[2] { new Vector3(4.8f, 1.43f, 15.36f), new Vector3(0f, 170f, 0f) }); dictionary.Add("Toolbot", (Vector3[])(object)new Vector3[2] { new Vector3(-0.21f, 0.15f, 20.84f), new Vector3(0f, 170f, 0f) }); dictionary.Add("Engi", (Vector3[])(object)new Vector3[2] { new Vector3(-2.58f, -0.01f, 19f), new Vector3(0f, 150f, 0f) }); dictionary.Add("Mage", (Vector3[])(object)new Vector3[2] { new Vector3(3.35f, 0.21f, 14.73f), new Vector3(0f, 220f, 0f) }); dictionary.Add("Merc", (Vector3[])(object)new Vector3[2] { new Vector3(-1.32f, 3.65f, 22.28f), new Vector3(0f, 180f, 0f) }); dictionary.Add("Treebot", (Vector3[])(object)new Vector3[2] { new Vector3(-6.51f, -0.11f, 22.93f), new Vector3(0f, 140f, 0f) }); dictionary.Add("Loader", (Vector3[])(object)new Vector3[2] { new Vector3(5.04f, 0f, 14.26f), new Vector3(0f, 220f, 0f) }); dictionary.Add("Croco", (Vector3[])(object)new Vector3[2] { new Vector3(5f, 3.59f, 22f), new Vector3(0f, 210f, 0f) }); dictionary.Add("Captain", (Vector3[])(object)new Vector3[2] { new Vector3(2.21f, 0.01f, 19.4f), new Vector3(0f, 190f, 0f) }); dictionary.Add("Railgunner", (Vector3[])(object)new Vector3[2] { new Vector3(1.3f, 3.6595f, 22.5774f), new Vector3(0f, 203f, 0f) }); dictionary.Add("VoidSurvivor", (Vector3[])(object)new Vector3[2] { new Vector3(3f, 0f, 5.5f), new Vector3(0f, 290f, 0f) }); dictionary.Add("Seeker", (Vector3[])(object)new Vector3[2] { new Vector3(-4f, 0f, 22f), new Vector3(0f, 170f, 0f) }); dictionary.Add("FalseSon", (Vector3[])(object)new Vector3[2] { new Vector3(5.2f, 0f, 9f), new Vector3(0f, 270f, 0f) }); dictionary.Add("Chef", (Vector3[])(object)new Vector3[2] { new Vector3(-6.2f, 0f, 18f), new Vector3(0f, 170f, 0f) }); return dictionary; } } public override Dictionary CharacterCameraSettings => new Dictionary { { "CommandoBody", new CameraSetting(60f, new Vector3(2.5f, 1.24f, 3f)) }, { "HuntressBody", new CameraSetting(60f, new Vector3(3f, 2.24f, 13.5f), new Vector3(0f, 35f, 0f)) }, { "ToolbotBody", new CameraSetting(60f, new Vector3(-0.5f, 1.74f, 16.5f)) }, { "EngiBody", new CameraSetting(60f, new Vector3(-2.5f, 1.24f, 15f)) }, { "MageBody", new CameraSetting(60f, new Vector3(3f, 1.24f, 12f)) }, { "MercBody", new CameraSetting(60f, new Vector3(-1.5f, 4.74f, 18.5f)) }, { "TreebotBody", new CameraSetting(60f, new Vector3(-5f, 0.24f, 20.5f), new Vector3(359.5351f, 322.6054f, 0f)) }, { "LoaderBody", new CameraSetting(60f, new Vector3(4.5f, 1.24f, 10.5f)) }, { "CrocoBody", new CameraSetting(60f, new Vector3(5f, 4.74f, 19f)) }, { "CaptainBody", new CameraSetting(60f, new Vector3(2f, 1.24f, 15f)) }, { "RailgunnerBody", new CameraSetting(60f, new Vector3(1f, 4.74f, 19f)) }, { "VoidSurvivorBody", new CameraSetting(60f, new Vector3(3f, 0.74f, 2.5f)) }, { "Bandit2Body", new CameraSetting(60f, new Vector3(3.5f, 1.74f, 9.5f)) }, { "SeekerBody", new CameraSetting(60f, new Vector3(-3.8f, 1.64f, 19.5f), new Vector3(0f, 350f, 0f)) }, { "FalseSonBody", new CameraSetting(60f, new Vector3(2.2f, 1.54f, 8.7f), new Vector3(0f, 80f, 0f)) }, { "ChefBody", new CameraSetting(60f, new Vector3(-5.2f, 1.24f, 15.5f), new Vector3(0f, 330f, 0f)) } }; } public class Moon_Default : LAILayout { public override string SceneLayout => "Moon_Default"; public override string SceneName => "Moon"; public override string Author => "DestroyedClone"; public override string ReadmeDescription => ""; public override string LayoutNameToken => "LAI_LAYOUT_MOONDEFAULT"; public override Dictionary CharacterLayouts => new Dictionary(); public override Dictionary CharacterCameraSettings => new Dictionary { { "CommandoBody", new CameraSetting(60f, new Vector3(0.89f, 2.3f, 14.35f), new Vector3(2.1f, 340.7f, 0f)) } }; public override List CreateAdditionalObjectsOnLoad() { //IL_0028: 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_0059: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) List list = new List(); GameObject val = LAIScene.CloneFromAddressable("RoR2/DLC1/itmoon/mdlBrotherConstellation.prefab"); val.transform.position = new Vector3(0f, -790f, 900f); val.transform.rotation = Quaternion.Euler(0f, 170f, 0f); val.transform.localScale = Vector3.one * 500f; list.Add(val); GameObject val2 = Object.Instantiate(Addressables.LoadAssetAsync((object)"RoR2/Junk/golemplains_trailer/DeadCommandoProp.prefab").WaitForCompletion()); val2.transform.position = new Vector3(-2f, 0.4f, 21.9f); list.Add(val2); return list; } } public class Moon_PaladinOnly : LAILayout { public static RuntimeAnimatorController gamingAnimatorController; public Vector3[][] statuePositionsAndRotations = new Vector3[8][] { (Vector3[])(object)new Vector3[2] { new Vector3(1.5f, 0.5f, 8f), new Vector3(0f, 270f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(-1.5f, 0.5f, 8f), new Vector3(0f, 90f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(1.5f, 0.5f, 16f), new Vector3(0f, 270f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(-1.5f, 0.5f, 16f), new Vector3(0f, 90f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(1.5f, 0.5f, 24f), new Vector3(0f, 270f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(-1.5f, 0.5f, 24f), new Vector3(0f, 90f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(1.5f, 0.5f, 32f), new Vector3(0f, 270f, 0f) }, (Vector3[])(object)new Vector3[2] { new Vector3(-1.5f, 0.5f, 32f), new Vector3(0f, 90f, 0f) } }; public override string SceneLayout => "Moon_PaladinOnly"; public override string SceneName => "Moon"; public override string Author => "DestroyedClone"; public override string LayoutNameToken => "LAI_LAYOUT_PALADINONLY"; public override string ReadmeDescription => "Based on the logo."; public override string[] RequiredModGUIDs => new string[1] { "com.rob.Paladin" }; public override Dictionary CharacterLayouts => new Dictionary(); public static GameObject StatueHolders { get; set; } public override Dictionary CharacterCameraSettings => new Dictionary { { "RobPaladinBody", new CameraSetting(60f, new Vector3(0f, 3.24f, -3f)) } }; public override List CreateAdditionalObjectsOnLoad() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)StatueHolders)) { SetupStatueAsPrefab(); } if ((int)SurvivorCatalog.FindSurvivorIndex("RobPaladin") < 0) { LAILogging.LogWarning("Couldn't find survivorDef for RobPaladin, but GUID is loaded? What's going on!?", ConfigSetup.LoggingStyle.None); return null; } List list = new List(); GameObject val = Methods.CreateDisplay("RobPaladin", new Vector3(0f, 0.5f, 5f), new Vector3(0f, 180f, 0f), null, addCollider: true); Animator component = val.GetComponent(); component.runtimeAnimatorController = gamingAnimatorController; EntityState.PlayAnimationOnAnimator(component, "Body", "Spawn", "Spawn.playbackRate", 3f, 0f); component.speed = 0f; list.Add(StatueHolders); list.Add(val); return list; } public override void Init() { base.Init(); } [SystemInitializer(new Type[] { typeof(SurvivorCatalog) })] public void SetupStatueAsPrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0038: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) SurvivorIndex val = SurvivorCatalog.FindSurvivorIndex("RobPaladin"); if ((int)val < 0) { Debug.Log((object)"Unable to init scene"); LAILogging.LogError("Moon_PaladinOnly.SetupStatueAsPrefab: Couldn't find survivorIndex for \"RobPaladin\", aborting.", ConfigSetup.LoggingStyle.ObscureSoOnlyDevSees); return; } Material sharedMaterial = ((Renderer)((Component)Addressables.LoadAssetAsync((object)"RoR2/Base/moon/MoonDioramaDissplay.prefab").WaitForCompletion().transform.Find("MoonBridgeCornerWithTerrain/Terrain")).GetComponent()).sharedMaterial; GameObject val2 = Methods.CreateDisplay("RobPaladin", Vector3.zero, Vector3.zero); ((Behaviour)val2.GetComponent()).enabled = false; ((Renderer)((Component)val2.transform.Find("meshPaladinDefault")).gameObject.GetComponent()).material = sharedMaterial; ((Renderer)((Component)val2.transform.Find("meshPaladinDefault_Cape")).gameObject.GetComponent()).material = sharedMaterial; ((Renderer)((Component)val2.transform.Find("meshPaladinDefault_Sword")).gameObject.GetComponent()).material = sharedMaterial; ((Component)val2.transform.Find("Armature/base")).gameObject.SetActive(false); ((Object)val2).name = "PaladinStatue"; val2.transform.position = new Vector3(0f, -50f, 0f); GameObject val3 = new GameObject("HOLDER: Statues"); Vector3[][] array = statuePositionsAndRotations; foreach (Vector3[] array2 in array) { GameObject val4 = Object.Instantiate(val2); val4.transform.parent = val3.transform; val4.transform.SetPositionAndRotation(array2[0], Quaternion.Euler(array2[1])); } StatueHolders = val3; gamingAnimatorController = SurvivorCatalog.GetSurvivorDef(val).bodyPrefab.GetComponentInChildren().runtimeAnimatorController; } } }