Decompiled source of WideEye v4.0.0
Mods/WideEye.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.Json; using System.Text.Json.Serialization; using BoneLib; using BoneLib.BoneMenu; using BoneLib.Notifications; using FieldInjector; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppMK.Glow.URP; using Il2CppOccaSoftware.Exposure.Runtime; using Il2CppSLZ.Bonelab; using Il2CppSLZ.Marrow; using Il2CppSLZ.Marrow.Pool; using Il2CppSLZ.Marrow.Warehouse; using Il2CppSystem.Collections.Generic; using Il2CppTMPro; using MelonLoader; using MelonLoader.Preferences; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Events; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; using WideEye.Behaviors; using WideEye.CameraManagers; using WideEye.Core; using WideEye.Data; using WideEye.Objects; using WideEye.UI; using WideEye.Utilities; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(Mod), "WideEye", "4.0.0", "HL2H0", null)] [assembly: MelonGame("Stress Level Zero", "BONELAB")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("WideEye")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("WideEye")] [assembly: AssemblyTitle("WideEye")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("3.1.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WideEye.Utilities { public static class Paths { private static string ResourcesFolder => Path.Combine(MelonEnvironment.GameRootDirectory, "UserData", "WideEye Resources"); public static string PresetsPath => Path.Combine(MelonEnvironment.GameRootDirectory, "UserData", "WideEye Resources", "Presets"); public static void InitFolders() { if (!Directory.Exists(ResourcesFolder)) { Directory.CreateDirectory(ResourcesFolder); } if (!Directory.Exists(PresetsPath)) { Directory.CreateDirectory(PresetsPath); } } } public static class SettingsUpdater { private static bool _currentHeadMeshState = true; private static bool _currentHairMeshState = true; public static void ResetToDefault(ModEnums.ResetType resetType) { //IL_006f: 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_00ba: 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) switch (resetType) { case ModEnums.ResetType.Fov: UpdateFOV(75f, syncElementValue: true, ModMenu.FOVSlider); break; case ModEnums.ResetType.Smoothing: UpdateSmoothing(0f, 0f, syncElementValue: true); break; case ModEnums.ResetType.RotationOffset: UpdateOffset(new Vector3(11f, 0f, 0f), ModEnums.OffsetType.Rotation, syncElementValue: true); break; case ModEnums.ResetType.PositionOffset: UpdateOffset(new Vector3(0f, 0f, 0f), ModEnums.OffsetType.Position, syncElementValue: true); break; case ModEnums.ResetType.MKGlow: UpdateMkGlow(enabled: true, syncElements: true); break; case ModEnums.ResetType.LensDistortion: UpdateLensDistortion(enabled: true, new Vector2(0.5f, 0.5f), 0.48f, 1f, 0.59f, 1f, syncElements: true); break; case ModEnums.ResetType.ChromaticAberration: UpdateChromaticAberration(enabled: true, 0.123f, syncElements: true); break; case ModEnums.ResetType.AutoExposure: UpdateAutoExposure(enabled: true, (AutoExposureAdaptationMode)0, 3f, 2.5f, 1.2f, -1.2f, 1f, (AutoExposureMeteringMaskMode)0, 2f, syncElements: true); break; case ModEnums.ResetType.All: UpdateFOV(75f, syncElementValue: true, ModMenu.FOVSlider); UpdateSmoothing(0f, 0f, syncElementValue: true); UpdateOffset(new Vector3(11f, 0f, 0f), ModEnums.OffsetType.Rotation, syncElementValue: true); UpdateOffset(new Vector3(0f, 0f, 0f), ModEnums.OffsetType.Position, syncElementValue: true); UpdateLensDistortion(enabled: true, new Vector2(0.5f, 0.5f), 0.48f, 1f, 0.59f, 1f, syncElements: true); UpdateChromaticAberration(enabled: true, 0.123f, syncElements: true); UpdateAutoExposure(enabled: true, (AutoExposureAdaptationMode)0, 3f, 2.5f, 1.2f, -1.2f, 1f, (AutoExposureMeteringMaskMode)0, 2f, syncElements: true); ((Behaviour)Mod.ScVolumeComponent).enabled = true; ModMenu.PostFXToggle.Value = true; break; } } public static void UpdateAllSettings() { UpdateFOV(ModMenu.FOVSlider.Value); UpdateOffset(ModEnums.OffsetType.Position); UpdateOffset(ModEnums.OffsetType.Rotation); TogglePostFX(enabled: true); UpdateChromaticAberration(); UpdateAutoExposure(); UpdateLensDistortion(); UpdateMkGlow(); UpdateSmoothing(); } public static void UpdateFOV(float fov, bool syncElementValue = false, FloatElement fovEle = null) { Mod.ScCameraComponent.fieldOfView = fov; if (TimelineHelper.UsingTimeline) { TimelineHelper.TimelineCamera.fieldOfView = fov; } if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } if (syncElementValue && fovEle != null) { fovEle.Value = fov; } } public static void TogglePostFX(bool enabled, bool syncElementValue = false) { ((Behaviour)Mod.ScVolumeComponent).enabled = enabled; if (TimelineHelper.UsingTimeline) { ((Behaviour)TimelineHelper.TimelineVolume).enabled = enabled; } if (syncElementValue) { ModMenu.PostFXToggle.Value = enabled; } if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } public static void ToggleAvatarMesh(ModEnums.MeshToggleType type) { switch (type) { case ModEnums.MeshToggleType.HeadMesh: _currentHeadMeshState = !_currentHeadMeshState; if (_currentHairMeshState) { Mod.PlayerArtComponent.EnableHead(); } else { Mod.PlayerArtComponent.DisableHead(); } { foreach (SkinnedMeshRenderer item in (Il2CppArrayBase<SkinnedMeshRenderer>)(object)Player.Avatar.headMeshes) { ((Renderer)item).enabled = _currentHeadMeshState; } break; } case ModEnums.MeshToggleType.HairMeshes: _currentHairMeshState = !_currentHairMeshState; if (_currentHairMeshState) { Mod.PlayerArtComponent.EnableHair(); } else { Mod.PlayerArtComponent.DisableHair(); } { foreach (SkinnedMeshRenderer item2 in (Il2CppArrayBase<SkinnedMeshRenderer>)(object)Player.Avatar.hairMeshes) { ((Renderer)item2).enabled = _currentHairMeshState; } break; } case ModEnums.MeshToggleType.HeasdMeshOffset: ((Behaviour)Mod.PlayerArtComponent).enabled = !((Behaviour)Mod.PlayerArtComponent).enabled; break; } } public static void UpdateOffset(Vector3 offset, ModEnums.OffsetType offsetType, bool syncElementValue = false) { //IL_0018: 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_0042: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_00a3: Unknown result type (might be due to invalid IL or missing references) switch (offsetType) { case ModEnums.OffsetType.Position: Mod.StTransform.localPosition = offset; if (syncElementValue) { ModMenu.XpOffset.Value = offset.x; ModMenu.YpOffset.Value = offset.y; ModMenu.ZpOffset.Value = offset.z; } break; case ModEnums.OffsetType.Rotation: Mod.StTransform.localRotation = Quaternion.Euler(offset); if (syncElementValue) { ModMenu.XrOffset.Value = offset.x; ModMenu.YrOffset.Value = offset.y; ModMenu.ZrOffset.Value = offset.z; } break; } } public static void UpdateOffset(ModEnums.OffsetType type) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) switch (type) { case ModEnums.OffsetType.Rotation: Mod.StTransform.localRotation = Quaternion.Euler(ModMenu.XrOffset.Value, ModMenu.YrOffset.Value, ModMenu.ZrOffset.Value); break; case ModEnums.OffsetType.Position: Mod.StTransform.localPosition = new Vector3(ModMenu.XpOffset.Value, ModMenu.YpOffset.Value, ModMenu.ZpOffset.Value); break; } if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } public static void UpdateSmoothing(float rotationSmoothingValue, float positionSmoothingValue, bool syncElementValue) { Mod.ScSmootherComponent.RotationalSmoothTime = rotationSmoothingValue; Mod.ScSmootherComponent.TranslationSmoothTime = positionSmoothingValue; if (TimelineHelper.UsingTimeline) { TimelineHelper.TimelineSmoothFollower.RotationalSmoothTime = rotationSmoothingValue; TimelineHelper.TimelineSmoothFollower.TranslationSmoothTime = positionSmoothingValue; } if (syncElementValue) { ModMenu.RSmoothing.Value = rotationSmoothingValue; ModMenu.PSmoothing.Value = positionSmoothingValue; } } public static void UpdateSmoothing() { Mod.ScSmootherComponent.RotationalSmoothTime = ModMenu.RSmoothing.Value; Mod.ScSmootherComponent.TranslationSmoothTime = ModMenu.PSmoothing.Value; if (TimelineHelper.UsingTimeline) { TimelineHelper.TimelineSmoothFollower.RotationalSmoothTime = ModMenu.RSmoothing.Value; TimelineHelper.TimelineSmoothFollower.TranslationSmoothTime = ModMenu.PSmoothing.Value; } if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } public static void UpdateMkGlow(bool enabled, bool syncElements) { ((VolumeComponent)Mod.MKGlowOverride).active = enabled; if (syncElements) { ModMenu.MkGlowEnabled.Value = enabled; } } public static void UpdateMkGlow() { ((VolumeComponent)Mod.MKGlowOverride).active = ModMenu.MkGlowEnabled.Value; if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } public static void UpdateLensDistortion(bool enabled, Vector2 center, float intensity, float scale, float xMulti, float yMulti, bool syncElements) { //IL_0017: 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_008d: Unknown result type (might be due to invalid IL or missing references) ((VolumeComponent)Mod.LensDistortionOverride).active = enabled; ((VolumeParameter<Vector2>)(object)Mod.LensDistortionOverride.center).value = center; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.intensity).value = intensity; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.scale).value = scale; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.xMultiplier).value = xMulti; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.yMultiplier).value = yMulti; if (syncElements) { ModMenu.LdEnabled.Value = enabled; ModMenu.LdCenterX.Value = center.x; ModMenu.LdCenterY.Value = center.y; ModMenu.LdIntensity.Value = intensity; ModMenu.LdScale.Value = scale; ModMenu.LdXMultiplier.Value = xMulti; ModMenu.LdYMultiplier.Value = yMulti; } } public static void UpdateLensDistortion() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) ((VolumeComponent)Mod.LensDistortionOverride).active = ModMenu.LdEnabled.Value; ((VolumeParameter<Vector2>)(object)Mod.LensDistortionOverride.center).value = new Vector2(ModMenu.LdCenterX.Value, ModMenu.LdCenterY.Value); ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.intensity).value = ModMenu.LdIntensity.Value; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.scale).value = ModMenu.LdScale.Value; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.xMultiplier).value = ModMenu.LdXMultiplier.Value; ((VolumeParameter<float>)(object)Mod.LensDistortionOverride.yMultiplier).value = ModMenu.LdYMultiplier.Value; if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } public static void UpdateChromaticAberration(bool enabled, float intensity, bool syncElements) { ((VolumeComponent)Mod.ChromaticAberrationOverride).active = enabled; ((VolumeParameter<float>)(object)Mod.ChromaticAberrationOverride.intensity).value = intensity; if (syncElements) { ModMenu.CaEnabled.Value = enabled; ModMenu.CaIntensity.Value = intensity; } } public static void UpdateChromaticAberration() { ((VolumeComponent)Mod.ChromaticAberrationOverride).active = ModMenu.CaEnabled.Value; ((VolumeParameter<float>)(object)Mod.ChromaticAberrationOverride.intensity).value = ModMenu.CaIntensity.Value; if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } public static void UpdateAutoExposure(bool enabled, AutoExposureAdaptationMode adaptationMode, float d2Ls, float evCompen, float evMax, float evMin, float l2Ds, AutoExposureMeteringMaskMode meteringMaskMode, float meteringProceduralFalloff, bool syncElements) { //IL_0017: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) ((VolumeComponent)Mod.AutoExposureOverride).active = enabled; ((VolumeParameter<AutoExposureAdaptationMode>)(object)Mod.AutoExposureOverride.adaptationMode).value = adaptationMode; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.darkToLightSpeed).value = d2Ls; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.evCompensation).value = evCompen; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.evMax).value = evMax; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.evMin).value = evMin; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.lightToDarkSpeed).value = l2Ds; ((VolumeParameter<AutoExposureMeteringMaskMode>)(object)Mod.AutoExposureOverride.meteringMaskMode).value = meteringMaskMode; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.meteringProceduralFalloff).value = meteringProceduralFalloff; if (syncElements) { ModMenu.AeEnabled.Value = enabled; ModMenu.AeAdaptationMode.Value = (Enum)(object)adaptationMode; ModMenu.AeD2Ls.Value = d2Ls; ModMenu.AeEvCompensation.Value = evCompen; ModMenu.AeEvMax.Value = evMax; ModMenu.AeEvMin.Value = evMin; ModMenu.AeL2Ds.Value = l2Ds; ModMenu.AeMeteringMaskMode.Value = (Enum)(object)meteringMaskMode; ModMenu.AeMeteringProceduralFalloff.Value = meteringProceduralFalloff; } } public static void UpdateAutoExposure() { //IL_002a: 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) ((VolumeComponent)Mod.AutoExposureOverride).active = ModMenu.AeEnabled.Value; ((VolumeParameter<AutoExposureAdaptationMode>)(object)Mod.AutoExposureOverride.adaptationMode).value = (AutoExposureAdaptationMode)(object)ModMenu.AeAdaptationMode.Value; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.darkToLightSpeed).value = ModMenu.AeD2Ls.Value; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.evCompensation).value = ModMenu.AeEvCompensation.Value; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.evMax).value = ModMenu.AeEvMax.Value; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.evMin).value = ModMenu.AeEvMin.Value; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.lightToDarkSpeed).value = ModMenu.AeL2Ds.Value; ((VolumeParameter<AutoExposureMeteringMaskMode>)(object)Mod.AutoExposureOverride.meteringMaskMode).value = (AutoExposureMeteringMaskMode)(object)ModMenu.AeMeteringMaskMode.Value; ((VolumeParameter<float>)(object)Mod.AutoExposureOverride.meteringProceduralFalloff).value = ModMenu.AeMeteringProceduralFalloff.Value; if (ModPreferences.AutoSave) { ModPreferences.SavePreferences(); } } } public class TimelineHelper { private static bool _createdMenu; public static bool UsingTimeline { get; set; } public static Camera TimelineCamera { get; set; } public static SmoothFollower TimelineSmoothFollower { get; set; } public static Volume TimelineVolume { get; set; } public static void StartHelper() { if (CheckForTimeline()) { UsingTimeline = true; CreateMenuOptions(); GetTimelineObjects(); } } private static bool CheckForTimeline() { MelonBase val = MelonBase.FindMelon("Timeline", "notnotnotswipez"); return val != null; } private static void GetTimelineObjects() { GameObject val = GameObject.Find("Spectator Camera(Clone)/Spectator Camera"); if ((Object)(object)val != (Object)null) { TimelineCamera = val.GetComponent<Camera>(); TimelineSmoothFollower = val.GetComponent<SmoothFollower>(); TimelineVolume = val.GetComponent<Volume>(); } SettingsUpdater.UpdateAllSettings(); } private static void CreateMenuOptions() { //IL_0016: 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_003b: Unknown result type (might be due to invalid IL or missing references) if (!_createdMenu) { Page val = ModMenu.ModSettingsPage.CreatePage("Timeline", Color.yellow, 0, true); val.CreateFunction("Timeline Helper is Running", Color.green, (Action)null); val.CreateFunction("Update Timeline References", Color.yellow, (Action)GetTimelineObjects); _createdMenu = true; } } } } namespace WideEye.UI { public static class ModMenu { public static Page MainPage; public static FloatElement FOVSlider { get; private set; } private static Page OffsetPage { get; set; } private static Page SupportPage { get; set; } private static Page AutoExposurePage { get; set; } private static Page PostFXPage { get; set; } private static Page SmoothingPage { get; set; } private static Page AvatarMeshesPage { get; set; } private static Page LensDistortionPage { get; set; } private static Page ViewPage { get; set; } private static Page PresetsPage { get; set; } private static Page HandheldCameraPage { get; set; } private static Page FreeCamPage { get; set; } public static FloatElement PSmoothing { get; private set; } public static FloatElement RSmoothing { get; private set; } public static EnumElement ViewMode { get; private set; } public static BoolElement ChangeViewOnSpawn { get; private set; } public static EnumElement AudioSource { get; private set; } public static FloatElement FreeCamSpeed { get; private set; } public static FloatElement FreeCamFastSpeed { get; private set; } public static FloatElement FreeCamSensitivity { get; private set; } public static FloatElement FreeCamSmoothSpeed { get; private set; } public static FloatElement FreeCamScrollSensitivity { get; private set; } public static FloatElement FreeCamScrollSmoothing { get; private set; } public static BoolElement FreeCamShowIndicator { get; private set; } public static FloatElement XrOffset { get; private set; } public static FloatElement YrOffset { get; private set; } public static FloatElement ZrOffset { get; private set; } public static FloatElement XpOffset { get; private set; } public static FloatElement YpOffset { get; private set; } public static FloatElement ZpOffset { get; private set; } public static BoolElement PostFXToggle { get; private set; } private static Page MkGlowPage { get; set; } public static BoolElement MkGlowEnabled { get; private set; } private static Page ChromaticAberrationPage { get; set; } public static BoolElement CaEnabled { get; private set; } public static FloatElement CaIntensity { get; private set; } public static BoolElement LdEnabled { get; private set; } public static FloatElement LdCenterX { get; private set; } public static FloatElement LdCenterY { get; private set; } public static FloatElement LdIntensity { get; private set; } public static FloatElement LdScale { get; private set; } public static FloatElement LdXMultiplier { get; private set; } public static FloatElement LdYMultiplier { get; private set; } public static BoolElement AeEnabled { get; private set; } public static EnumElement AeAdaptationMode { get; private set; } public static FloatElement AeD2Ls { get; private set; } public static FloatElement AeEvCompensation { get; private set; } public static FloatElement AeEvMax { get; private set; } public static FloatElement AeEvMin { get; private set; } public static FloatElement AeL2Ds { get; private set; } public static EnumElement AeMeteringMaskMode { get; private set; } public static FloatElement AeMeteringProceduralFalloff { get; private set; } public static Page ModSettingsPage { get; set; } public static BoolElement AutoSave { get; private set; } public static IntElement StartupDelay { get; private set; } public static void CreatePresetsPage() { foreach (KeyValuePair<string, WideEyeSettings> preset in PresetsManager.Presets) { WideEyeSettings value = preset.Value; CreateOnePresetPage(value.Name); } } public static void CreateOnePresetPage(string presetName) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) WideEyeSettings wideEyeSettings = PresetsManager.Presets[presetName]; Page page = PresetsPage.CreatePage(presetName, Color.white, 0, true); if (wideEyeSettings != null) { page.CreateFunction("Save Current Setting To This", Color.cyan, (Action)delegate { PresetsManager.SavePreset(presetName); }); page.CreateFunction("Load This Preset", Color.green, (Action)delegate { PresetsManager.ApplyPreset(presetName); }); page.CreateFunction("View Path", Color.yellow, (Action)delegate { PresetsManager.ViewPath(presetName); }); Page val = page.CreatePage("Values [Experimental]", Color.magenta, 0, true); PropertyInfo[] properties = wideEyeSettings.GetType().GetProperties(); foreach (PropertyInfo propertyInfo in properties) { val.CreateFunction($"{propertyInfo.Name} : {propertyInfo.GetValue(wideEyeSettings)}", Color.white, (Action)null); } page.CreateFunction("Delete This Preset", Color.red, (Action)delegate { //IL_0040: 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) PresetsManager.DeletePreset(presetName); page.Name = "[Deleted] " + presetName; page.RemoveAll(); page.CreateFunction("This Preset Has Been Deleted", Color.white, (Action)null); page.CreateFunction("Page will be deleted in next game launch", Color.white, (Action)null); }); } else { page.Color = Color.red; page.CreateFunction("An Error Occured", Color.white, (Action)null); page.CreateFunction("While Loading Preset", Color.white, (Action)null); } } public static WideEyeSettings GetValues() { //IL_0058: 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_0101: 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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) return new WideEyeSettings { FOV = FOVSlider.Value, PosSmoothing = PSmoothing.Value, RotSmoothing = RSmoothing.Value, PosOffset = new SerializableVector3(new Vector3(XpOffset.Value, YpOffset.Value, ZpOffset.Value)), RotOffset = new SerializableVector3(new Vector3(XrOffset.Value, YrOffset.Value, ZrOffset.Value)), PostFXEnabled = PostFXToggle.Value, MkGlowEnabled = MkGlowEnabled.Value, CaEnabled = CaEnabled.Value, CaIntensity = CaIntensity.Value, LdEnabled = LdEnabled.Value, LdCenter = new SerializableVector2(new Vector2(LdCenterX.Value, LdCenterY.Value)), LdIntensity = LdIntensity.Value, LdScale = LdScale.Value, LdMultiplyer = new SerializableVector2(new Vector2(LdXMultiplier.Value, LdYMultiplier.Value)), AeEnabled = AeEnabled.Value, AeAdaptationMode = (AutoExposureAdaptationMode)(object)AeAdaptationMode.Value, AeD2Ls = AeD2Ls.Value, AeEvComp = AeEvCompensation.Value, AeEvMax = AeEvMax.Value, AeEvMin = AeEvMin.Value, AeL2ds = AeL2Ds.Value, AeMeetringMaskMode = (AutoExposureMeteringMaskMode)(object)AeMeteringMaskMode.Value, AeMeetaeMeteringProceduralFalloff = AeMeteringProceduralFalloff.Value }; } public static void SetupBoneMenu() { //IL_0020: 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_0088: 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_00ec: 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_0142: 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_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_0748: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Unknown result type (might be due to invalid IL or missing references) //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0979: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Unknown result type (might be due to invalid IL or missing references) //IL_09e2: Unknown result type (might be due to invalid IL or missing references) //IL_0a2f: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0ac9: Unknown result type (might be due to invalid IL or missing references) //IL_0ae5: Unknown result type (might be due to invalid IL or missing references) //IL_0b19: Unknown result type (might be due to invalid IL or missing references) //IL_0b4d: Unknown result type (might be due to invalid IL or missing references) //IL_0b69: Unknown result type (might be due to invalid IL or missing references) //IL_0bb6: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c27: Unknown result type (might be due to invalid IL or missing references) //IL_0c31: Expected O, but got Unknown //IL_0c3c: Unknown result type (might be due to invalid IL or missing references) //IL_0c59: Unknown result type (might be due to invalid IL or missing references) //IL_0c78: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0cc9: Unknown result type (might be due to invalid IL or missing references) //IL_0cfd: Unknown result type (might be due to invalid IL or missing references) //IL_0d1f: Unknown result type (might be due to invalid IL or missing references) //IL_0d3b: Unknown result type (might be due to invalid IL or missing references) //IL_0d7a: Unknown result type (might be due to invalid IL or missing references) //IL_0db9: Unknown result type (might be due to invalid IL or missing references) //IL_0dd5: Unknown result type (might be due to invalid IL or missing references) //IL_0e0f: Unknown result type (might be due to invalid IL or missing references) //IL_0e3f: Unknown result type (might be due to invalid IL or missing references) //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e9f: Unknown result type (might be due to invalid IL or missing references) //IL_0ebb: Unknown result type (might be due to invalid IL or missing references) //IL_0f08: Unknown result type (might be due to invalid IL or missing references) //IL_0f55: Unknown result type (might be due to invalid IL or missing references) //IL_0fa2: Unknown result type (might be due to invalid IL or missing references) //IL_0fef: Unknown result type (might be due to invalid IL or missing references) //IL_103c: Unknown result type (might be due to invalid IL or missing references) //IL_1089: Unknown result type (might be due to invalid IL or missing references) //IL_10c3: Unknown result type (might be due to invalid IL or missing references) //IL_10df: Unknown result type (might be due to invalid IL or missing references) //IL_1120: Unknown result type (might be due to invalid IL or missing references) //IL_115a: Unknown result type (might be due to invalid IL or missing references) //IL_118e: Unknown result type (might be due to invalid IL or missing references) //IL_11be: Unknown result type (might be due to invalid IL or missing references) //IL_11ee: Unknown result type (might be due to invalid IL or missing references) //IL_1222: Unknown result type (might be due to invalid IL or missing references) //IL_123e: Unknown result type (might be due to invalid IL or missing references) //IL_1272: Unknown result type (might be due to invalid IL or missing references) //IL_12a6: Unknown result type (might be due to invalid IL or missing references) //IL_12da: Unknown result type (might be due to invalid IL or missing references) MainPage = Page.Root.CreatePage("WideEye", new Color(0.474f, 0.314f, 0.98f), 0, true); FOVSlider = MainPage.CreateFloat("FOV", Color.cyan, 72f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate(float value) { SettingsUpdater.UpdateFOV(value); }); MainPage.CreateFunction("Reset To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.Fov); }); MainPage.CreateFunction("Save Preferences", Color.green, (Action)ModPreferences.SavePreferences); PostFXPage = MainPage.CreatePage("Post-Processing", Color.yellow, 0, true); PostFXToggle = PostFXPage.CreateBool("Enabled", Color.yellow, true, (Action<bool>)delegate(bool value) { SettingsUpdater.TogglePostFX(value); }); MkGlowPage = PostFXPage.CreatePage("MKGlow", Color.white, 0, true); MkGlowEnabled = MkGlowPage.CreateBool("Enabled", Color.cyan, true, (Action<bool>)delegate { SettingsUpdater.UpdateMkGlow(); }); MkGlowPage.CreateFunction("More Features are coming soon!", Color.white, (Action)null); MkGlowPage.CreateFunction("Reset To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.MKGlow); }); LensDistortionPage = PostFXPage.CreatePage("Lens Distortion", Color.white, 0, true); LdEnabled = LensDistortionPage.CreateBool("Enabled", Color.cyan, true, (Action<bool>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LdCenterX = LensDistortionPage.CreateFloat("Center X", Color.red, 0.5f, 0.1f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LdCenterY = LensDistortionPage.CreateFloat("Center Y", Color.green, 0.5f, 0.1f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LdIntensity = LensDistortionPage.CreateFloat("Intensity", Color.white, 0.48f, 0.01f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LdScale = LensDistortionPage.CreateFloat("Scale", Color.white, 1f, 0.1f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LdXMultiplier = LensDistortionPage.CreateFloat("X Multiplier", Color.red, 0.59f, 0.01f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LdYMultiplier = LensDistortionPage.CreateFloat("Y Multiplier", Color.green, 1f, 0.01f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateLensDistortion(); }); LensDistortionPage.CreateFunction("Reset To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.LensDistortion); }); ChromaticAberrationPage = PostFXPage.CreatePage("ChromaticAberration", Color.white, 0, true); CaEnabled = ChromaticAberrationPage.CreateBool("Enabled", Color.cyan, true, (Action<bool>)delegate { SettingsUpdater.UpdateChromaticAberration(); }); CaIntensity = ChromaticAberrationPage.CreateFloat("Intensity", Color.white, 0.123f, 0.01f, 0f, 1f, (Action<float>)delegate { SettingsUpdater.UpdateChromaticAberration(); }); ChromaticAberrationPage.CreateFunction("Reset To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.ChromaticAberration); }); AutoExposurePage = PostFXPage.CreatePage("AutoExposure", Color.white, 0, true); AeEnabled = AutoExposurePage.CreateBool("Enabled", Color.cyan, true, (Action<bool>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeAdaptationMode = AutoExposurePage.CreateEnum("Adaptation Mode", Color.white, (Enum)(object)(AutoExposureAdaptationMode)0, (Action<Enum>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeD2Ls = AutoExposurePage.CreateFloat("Dark To Light Speed", Color.white, 3f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeEvCompensation = AutoExposurePage.CreateFloat("EV Compensation", Color.white, 2.5f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeEvMax = AutoExposurePage.CreateFloat("EV Max", Color.white, 1.2f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeEvMin = AutoExposurePage.CreateFloat("EV Min", Color.white, -1.2f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeL2Ds = AutoExposurePage.CreateFloat("Light To Dark Speed", Color.white, 1f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AeMeteringMaskMode = AutoExposurePage.CreateEnum("Metering Mask Mode", Color.white, (Enum)(object)(AutoExposureMeteringMaskMode)0, (Action<Enum>)null); AeMeteringProceduralFalloff = AutoExposurePage.CreateFloat("Metering Procedural Falloff", Color.white, 2f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateAutoExposure(); }); AutoExposurePage.CreateFunction("Reset To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.AutoExposure); }); AvatarMeshesPage = MainPage.CreatePage("Avatar Meshes Toggles", Color.yellow, 0, true); AvatarMeshesPage.CreateFunction("Toggle Head Mesh Offset", Color.cyan, (Action)delegate { SettingsUpdater.ToggleAvatarMesh(ModEnums.MeshToggleType.HeasdMeshOffset); }); AvatarMeshesPage.CreateFunction("Toggle Head Meshes", Color.white, (Action)delegate { SettingsUpdater.ToggleAvatarMesh(ModEnums.MeshToggleType.HeadMesh); }); AvatarMeshesPage.CreateFunction("Toggle Hair Meshes", Color.white, (Action)delegate { SettingsUpdater.ToggleAvatarMesh(ModEnums.MeshToggleType.HairMeshes); }); AvatarMeshesPage.CreateFunction("-------------------", Color.white, (Action)null); AvatarMeshesPage.CreateFunction("Note: You might need to", Color.yellow, (Action)null); AvatarMeshesPage.CreateFunction("Press the button twice", Color.yellow, (Action)null); OffsetPage = MainPage.CreatePage("Offset", Color.white, 0, true); XrOffset = OffsetPage.CreateFloat("X Rotation Offset", Color.red, 11f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateOffset(ModEnums.OffsetType.Rotation); }); YrOffset = OffsetPage.CreateFloat("Y Rotation Offset", Color.green, 0f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateOffset(ModEnums.OffsetType.Rotation); }); ZrOffset = OffsetPage.CreateFloat("Z Rotation Offset", Color.blue, 0f, 1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateOffset(ModEnums.OffsetType.Rotation); }); ((Element)OffsetPage.CreateFunction("--------------------", Color.white, (Action)null)).SetProperty((ElementProperties)1); XpOffset = OffsetPage.CreateFloat("X Position Offset", Color.red, 0f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateOffset(ModEnums.OffsetType.Position); }); YpOffset = OffsetPage.CreateFloat("Y Position Offset", Color.green, 0f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateOffset(ModEnums.OffsetType.Position); }); ZpOffset = OffsetPage.CreateFloat("Z Position Offset", Color.blue, 0f, 0.1f, float.MinValue, float.MaxValue, (Action<float>)delegate { SettingsUpdater.UpdateOffset(ModEnums.OffsetType.Position); }); ((Element)OffsetPage.CreateFunction(" -------------------- ", Color.white, (Action)null)).SetProperty((ElementProperties)1); OffsetPage.CreateFunction("Reset Position", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.PositionOffset); }); OffsetPage.CreateFunction("Reset Rotation", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.RotationOffset); }); SmoothingPage = MainPage.CreatePage("Smoothing", Color.white, 0, true); PSmoothing = SmoothingPage.CreateFloat("Position Smoothing", Color.white, 0f, 1f, float.MinValue, 2.1474836E+09f, (Action<float>)delegate { SettingsUpdater.UpdateSmoothing(); }); RSmoothing = SmoothingPage.CreateFloat("Rotation Smoothing", Color.white, 0f, 1f, float.MinValue, 2.1474836E+09f, (Action<float>)delegate { SettingsUpdater.UpdateSmoothing(); }); SmoothingPage.Add((Element)new FunctionElement("Reset To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.Smoothing); })); PresetsPage = MainPage.CreatePage("Presets", Color.magenta, 0, true); StringElement presetInput = PresetsPage.CreateString("Preset Name", Color.white, "", (Action<string>)null); PresetsPage.CreateFunction("Create Preset", Color.green, (Action)delegate { PresetsManager.CreatePreset(presetInput.Value); }); PresetsPage.CreateFunction("Refresh Presets", Color.cyan, (Action)PresetsManager.RefreshPresetList); PresetsPage.CreateFunction("Open Presets Folder", Color.yellow, (Action)delegate { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_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_0031: 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_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_004d: Expected O, but got Unknown Process.Start("explorer.exe", Paths.PresetsPath); Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Opened the presets folder in desktop"), Type = (NotificationType)3, PopupLength = 2f }); }); ((Element)PresetsPage.CreateFunction("--------------------", Color.white, (Action)null)).SetProperty((ElementProperties)1); CreatePresetsPage(); ViewPage = MainPage.CreatePage("View", Color.cyan, 0, true); ViewMode = ViewPage.CreateEnum("View Mode", Color.white, (Enum)ModEnums.ViewMode.Head, (Action<Enum>)delegate(Enum v) { CameraController.UpdateView((ModEnums.ViewMode)(object)v); }); AudioSource = ViewPage.CreateEnum("Audio Source", Color.white, (Enum)ModEnums.AudioSource.Head, (Action<Enum>)delegate(Enum v) { CameraController.UpdateAudioSource((ModEnums.AudioSource)(object)v); }); HandheldCameraPage = ViewPage.CreatePage("Handheld Camera Settings", Color.white, 0, true); ChangeViewOnSpawn = HandheldCameraPage.CreateBool("Change View On Spawn", Color.yellow, true, (Action<bool>)delegate(bool v) { ModPreferences.ChangeViewOnSpawn = v; }); HandheldCameraPage.CreateFunction("Spawn Camera [Client Side]", Color.green, (Action)HandheldCameraManager.SpawnHandheldCamera); HandheldCameraPage.CreateFunction("Teleport Camera", Color.cyan, (Action)HandheldCameraManager.TeleportHandheldCamera); HandheldCameraPage.CreateFunction("Destroy Camera [Client Side]", Color.red, (Action)HandheldCameraManager.DestroyHandheldCamera); FreeCamPage = ViewPage.CreatePage("FreeCam Settings", Color.white, 0, true); FreeCamSpeed = FreeCamPage.CreateFloat("Move Speed", Color.white, 3f, 1f, 0f, float.MaxValue, (Action<float>)delegate(float v) { FreeCamManager.MoveSpeed = v; }); FreeCamFastSpeed = FreeCamPage.CreateFloat("Fast Move Speed", Color.white, 7f, 1f, 0f, float.MaxValue, (Action<float>)delegate(float v) { FreeCamManager.FastMoveSpeed = v; }); FreeCamSensitivity = FreeCamPage.CreateFloat("Mouse Sensitivity", Color.white, 3f, 1f, 0f, float.MaxValue, (Action<float>)delegate(float v) { FreeCamManager.Sensitivity = v; }); FreeCamSmoothSpeed = FreeCamPage.CreateFloat("Smooth Speed", Color.white, 10f, 1f, 0f, float.MaxValue, (Action<float>)delegate(float v) { FreeCamManager.SmoothSpeed = v; }); FreeCamScrollSensitivity = FreeCamPage.CreateFloat("Scroll Sensitivity", Color.white, 15f, 1f, 0f, float.MaxValue, (Action<float>)delegate(float v) { FreeCamManager.ScrollSensitivity = v; }); FreeCamScrollSmoothing = FreeCamPage.CreateFloat("Scroll Smoothing", Color.white, 10f, 1f, 0f, float.MaxValue, (Action<float>)delegate(float v) { FreeCamManager.ScrollSmoothing = v; }); FreeCamShowIndicator = FreeCamPage.CreateBool("Show Indicator", Color.white, true, (Action<bool>)delegate(bool v) { FreeCamManager.ShowIndicator = v; }); ModSettingsPage = MainPage.CreatePage("Mod Settings", Color.green, 0, true); StartupDelay = ModSettingsPage.CreateInt("Startup Delay (Seconds)", Color.cyan, 5, 1, 2, int.MaxValue, (Action<int>)delegate(int v) { ModPreferences.StartupDelay = v; }); AutoSave = ModSettingsPage.CreateBool("Auto Save", Color.magenta, false, (Action<bool>)delegate(bool v) { ModPreferences.AutoSave = v; }); ModSettingsPage.CreateFunction("Reset All To Default", Color.red, (Action)delegate { SettingsUpdater.ResetToDefault(ModEnums.ResetType.All); }); ModSettingsPage.CreateFunction("Load Preferences", Color.green, (Action)ModPreferences.LoadPreferences); ModSettingsPage.CreateFunction("Clear All Preferences", Color.red, (Action)ModPreferences.ClearPreferences); ModSettingsPage.CreateFunction("Get Camera", Color.red, (Action)delegate { SpectatorCameraManager.GetSpectatorCamera(isAuto: false); }); SupportPage = ModSettingsPage.CreatePage("Support", Color.white, 0, true); SupportPage.CreateFunction("Open GitHub Issues", Color.white, (Action)delegate { //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_0017: 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_0021: 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_0033: 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_0048: Expected O, but got Unknown Application.OpenURL("https://github.com/HL2H0/WideEye/issues"); Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Opened the GitHub issues page for WideEye On Desktop"), Type = (NotificationType)3, PopupLength = 2f }); }); SupportPage.CreateFunction("Discord", Color.blue, (Action)delegate { //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_0017: 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_0021: 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_0033: 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_0048: Expected O, but got Unknown GUIUtility.systemCopyBuffer = "@hiiiiiiiiiiiiiiiiii"; Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Copied Discord Tag to Clipboard, You can paste it in Discord"), Type = (NotificationType)3, PopupLength = 2f }); }); SupportPage.CreateFunction("Support me on Ko-Fi", Color.magenta, (Action)delegate { //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_0017: 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_0021: 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_0033: 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_0048: Expected O, but got Unknown Application.OpenURL("https://ko-fi.com/hl2h0"); Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Opened Ko-Fi Page On Desktop"), Type = (NotificationType)3, PopupLength = 2f }); }); SupportPage.CreateFunction("Version : 4.0.0", Color.white, (Action)null); } } } namespace WideEye.Objects { public class SerializableVector2 { public float X { get; set; } public float Y { get; set; } public SerializableVector2() { } public SerializableVector2(Vector2 vector2) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) X = vector2.x; Y = vector2.y; } public Vector2 ToVector2() { //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_0015: Unknown result type (might be due to invalid IL or missing references) return new Vector2(X, Y); } public override string ToString() { return $"X : {X}\nY : {Y}"; } } public class SerializableVector3 { public float X { get; set; } public float Y { get; set; } public float Z { get; set; } public SerializableVector3() { } public SerializableVector3(Vector3 vector3) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) X = vector3.x; Y = vector3.y; Z = vector3.z; } public Vector3 ToVector3() { //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_001b: Unknown result type (might be due to invalid IL or missing references) return new Vector3(X, Y, Z); } public override string ToString() { return $"X : {X}\nY : {Y}\nZ : {Z}"; } } } namespace WideEye.Data { public static class ModPreferences { public static bool AutoSave; private static MelonPreferences_Category _categWideEye; private static MelonPreferences_Entry<float> _fov; private static MelonPreferences_Entry<bool> _postFX; private static MelonPreferences_Entry<Vector3> _rotationOffset; private static MelonPreferences_Entry<Vector3> _positionOffset; private static MelonPreferences_Entry<float> _rotationSmoothing; private static MelonPreferences_Entry<float> _positionSmoothing; private static MelonPreferences_Entry<bool> _autoSave; private static MelonPreferences_Entry<int> _startupDelay; private static MelonPreferences_Entry<bool> _changeViewOnSpawn; private static MelonPreferences_Entry<bool> _handheldAudioSource; private static MelonPreferences_Entry<float> _freeCamSpeed; private static MelonPreferences_Entry<float> _freeCamFastSpeed; private static MelonPreferences_Entry<float> _freeCamSensitivity; private static MelonPreferences_Entry<float> _freeCamSmoothSpeed; private static MelonPreferences_Entry<float> _freeCamScrollSensitivity; private static MelonPreferences_Entry<float> _freeCamScrollSmoothing; private static MelonPreferences_Entry<bool> _freecamIndicator; private static MelonPreferences_Category _categPfxMk; private static MelonPreferences_Entry<bool> _mkEnabled; private static MelonPreferences_Category _categPfxLd; private static MelonPreferences_Entry<bool> _ldEnabled; private static MelonPreferences_Entry<Vector2> _ldCenter; private static MelonPreferences_Entry<float> _ldIntensity; private static MelonPreferences_Entry<float> _ldScale; private static MelonPreferences_Entry<float> _ldXMultiplier; private static MelonPreferences_Entry<float> _ldYMultiplier; private static MelonPreferences_Category _categPfxCa; private static MelonPreferences_Entry<bool> _caEnabled; private static MelonPreferences_Entry<float> _caIntensity; private static MelonPreferences_Category _categPfxAe; private static MelonPreferences_Entry<bool> _aeEnabled; private static MelonPreferences_Entry<AutoExposureAdaptationMode> _aeAdaptationMode; private static MelonPreferences_Entry<float> _aeD2Ls; private static MelonPreferences_Entry<float> _aeEvCompensation; private static MelonPreferences_Entry<float> _aeEvMax; private static MelonPreferences_Entry<float> _aeEvMin; private static MelonPreferences_Entry<float> _aeL2Ds; private static MelonPreferences_Entry<AutoExposureMeteringMaskMode> _aeMeteringMask; private static MelonPreferences_Entry<float> _aeMetProcedFalloff; public static int StartupDelay { get { return _startupDelay.Value; } set { _startupDelay.Value = value; } } public static bool ChangeViewOnSpawn { get { return _changeViewOnSpawn.Value; } set { _changeViewOnSpawn.Value = value; } } public static void CreatePreferences() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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) _categWideEye = MelonPreferences.CreateCategory("WideEye"); _fov = _categWideEye.CreateEntry<float>("Fov", 75f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _postFX = _categWideEye.CreateEntry<bool>("PostFX", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _rotationOffset = _categWideEye.CreateEntry<Vector3>("RotationOffset", new Vector3(11f, 0f, 0f), (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _positionOffset = _categWideEye.CreateEntry<Vector3>("PositionOffset", Vector3.zero, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _rotationSmoothing = _categWideEye.CreateEntry<float>("RotationSmoothing", 0f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _positionSmoothing = _categWideEye.CreateEntry<float>("PositionSmoothing", 0f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _startupDelay = _categWideEye.CreateEntry<int>("StartupDelay", 5, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _autoSave = _categWideEye.CreateEntry<bool>("AutoSave", false, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freeCamSpeed = _categWideEye.CreateEntry<float>("FreeCamSpeed", 3f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freeCamFastSpeed = _categWideEye.CreateEntry<float>("FreeCamFastSpeed", 7f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freeCamSensitivity = _categWideEye.CreateEntry<float>("FreeCamSensitivity", 3f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freeCamSmoothSpeed = _categWideEye.CreateEntry<float>("FreeCamSmoothSpeed", 10f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freeCamScrollSensitivity = _categWideEye.CreateEntry<float>("FreeCamScrollSensitivity", 15f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freeCamScrollSmoothing = _categWideEye.CreateEntry<float>("FreeCamScrollSmoothing", 10f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _freecamIndicator = _categWideEye.CreateEntry<bool>("FreeCamIndicator", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _changeViewOnSpawn = _categWideEye.CreateEntry<bool>("ChangeViewOnSpawn", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _handheldAudioSource = _categWideEye.CreateEntry<bool>("Handheld AudioSource", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _categPfxMk = MelonPreferences.CreateCategory("WideEye_PostFX_MKGlow"); _mkEnabled = _categPfxMk.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _categPfxLd = MelonPreferences.CreateCategory("WideEye_PostFX_LensDistortion"); _ldEnabled = _categPfxLd.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _ldCenter = _categPfxLd.CreateEntry<Vector2>("Center", new Vector2(0.5f, 0.5f), (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _ldIntensity = _categPfxLd.CreateEntry<float>("Intensity", 0.48f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _ldScale = _categPfxLd.CreateEntry<float>("Scale", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _ldXMultiplier = _categPfxLd.CreateEntry<float>("xMultiplier", 0.59f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _ldYMultiplier = _categPfxLd.CreateEntry<float>("yMultiplier", 0.59f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _categPfxCa = MelonPreferences.CreateCategory("WideEye_PostFX_ChromaticAberration"); _caEnabled = _categPfxCa.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _caIntensity = _categPfxCa.CreateEntry<float>("Intensity", 0.123f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _categPfxAe = MelonPreferences.CreateCategory("WideEye_PostFX_AutoExposure"); _aeEnabled = _categPfxAe.CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeAdaptationMode = _categPfxAe.CreateEntry<AutoExposureAdaptationMode>("AdaptationMode", (AutoExposureAdaptationMode)0, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeD2Ls = _categPfxAe.CreateEntry<float>("DarkToLightSpeed", 3f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeEvCompensation = _categPfxAe.CreateEntry<float>("evCompensation", 2.5f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeEvMax = _categPfxAe.CreateEntry<float>("evMax", 1.2f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeEvMin = _categPfxAe.CreateEntry<float>("evMin", -1.2f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeL2Ds = _categPfxAe.CreateEntry<float>("LightToDarkSpeed", 1f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeMeteringMask = _categPfxAe.CreateEntry<AutoExposureMeteringMaskMode>("MeteringMaskMode", (AutoExposureMeteringMaskMode)0, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); _aeMetProcedFalloff = _categPfxAe.CreateEntry<float>("MeteringProceduralFalloff", 2f, (string)null, (string)null, false, false, (ValueValidator)null, (string)null); } public static void LoadPreferences() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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) //IL_01df: Unknown result type (might be due to invalid IL or missing references) SettingsUpdater.UpdateFOV(_fov.Value, syncElementValue: true, ModMenu.FOVSlider); SettingsUpdater.TogglePostFX(_postFX.Value, syncElementValue: true); ModMenu.PostFXToggle.Value = _postFX.Value; SettingsUpdater.UpdateOffset(_rotationOffset.Value, ModEnums.OffsetType.Rotation, syncElementValue: true); SettingsUpdater.UpdateOffset(_positionOffset.Value, ModEnums.OffsetType.Position, syncElementValue: true); SettingsUpdater.UpdateSmoothing(_rotationSmoothing.Value, _positionSmoothing.Value, syncElementValue: true); ModMenu.ChangeViewOnSpawn.Value = _changeViewOnSpawn.Value; ModMenu.AutoSave.Value = _autoSave.Value; AutoSave = _autoSave.Value; FreeCamManager.MoveSpeed = _freeCamSpeed.Value; FreeCamManager.FastMoveSpeed = _freeCamFastSpeed.Value; FreeCamManager.Sensitivity = _freeCamSensitivity.Value; FreeCamManager.SmoothSpeed = _freeCamSmoothSpeed.Value; FreeCamManager.ScrollSensitivity = _freeCamScrollSensitivity.Value; FreeCamManager.ScrollSmoothing = _freeCamScrollSmoothing.Value; FreeCamManager.ShowIndicator = _freecamIndicator.Value; SettingsUpdater.UpdateMkGlow(_mkEnabled.Value, syncElements: true); SettingsUpdater.UpdateLensDistortion(_ldEnabled.Value, _ldCenter.Value, _ldIntensity.Value, _ldScale.Value, _ldXMultiplier.Value, _ldYMultiplier.Value, syncElements: true); SettingsUpdater.UpdateChromaticAberration(_caEnabled.Value, _caIntensity.Value, syncElements: true); SettingsUpdater.UpdateAutoExposure(_aeEnabled.Value, _aeAdaptationMode.Value, _aeD2Ls.Value, _aeEvCompensation.Value, _aeEvMax.Value, _aeEvMin.Value, _aeL2Ds.Value, _aeMeteringMask.Value, _aeMetProcedFalloff.Value, syncElements: true); MelonLogger.Msg(ConsoleColor.Green, "Loaded Preferences."); } public static void SavePreferences() { //IL_004e: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown _fov.Value = ModMenu.FOVSlider.Value; _postFX.Value = ModMenu.PostFXToggle.Value; _rotationOffset.Value = new Vector3(ModMenu.XrOffset.Value, ModMenu.YrOffset.Value, ModMenu.ZrOffset.Value); _positionOffset.Value = new Vector3(ModMenu.XpOffset.Value, ModMenu.YpOffset.Value, ModMenu.ZpOffset.Value); _rotationSmoothing.Value = ModMenu.RSmoothing.Value; _positionSmoothing.Value = ModMenu.PSmoothing.Value; _startupDelay.Value = ModMenu.StartupDelay.Value; _changeViewOnSpawn.Value = ModMenu.ChangeViewOnSpawn.Value; _autoSave.Value = ModMenu.AutoSave.Value; _freeCamSpeed.Value = ModMenu.FreeCamSpeed.Value; _freeCamFastSpeed.Value = ModMenu.FreeCamFastSpeed.Value; _freeCamSensitivity.Value = ModMenu.FreeCamSensitivity.Value; _freeCamSmoothSpeed.Value = ModMenu.FreeCamSmoothSpeed.Value; _freeCamScrollSensitivity.Value = ModMenu.FreeCamScrollSensitivity.Value; _freeCamScrollSmoothing.Value = ModMenu.FreeCamScrollSmoothing.Value; _mkEnabled.Value = ModMenu.MkGlowEnabled.Value; _ldEnabled.Value = ModMenu.LdEnabled.Value; _ldCenter.Value = new Vector2(ModMenu.LdCenterX.Value, ModMenu.LdCenterY.Value); _ldIntensity.Value = ModMenu.LdIntensity.Value; _ldScale.Value = ModMenu.LdScale.Value; _ldXMultiplier.Value = ModMenu.LdXMultiplier.Value; _ldYMultiplier.Value = ModMenu.LdYMultiplier.Value; _caEnabled.Value = ModMenu.CaEnabled.Value; _caIntensity.Value = ModMenu.CaIntensity.Value; _aeEnabled.Value = ModMenu.AeEnabled.Value; _aeAdaptationMode.Value = (AutoExposureAdaptationMode)(object)ModMenu.AeAdaptationMode.Value; _aeD2Ls.Value = ModMenu.AeD2Ls.Value; _aeEvCompensation.Value = ModMenu.AeEvCompensation.Value; _aeEvMax.Value = ModMenu.AeEvMax.Value; _aeEvMin.Value = ModMenu.AeEvMin.Value; _aeL2Ds.Value = ModMenu.AeL2Ds.Value; _aeMeteringMask.Value = (AutoExposureMeteringMaskMode)(object)ModMenu.AeMeteringMaskMode.Value; _aeMetProcedFalloff.Value = ModMenu.AeMeteringProceduralFalloff.Value; _categWideEye.SaveToFile(false); _categPfxLd.SaveToFile(false); _categPfxCa.SaveToFile(false); _categPfxAe.SaveToFile(false); if (!AutoSave) { Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Saved Preferences"), Type = (NotificationType)3, PopupLength = 2f }); MelonLogger.Msg(ConsoleColor.Green, "Saved Preferences."); } } public static void ClearPreferences() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_009d: 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) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown List<MelonPreferences_Entry> list = _categWideEye.Entries.Concat(_categPfxLd.Entries).Concat(_categPfxCa.Entries).Concat(_categPfxAe.Entries) .Concat(_categPfxMk.Entries) .ToList(); foreach (MelonPreferences_Entry item in list) { item.ResetToDefault(); } LoadPreferences(); Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Cleared All Preferences"), Type = (NotificationType)3, PopupLength = 2f }); MelonLogger.Msg(ConsoleColor.Green, "Done!, Cleared All Preferences"); } } public static class PresetsManager { public static Dictionary<string, WideEyeSettings> Presets = new Dictionary<string, WideEyeSettings>(); private static JsonSerializerOptions _options = new JsonSerializerOptions { WriteIndented = true, ReferenceHandler = ReferenceHandler.Preserve }; public static void LoadPresets() { string[] files = Directory.GetFiles(Paths.PresetsPath, "*.json"); string[] array = files; foreach (string text in array) { try { WideEyeSettings wideEyeSettings = JsonSerializer.Deserialize<WideEyeSettings>(File.ReadAllText(text)); if (wideEyeSettings != null) { Presets.Add(wideEyeSettings.Name, wideEyeSettings); if (wideEyeSettings.Version != "4.0.0") { wideEyeSettings.MkGlowEnabled = true; } MelonLogger.Msg("Loaded Preset: " + wideEyeSettings.Name); } else { MelonLogger.Error("Preset " + text + " Couldn't be Loaded"); } } catch (Exception ex) { MelonLogger.Error($"Preset \"{text}\" Is Corrupted\nError Message {ex.Message}\n"); } } } public static void ApplyPreset(string presetName) { //IL_0040: 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_0094: 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_00d6: Unknown result type (might be due to invalid IL or missing references) WideEyeSettings wideEyeSettings = Presets[presetName]; if (wideEyeSettings != null) { SettingsUpdater.UpdateFOV(wideEyeSettings.FOV, syncElementValue: true); SettingsUpdater.UpdateSmoothing(wideEyeSettings.RotSmoothing, wideEyeSettings.PosSmoothing, syncElementValue: true); SettingsUpdater.UpdateOffset(wideEyeSettings.RotOffset.ToVector3(), ModEnums.OffsetType.Rotation); SettingsUpdater.UpdateOffset(wideEyeSettings.PosOffset.ToVector3(), ModEnums.OffsetType.Position); SettingsUpdater.TogglePostFX(wideEyeSettings.PostFXEnabled, syncElementValue: true); SettingsUpdater.UpdateMkGlow(wideEyeSettings.MkGlowEnabled, syncElements: true); SettingsUpdater.UpdateChromaticAberration(wideEyeSettings.CaEnabled, wideEyeSettings.CaIntensity, syncElements: true); SettingsUpdater.UpdateAutoExposure(wideEyeSettings.AeEnabled, wideEyeSettings.AeAdaptationMode, wideEyeSettings.AeD2Ls, wideEyeSettings.AeEvComp, wideEyeSettings.AeEvMax, wideEyeSettings.AeEvMin, wideEyeSettings.AeL2ds, wideEyeSettings.AeMeetringMaskMode, wideEyeSettings.AeMeetaeMeteringProceduralFalloff, syncElements: true); SettingsUpdater.UpdateLensDistortion(wideEyeSettings.LdEnabled, wideEyeSettings.LdCenter.ToVector2(), wideEyeSettings.LdIntensity, wideEyeSettings.LdScale, wideEyeSettings.LdMultiplyer.X, wideEyeSettings.LdMultiplyer.Y, syncElements: true); MelonLogger.Msg("Applied Preset: " + presetName); } } public static void SavePreset(string presetName) { if (Presets.ContainsKey(presetName)) { WideEyeSettings values = ModMenu.GetValues(); Presets[presetName] = values; string contents = JsonSerializer.Serialize(values, _options); string path = Path.Combine(Paths.PresetsPath, presetName + ".json"); File.WriteAllText(path, contents); MelonLogger.Msg("Saved Preset: " + presetName); } } public static void RefreshPresetList() { string[] files = Directory.GetFiles(Paths.PresetsPath, "*.json"); List<string> list = files.Select(Path.GetFileNameWithoutExtension).ToList(); foreach (string item in list) { if (!Presets.ContainsKey(item)) { WideEyeSettings wideEyeSettings = JsonSerializer.Deserialize<WideEyeSettings>(File.ReadAllText(Path.Combine(Paths.PresetsPath, item + ".json"))); if (wideEyeSettings != null) { Presets.Add(item, wideEyeSettings); MelonLogger.Msg("Loaded Preset: " + item); ModMenu.CreateOnePresetPage(item); } else { MelonLogger.Error("Preset " + item + " Couldn't be Loaded"); } } } } public static void ViewPath(string presetName) { string text = Path.Combine(Paths.PresetsPath, presetName + ".json"); if (File.Exists(text)) { MelonLogger.Msg("Path: " + text); ProcessStartInfo startInfo = new ProcessStartInfo("explorer.exe", "/select, \"" + text + "\""); Process.Start(startInfo); } } public static void CreatePreset(string presetName) { presetName = presetName.ToLower(); WideEyeSettings values = ModMenu.GetValues(); Presets.Add(presetName, values); values.Version = "4.0.0"; values.Name = presetName; string contents = JsonSerializer.Serialize(values, _options); string path = Path.Combine(Paths.PresetsPath, presetName + ".json"); File.WriteAllText(path, contents); ModMenu.CreateOnePresetPage(presetName); MelonLogger.Msg("Created Preset: " + presetName); } public static void DeletePreset(string presetName) { if (Presets.ContainsKey(presetName)) { Presets.Remove(presetName); string path = Path.Combine(Paths.PresetsPath, presetName + ".json"); if (File.Exists(path)) { File.Delete(path); } MelonLogger.Msg("Deleted Preset: " + presetName); } } } public static class ResourcesManager { public static GameObject FreeCamIndicatorPrefab; public static bool PalletInstalled; public static bool Loaded => Object.op_Implicit((Object)(object)FreeCamIndicatorPrefab); public static void Init() { SerialisationHandler.Inject<CustomGripEvents>(0); SerialisationHandler.Inject<FreeCam>(0); SerialisationHandler.Inject<HandheldCamera>(0); string text = "WideEye.Resources.md_resources.bundle"; AssetBundle val = HelperMethods.LoadEmbeddedAssetBundle(Assembly.GetExecutingAssembly(), text); FreeCamIndicatorPrefab = HelperMethods.LoadPersistentAsset<GameObject>(val, "FreeCamIndicator"); } public static void CheckPallet() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_016c: Expected O, but got Unknown PalletReference val = new PalletReference("HL2H0.WideEye"); Version version = new Version(1, 0, 0); AssetWarehouse instance = AssetWarehouse.Instance; List<Pallet> pallets = instance.GetPallets(); Enumerator<Pallet> enumerator = pallets.GetEnumerator(); while (enumerator.MoveNext()) { Pallet current = enumerator.Current; if (!(((Scannable)current).Barcode != ((ScannableReference)val).Barcode)) { Version version2 = new Version(current.Version); if (version2 < version) { MelonLogger.Error($"WideEye pallet version {version2} is too old. Minimum required version is {version}."); return; } MelonLogger.Msg($"Found WideEye pallet version {version2}."); PalletInstalled = true; } } if (!PalletInstalled) { MelonLogger.Error("WideEye pallet not found in AssetWarehouse."); Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Error"), Message = NotificationText.op_Implicit("WideEye pallet not found or outdated\nPlease install the WideEye pallet from Mod.io then reload the level"), Type = (NotificationType)2, PopupLength = 5f }); } } } public class WideEyeSettings { public string Name { get; set; } public string Version { get; set; } public float FOV { get; set; } public float PosSmoothing { get; set; } public float RotSmoothing { get; set; } public SerializableVector3 PosOffset { get; set; } public SerializableVector3 RotOffset { get; set; } public bool PostFXEnabled { get; set; } public bool MkGlowEnabled { get; set; } public bool CaEnabled { get; set; } public float CaIntensity { get; set; } public bool LdEnabled { get; set; } public SerializableVector2 LdCenter { get; set; } public float LdIntensity { get; set; } public float LdScale { get; set; } public SerializableVector2 LdMultiplyer { get; set; } public bool AeEnabled { get; set; } public AutoExposureAdaptationMode AeAdaptationMode { get; set; } public float AeD2Ls { get; set; } public float AeEvComp { get; set; } public float AeEvMax { get; set; } public float AeEvMin { get; set; } public float AeL2ds { get; set; } public AutoExposureMeteringMaskMode AeMeetringMaskMode { get; set; } public float AeMeetaeMeteringProceduralFalloff { get; set; } public AutoExposureMode AeMode { get; set; } } } namespace WideEye.Core { public static class BuildInfo { public const string Name = "WideEye"; public const string Version = "4.0.0"; public const string Author = "HL2H0"; } public class Mod : MelonMod { [CompilerGenerated] private sealed class <StartWideEye>d__14 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float waitTime; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <StartWideEye>d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0078: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_009d: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(waitTime); <>1__state = 1; return true; case 1: <>1__state = -1; SpectatorCameraManager.GetSpectatorCamera(isAuto: true); FreeCamManager.Init(); ModPreferences.LoadPreferences(); ResourcesManager.CheckPallet(); TimelineHelper.StartHelper(); if (!ResourcesManager.Loaded || !ResourcesManager.PalletInstalled) { return false; } Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("WideEye Has Launched Without errors (="), Type = (NotificationType)3, PopupLength = 2f }); 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 static PlayerAvatarArt PlayerArtComponent; public static GameObject ScGameObject; public static GameObject StGameObject; public static Camera ScCameraComponent; public static SmoothFollower ScSmootherComponent; public static Transform StTransform; public static Volume ScVolumeComponent; public static MKGlow MKGlowOverride; public static LensDistortion LensDistortionOverride; public static ChromaticAberration ChromaticAberrationOverride; public static AutoExposure AutoExposureOverride; public static bool FoundCamera; public override void OnInitializeMelon() { Paths.InitFolders(); ResourcesManager.Init(); ModPreferences.CreatePreferences(); PresetsManager.LoadPresets(); ModMenu.SetupBoneMenu(); Hooking.OnLevelUnloaded += BoneLib_OnLevelUnloaded; Hooking.OnUIRigCreated += BoneLib_OnUIRigCreated; ((MelonBase)this).LoggerInstance.Msg("WideEye 4.0.0 Has Been Initialized."); } private void BoneLib_OnUIRigCreated() { MelonCoroutines.Start(StartWideEye(ModPreferences.StartupDelay)); MelonLogger.Msg(ConsoleColor.Green, "UI Rig Created, Trying To Get Camera..."); } [IteratorStateMachine(typeof(<StartWideEye>d__14))] private static IEnumerator StartWideEye(float waitTime) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <StartWideEye>d__14(0) { waitTime = waitTime }; } private void BoneLib_OnLevelUnloaded() { FoundCamera = false; if (TimelineHelper.UsingTimeline) { TimelineHelper.UsingTimeline = false; } if (HandheldCameraManager.Found) { HandheldCameraManager.ActiveHandheldCamera = null; ModMenu.AudioSource.Value = ModEnums.AudioSource.Head; ModMenu.ViewMode.Value = ModEnums.ViewMode.Head; } } } public static class ModEnums { public enum OffsetType { Position, Rotation } public enum ResetType { Fov, Smoothing, RotationOffset, PositionOffset, MKGlow, LensDistortion, ChromaticAberration, AutoExposure, All } public enum ViewMode { Head, Handheld, FreeCam } public enum MeshToggleType { HeadMesh, HairMeshes, HeasdMeshOffset } public enum AudioSource { Head, Handheld } } } namespace WideEye.CameraManagers { public static class CameraController { public static void UpdateView(ModEnums.ViewMode viewMode, bool syncElements = false) { //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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_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_00ce: Expected O, but got Unknown //IL_0170: 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) switch (viewMode) { case ModEnums.ViewMode.Head: Mod.ScSmootherComponent.targetTransform = Mod.StTransform; if (TimelineHelper.UsingTimeline) { TimelineHelper.TimelineSmoothFollower.targetTransform = Mod.StTransform; } if (HandheldCameraManager.Found) { HandheldCameraManager.ActiveScript.SyncCamera = null; } SettingsUpdater.UpdateFOV(ModMenu.FOVSlider.Value); FreeCamManager.FreeCamObject.SetActive(false); break; case ModEnums.ViewMode.Handheld: HandheldCameraManager.FindHandheldCamera(); if (!HandheldCameraManager.Found) { Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Error"), Message = NotificationText.op_Implicit("Handheld camera not spawned\nPlease spawn the camera first"), Type = (NotificationType)2, PopupLength = 3f }); } Mod.ScSmootherComponent.targetTransform = HandheldCameraManager.ActiveScript.cameraTarget; if (TimelineHelper.UsingTimeline) { TimelineHelper.TimelineSmoothFollower.targetTransform = HandheldCameraManager.ActiveScript.cameraTarget; } HandheldCameraManager.ActiveScript.SyncCamera = Mod.ScCameraComponent; SettingsUpdater.UpdateFOV(HandheldCameraManager.ActiveScript.FOV); FreeCamManager.FreeCamObject.SetActive(false); break; case ModEnums.ViewMode.FreeCam: Mod.ScSmootherComponent.targetTransform = FreeCamManager.FreeCamObject.transform; if (HandheldCameraManager.Found) { HandheldCameraManager.ActiveScript.SyncCamera = null; } FreeCamManager.FreeCamObject.transform.position = Player.Head.position; FreeCamManager.FreeCamObject.transform.rotation = Player.Head.rotation; FreeCamManager.FreeCamObject.SetActive(true); break; } if (syncElements) { ModMenu.ViewMode.Value = viewMode; } } public static void UpdateAudioSource(ModEnums.AudioSource audioSource, bool syncElements = false) { switch (audioSource) { case ModEnums.AudioSource.Head: if (HandheldCameraManager.Found) { ((Behaviour)HandheldCameraManager.ActiveScript.audioListener).enabled = false; } break; case ModEnums.AudioSource.Handheld: if (HandheldCameraManager.Found) { ((Behaviour)HandheldCameraManager.ActiveScript.audioListener).enabled = true; } break; } if (syncElements) { ModMenu.AudioSource.Value = audioSource; } } } public static class FreeCamManager { private static FreeCam _freeCam; private static GameObject _indicator; public static GameObject FreeCamObject { get; private set; } public static float MoveSpeed { get { return _freeCam.moveSpeed; } set { _freeCam.moveSpeed = value; } } public static float FastMoveSpeed { get { return _freeCam.fastMoveSpeed; } set { _freeCam.fastMoveSpeed = value; } } public static float Sensitivity { get { return _freeCam.sensitivity; } set { _freeCam.sensitivity = value; } } public static float SmoothSpeed { get { return _freeCam.smoothSpeed; } set { _freeCam.smoothSpeed = value; } } public static float ScrollSensitivity { get { return _freeCam.scrollSensitivity; } set { _freeCam.scrollSensitivity = value; } } public static float ScrollSmoothing { get { return _freeCam.scrollSmoothing; } set { _freeCam.scrollSmoothing = value; } } public static bool ShowIndicator { get { return _indicator.activeSelf; } set { _indicator.SetActive(value); } } public static void Init() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown FreeCamObject = new GameObject("[WideEye] FreeCam"); _indicator = Object.Instantiate<GameObject>(ResourcesManager.FreeCamIndicatorPrefab, FreeCamObject.transform); _freeCam = FreeCamObject.AddComponent<FreeCam>(); FreeCamObject.SetActive(false); _indicator.SetActive(false); } } public static class HandheldCameraManager { public static GameObject ActiveHandheldCamera; public static HandheldCamera ActiveScript; public static bool Found => Object.op_Implicit((Object)(object)ActiveHandheldCamera); public static void FindHandheldCamera() { if (Found) { return; } try { ActiveHandheldCamera = GameObject.Find("Handheld Camera [0]"); if (!((Object)(object)ActiveHandheldCamera == (Object)null)) { ActiveScript = ActiveHandheldCamera.GetComponent<HandheldCamera>(); if (!((Object)(object)ActiveScript == (Object)null)) { ActiveScript.SyncCamera = Mod.ScCameraComponent; } } } catch (Exception value) { MelonLogger.Error($"Failed to find Handheld Camera : {value}"); } } public static void SpawnHandheldCamera() { //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_0018: 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_0025: 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) Transform head = Player.Head; HelperMethods.SpawnCrate("HL2H0.WideEye.Spawnable.WideEyeHandheldCamera", head.position + head.forward, default(Quaternion), Vector3.one, false, (Action<GameObject>)null, (Action<GameObject>)null); } public static void DestroyHandheldCamera() { if (Found) { AssetSpawner.Despawn(ActiveHandheldCamera.GetComponent<Poolee>()); Object.Destroy((Object)(object)ActiveHandheldCamera); ActiveHandheldCamera = null; CameraController.UpdateView(ModEnums.ViewMode.Head); } } public static void TeleportHandheldCamera() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_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 (Found) { Vector3 position = Player.Head.position + Player.Head.forward * 0.5f; ActiveHandheldCamera.transform.position = position; } } } public static class SpectatorCameraManager { public static void GetSpectatorCamera(bool isAuto) { //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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0047: Expected O, but got Unknown //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) //IL_0136: 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_0140: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown if (HelperMethods.IsAndroid()) { Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Error"), Message = NotificationText.op_Implicit("WideEye doesn't work with Quest"), Type = (NotificationType)2, PopupLength = 3f }); MelonLogger.Error("WideEye doesn't work with Quest"); } else { if (Mod.FoundCamera) { return; } Mod.ScGameObject = GameObject.Find("GameplaySystems [0]/DisabledContainer/Spectator Camera/Spectator Camera"); Mod.StGameObject = GameObject.Find("RigManager(bonelab) [0]/VRControllerRig/TrackingSpace/Headset/Spectator Target"); if (!Object.op_Implicit((Object)(object)Mod.ScGameObject) || !Object.op_Implicit((Object)(object)Mod.StGameObject)) { string text = (isAuto ? "Couldn't find the camera automatically.\nChange startup delay then reload the map or use the manual button." : "Couldn't find the camera.\nPlease use the manual button to find it."); Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Error"), Message = NotificationText.op_Implicit(text), Type = (NotificationType)2, PopupLength = 5f }); MelonLogger.Error(isAuto ? "Couldn't find the camera automatically" : "Couldn't find the camera"); } else if (!Mod.FoundCamera) { if (!Mod.ScGameObject.active) { Notifier.Send(new Notification { Title = NotificationText.op_Implicit("WideEye | Warning"), Message = NotificationText.op_Implicit("Spectator Camera is not active.\nChange the spectator mode to \"Fish Eye\" "), Type = (NotificationType)1, PopupLength = 5f }); MelonLogger.Warning("Spectator Mode isn't set to \"Fish Eye\"Change it so WideEye can work"); } InitializeComponents(); HandleCameraFound(isAuto); Mod.FoundCamera = true; } } } private static void InitializeComponents() { Mod.PlayerArtComponent = ((Component)Player.ControllerRig).gameObject.GetComponent<PlayerAvatarArt>(); Mod.StTransform = Mod.StGameObject.GetComponent<Transform>(); Mod.ScSmootherComponent = Mod.ScGameObject.GetComponent<SmoothFollower>(); Mod.ScVolumeComponent = Mod.ScGameObject.GetComponent<Volume>(); Mod.ScCameraComponent = Mod.ScGameObject.GetComponent<Camera>(); Mod.ScVolumeComponent.sharedProfile.TryGet<MKGlow>(ref Mod.MKGlowOverride); Mod.ScVolumeComponent.sharedProfile.TryGet<LensDistortion>(ref Mod.LensDistortionOverride); Mod.ScVolumeComponent.sharedProfile.TryGet<ChromaticAberration>(ref Mod.ChromaticAberrationOverride); Mod.ScVolumeComponent.sharedProfile.TryGet<AutoExposure>(ref Mod.AutoExposureOverride); } private static void HandleCameraFound(bool isAuto) { //IL_000a: 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_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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //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) //IL_0031: 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_0042: Expected O, but got Unknown if (!isAuto) { Notification val = new Notification { Title = NotificationText.op_Implicit("WideEye | Success"), Message = NotificationText.op_Implicit("Found camera manually"), Type = (NotificationType)3, PopupLength = 3f }; Notifier.Send(val); } MelonLogger.Msg(ConsoleColor.Green, isAuto ? "Found camera automatically" : "Found camera manually"); } } } namespace WideEye.Behaviors { public class CustomGripEvents : MonoBehaviour { public Grip grip; public UnityEvent onIndex; public UnityEvent onMenuButtonDown; private void Update() { BaseController val = default(BaseController); if (grip.GetController(ref val)) { if (val.GetPrimaryInteractionButton()) { onIndex.Invoke(); } if (val.GetMenuButtonDown()) { onMenuButtonDown.Invoke(); } } } } public class FreeCam : MonoB