diff --git a/LICENSE b/LICENSE index c3f4fee..4480281 100644 --- a/LICENSE +++ b/LICENSE @@ -1,10 +1,6 @@ MIT License -<<<<<<< HEAD Copyright (c) 2023 NotAKidoS -======= -Copyright (c) 2022 NotAKidoS ->>>>>>> MenuScalePatch/main Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PathCamDisabler/Main.cs b/PathCamDisabler/Main.cs new file mode 100644 index 0000000..0087741 --- /dev/null +++ b/PathCamDisabler/Main.cs @@ -0,0 +1,49 @@ +using ABI_RC.Core.IO; +using ABI_RC.Core.Player; +using MelonLoader; +using UnityEngine; + +namespace NAK.Melons.PathCamDisabler +{ + public class PathCamDisablerMod : MelonMod + { + internal const string SettingsCategory = "PathCamDisabler"; + internal static MelonPreferences_Category m_categoryPathCamDisabler; + internal static MelonPreferences_Entry m_entryDisablePathCam, m_entryDisableFlightBind; + + public override void OnInitializeMelon() + { + m_categoryPathCamDisabler = MelonPreferences.CreateCategory(SettingsCategory); + m_entryDisablePathCam = m_categoryPathCamDisabler.CreateEntry("Disable Path Camera Controller.", true, description: "Disable Path Camera Controller."); + m_entryDisableFlightBind = m_categoryPathCamDisabler.CreateEntry("Disable Flight Binding (if controller off).", false, description: "Disable flight bind if Path Camera Controller is also disabled."); + + m_entryDisablePathCam.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings); + + MelonLoader.MelonCoroutines.Start(WaitForCVRPathCamController()); + } + + private System.Collections.IEnumerator WaitForCVRPathCamController() + { + while (CVRPathCamController.Instance == null) + yield return null; + UpdateSettings(); + } + + private void UpdateSettings() + { + CVRPathCamController.Instance.enabled = !m_entryDisablePathCam.Value; + } + private void OnUpdateSettings(object arg1, object arg2) => UpdateSettings(); + + public override void OnUpdate() + { + if (m_entryDisablePathCam.Value && !m_entryDisableFlightBind.Value) + { + if (Input.GetKeyDown(KeyCode.Keypad5)) + { + PlayerSetup.Instance._movementSystem.ToggleFlight(); + } + } + } + } +} \ No newline at end of file diff --git a/PathCamDisabler/PathCamDisabler.csproj b/PathCamDisabler/PathCamDisabler.csproj new file mode 100644 index 0000000..703e8cc --- /dev/null +++ b/PathCamDisabler/PathCamDisabler.csproj @@ -0,0 +1,76 @@ + + + + + net472 + enable + latest + false + + + + + + + + + + + C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll + + + C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll + + + ..\..\Giamoz\Giamoz\bin\Debug\net472\Giamoz.dll + + + C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll + + + C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\SteamVR.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AssetBundleModule.dll + + + C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll + + + C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll + + + + + + True + True + Resource1.resx + + + + + + ResXFileCodeGenerator + Resource1.Designer.cs + + + + + + + + + diff --git a/PathCamDisabler/PathCamDisabler.sln b/PathCamDisabler/PathCamDisabler.sln new file mode 100644 index 0000000..1f80bd8 --- /dev/null +++ b/PathCamDisabler/PathCamDisabler.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PathCamDisabler", "PathCamDisabler.csproj", "{010592B6-9D1E-49D8-B4B2-6D5A6BCF5405}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {010592B6-9D1E-49D8-B4B2-6D5A6BCF5405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {010592B6-9D1E-49D8-B4B2-6D5A6BCF5405}.Debug|Any CPU.Build.0 = Debug|Any CPU + {010592B6-9D1E-49D8-B4B2-6D5A6BCF5405}.Release|Any CPU.ActiveCfg = Release|Any CPU + {010592B6-9D1E-49D8-B4B2-6D5A6BCF5405}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {116A47FE-B7C5-4C2A-8437-5D5357FE783F} + EndGlobalSection +EndGlobal diff --git a/PathCamDisabler/Properties/AssemblyInfo.cs b/PathCamDisabler/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6de051d --- /dev/null +++ b/PathCamDisabler/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +using MelonLoader; +using System.Reflection; +using NAK.Melons.PathCamDisabler.Properties; + +[assembly: AssemblyVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyTitle(nameof(NAK.Melons.PathCamDisabler))] +[assembly: AssemblyCompany(AssemblyInfoParams.Author)] +[assembly: AssemblyProduct(nameof(NAK.Melons.PathCamDisabler))] + +[assembly: MelonInfo( + typeof(NAK.Melons.PathCamDisabler.PathCamDisablerMod), + nameof(NAK.Melons.PathCamDisabler), + AssemblyInfoParams.Version, + AssemblyInfoParams.Author, + downloadLink: "https://github.com/NotAKidOnSteam/PathCamDisabler" +)] + +[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] +[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] +[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] + +namespace NAK.Melons.PathCamDisabler.Properties; +internal static class AssemblyInfoParams +{ + public const string Version = "1.0.1"; + public const string Author = "NotAKidoS"; +} \ No newline at end of file diff --git a/PathCamDisabler/format.json b/PathCamDisabler/format.json new file mode 100644 index 0000000..b8a4315 --- /dev/null +++ b/PathCamDisabler/format.json @@ -0,0 +1,23 @@ +{ + "_id": 110, + "name": "PathCamDisabler", + "modversion": "1.0.1", + "gameversion": "2022r170", + "loaderversion": "0.5.7", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Adds option to disable the Path Camera Controller to free up your numkeys.\nAdditional option to disable flight binding.", + "searchtags": [ + "numpad", + "camera", + "pathing", + "path" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidOnSteam/PathCamDisabler/releases/download/v1.0.1/PathCamDisabler.dll", + "sourcelink": "https://github.com/NotAKidOnSteam/PathCamDisabler/", + "changelog": "- Organizational changes.\n- No longer using SaveToFile().", + "embedcolor": "#9b59b6" +} \ No newline at end of file diff --git a/README.md b/README.md index ac5fe1e..738b698 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,38 @@ Originally forced menu position to update while scaling. Now changes ChilloutVR * Menu will now follow you while moving in world space, but not while moving in play space. https://user-images.githubusercontent.com/37721153/189479474-41e93dff-a695-42f2-9d20-6a895a723039.mp4 +# PathCamDisabler + +> In the midst of a party, with friends all around +> The player chatted and laughed, a joyous sound +> +> But then, oh no, a cruel twist of fate +> Their numpad keys spawned path camera points, a terrible fate +> +> The camera shifted, spinning out of control +> Distracting and disorienting, taking its toll +> +> The player struggled, trying to focus and socialize +> But the path camera points just wouldn't let up, a never-ending surprise +> +> But then, at last, a glimmer of hope +> The player installed a mod, PathCamDisabler, with a single stroke +> +> The path camera points vanished, gone in a flash +> And the player breathed a sigh of relief, their struggles now past +> +> With camera control restored, the player socialized on +> Having a great time, their struggles now gone +> +> Thanks to PathCamDisabler, their troubles were through +> And the player could focus on the party, finally feeling brand new. +> +> Sincerely, +> Assistant (OpenAI) + +Disables the CVRPathCameraController by default while keeping the flight binding. + +Using UIExpansionKit or similar you can toggle both while in game. ---