Merge remote-tracking branch 'PathCamDisabler/main'

Merge PathCamDisabler
This commit is contained in:
NotAKidoS 2023-04-16 06:56:16 -05:00
commit 12ffda91ac
7 changed files with 234 additions and 4 deletions

View file

@ -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

49
PathCamDisabler/Main.cs Normal file
View file

@ -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<bool> m_entryDisablePathCam, m_entryDisableFlightBind;
public override void OnInitializeMelon()
{
m_categoryPathCamDisabler = MelonPreferences.CreateCategory(SettingsCategory);
m_entryDisablePathCam = m_categoryPathCamDisabler.CreateEntry<bool>("Disable Path Camera Controller.", true, description: "Disable Path Camera Controller.");
m_entryDisableFlightBind = m_categoryPathCamDisabler.CreateEntry<bool>("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();
}
}
}
}
}

View 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>

View 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

View file

@ -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";
}

View file

@ -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"
}

View file

@ -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.
---