mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
initial
Allows for disabling the CVRPathCamController monobehavior. Lets players to use the numpad keys without being interrupted by the path camera. Also additional setting to disable the flight bind, as that is handled by the CVRPathCamController...?
This commit is contained in:
parent
b04fd79132
commit
ffa50bee02
5 changed files with 206 additions and 0 deletions
52
PathCamDisabler/Main.cs
Normal file
52
PathCamDisabler/Main.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.IO;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PathCamDisabler;
|
||||
|
||||
public class PathCamDisabler : MelonMod
|
||||
{
|
||||
private static MelonPreferences_Category m_categoryPathCamDisabler;
|
||||
private static MelonPreferences_Entry<bool> m_entryDisablePathCam, m_entryDisableFlightBind;
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
m_categoryPathCamDisabler = MelonPreferences.CreateCategory(nameof(PathCamDisabler));
|
||||
m_entryDisablePathCam = m_categoryPathCamDisabler.CreateEntry<bool>("Disable Path Camera Controller.", true, description: "Disable path camera controller so you can use your numpad keys without funky shit.");
|
||||
m_entryDisableFlightBind = m_categoryPathCamDisabler.CreateEntry<bool>("Disable Flight Binding (if controller off).", false, description: "Disables the flight binding as the path camera controller handles that...?");
|
||||
m_categoryPathCamDisabler.SaveToFile(false);
|
||||
|
||||
foreach (var setting in m_categoryPathCamDisabler.Entries)
|
||||
{
|
||||
setting.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
}
|
||||
|
||||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator WaitForLocalPlayer()
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
76
PathCamDisabler/PathCamDisabler.csproj
Normal file
76
PathCamDisabler/PathCamDisabler.csproj
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="resources\**" />
|
||||
<EmbeddedResource Remove="resources\**" />
|
||||
<None Remove="resources\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Cohtml.Runtime">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Giamoz">
|
||||
<HintPath>..\..\Giamoz\Giamoz\bin\Debug\net472\Giamoz.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MelonLoader">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SteamVR">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\SteamVR.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AnimationModule">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.AssetBundleModule">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.InputLegacyModule">
|
||||
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.PhysicsModule">
|
||||
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resource1.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resource1.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resource1.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Deploy" AfterTargets="Build">
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" />
|
||||
<Message Text="Copied $(TargetPath) to C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" Importance="high" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
25
PathCamDisabler/PathCamDisabler.sln
Normal file
25
PathCamDisabler/PathCamDisabler.sln
Normal file
|
@ -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
|
30
PathCamDisabler/Properties/AssemblyInfo.cs
Normal file
30
PathCamDisabler/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using PathCamDisabler.Properties;
|
||||
using MelonLoader;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyTitle(nameof(PathCamDisabler))]
|
||||
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||
[assembly: AssemblyProduct(nameof(PathCamDisabler))]
|
||||
|
||||
[assembly: MelonInfo(
|
||||
typeof(PathCamDisabler.PathCamDisabler),
|
||||
nameof(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 PathCamDisabler.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.0";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
23
PathCamDisabler/format.json
Normal file
23
PathCamDisabler/format.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"_id": -1,
|
||||
"name": "PathCamDisabler",
|
||||
"modversion": "1.0.0",
|
||||
"gameversion": "2022r169",
|
||||
"loaderversion": "0.5.7",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Disables path camera controller to free up your numkeys. Additional option to disable the flight binding. \n\n Won't do much for VR. Can toggle with UIExpansionKit or similar.",
|
||||
"searchtags": [
|
||||
"numpad",
|
||||
"camera",
|
||||
"pathing",
|
||||
"path"
|
||||
],
|
||||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidOnSteam/PathCamDisabler/releases/download/r1/PathCamDisabler.dll",
|
||||
"sourcelink": "https://github.com/NotAKidOnSteam/PathCamDisabler/",
|
||||
"changelog": "sign initials here",
|
||||
"embedcolor": "#9b59b6"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue