Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LookStraightDown v1.0.5
LookStraightDown.dll
Decompiled 2 years agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HG.BlendableTypes; using Microsoft.CodeAnalysis; using On.RoR2; using RoR2; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LookStraightDown")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LookStraightDown")] [assembly: AssemblyTitle("LookStraightDown")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace LookStraightDown { [BepInPlugin("HIFU.LookStraightDown", "LookStraightDown", "1.0.4")] public class Main : BaseUnityPlugin { public const string PluginGUID = "HIFU.LookStraightDown"; public const string PluginAuthor = "HIFU"; public const string PluginName = "LookStraightDown"; public const string PluginVersion = "1.0.4"; public static ManualLogSource LSDLogger; public static ConfigEntry<float> minPitch { get; set; } public static ConfigEntry<float> maxPitch { get; set; } public void Awake() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown LSDLogger = ((BaseUnityPlugin)this).Logger; minPitch = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Minimum Pitch", -90f, "The minimum Y angle the camera can be positioned at. Vanilla is -70. Values below -179 probably crash the game"); maxPitch = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Maximum Pitch", 90f, "The maximum Y angle the camera can be positioned at. Vanilla is 70. Values above 179 probably crash the game"); CharacterCameraParamsData.basic.minPitch = BlendableFloat.op_Implicit(minPitch.Value); CharacterCameraParamsData.basic.maxPitch = BlendableFloat.op_Implicit(maxPitch.Value); CameraTargetParams.Awake += new hook_Awake(CameraTargetParams_Awake); } private void CameraTargetParams_Awake(orig_Awake orig, CameraTargetParams self) { //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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self) && (Object)(object)self.cameraParams != (Object)null) { self.cameraParams.data.minPitch = BlendableFloat.op_Implicit(minPitch.Value); self.cameraParams.data.maxPitch = BlendableFloat.op_Implicit(maxPitch.Value); } orig.Invoke(self); } } }