mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
Move many mods to Deprecated folder, fix spelling
This commit is contained in:
parent
5e822cec8d
commit
0042590aa6
539 changed files with 7475 additions and 3120 deletions
2
.Deprecated/GestureLock/GestureLock.csproj
Normal file
2
.Deprecated/GestureLock/GestureLock.csproj
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk"/>
|
49
.Deprecated/GestureLock/HarmonyPatches.cs
Normal file
49
.Deprecated/GestureLock/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Core.UI;
|
||||
using ABI_RC.Systems.InputManagement.InputModules;
|
||||
using ABI_RC.Systems.InputManagement.XR;
|
||||
using HarmonyLib;
|
||||
using Valve.VR;
|
||||
|
||||
namespace NAK.GestureLock.HarmonyPatches;
|
||||
|
||||
internal class CVRInputModule_XRPatches
|
||||
{
|
||||
// Get input from SteamVR because new input system is nerfed for OpenXR...
|
||||
private static readonly SteamVR_Action_Boolean _gestureToggleButton = SteamVR_Input.GetAction<SteamVR_Action_Boolean>("ControllerToggleGestures", false);
|
||||
|
||||
private static bool _isLocked;
|
||||
private static float _oldGestureLeft;
|
||||
private static float _oldGestureRight;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRInputModule_XR), nameof(CVRInputModule_XR.Update_Emotes))]
|
||||
private static void Postfix_CVRInputModule_XR_Update_Emotes(ref CVRInputModule_XR __instance)
|
||||
{
|
||||
if (!MetaPort.Instance.isUsingVr)
|
||||
return;
|
||||
|
||||
bool leftInput = _gestureToggleButton.GetLastStateDown(SteamVR_Input_Sources.LeftHand);
|
||||
bool rightInput = _gestureToggleButton.GetLastStateDown(SteamVR_Input_Sources.RightHand);
|
||||
|
||||
if (leftInput && __instance._leftModule.Type == eXRControllerType.Index || __instance._inputManager.oneHanded)
|
||||
return;
|
||||
|
||||
if (rightInput && __instance._rightModule.Type == eXRControllerType.Index || __instance._inputManager.oneHanded)
|
||||
return;
|
||||
|
||||
if (leftInput || rightInput)
|
||||
{
|
||||
_isLocked = !_isLocked;
|
||||
_oldGestureLeft = __instance._inputManager.gestureLeft;
|
||||
_oldGestureRight = __instance._inputManager.gestureRight;
|
||||
CohtmlHud.Instance.ViewDropTextImmediate("", "Gesture Lock", "Gestures " + (_isLocked ? "Locked" : "Unlocked"));
|
||||
}
|
||||
|
||||
if (!_isLocked)
|
||||
return;
|
||||
|
||||
__instance._inputManager.gestureLeft = _oldGestureLeft;
|
||||
__instance._inputManager.gestureRight = _oldGestureRight;
|
||||
}
|
||||
}
|
24
.Deprecated/GestureLock/Main.cs
Normal file
24
.Deprecated/GestureLock/Main.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using MelonLoader;
|
||||
|
||||
namespace NAK.GestureLock;
|
||||
|
||||
public class GestureLock : MelonMod
|
||||
{
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
ApplyPatches(typeof(HarmonyPatches.CVRInputModule_XRPatches));
|
||||
}
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||
LoggerInstance.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
32
.Deprecated/GestureLock/Properties/AssemblyInfo.cs
Normal file
32
.Deprecated/GestureLock/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using MelonLoader;
|
||||
using NAK.GestureLock.Properties;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||
[assembly: AssemblyTitle(nameof(NAK.GestureLock))]
|
||||
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||
[assembly: AssemblyProduct(nameof(NAK.GestureLock))]
|
||||
|
||||
[assembly: MelonInfo(
|
||||
typeof(NAK.GestureLock.GestureLock),
|
||||
nameof(NAK.GestureLock),
|
||||
AssemblyInfoParams.Version,
|
||||
AssemblyInfoParams.Author,
|
||||
downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/GestureLock"
|
||||
)]
|
||||
|
||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
[assembly: MelonColor(255, 128, 66, 33)]
|
||||
[assembly: MelonAuthorColor(255, 158, 21, 32)]
|
||||
[assembly: HarmonyDontPatchAll]
|
||||
|
||||
namespace NAK.GestureLock.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "2.0.1";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
20
.Deprecated/GestureLock/README.md
Normal file
20
.Deprecated/GestureLock/README.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# GestureLock
|
||||
Simple GestureLock for CVR.
|
||||
|
||||
Uses ChilloutVR's "Controller Toggle Gestures" binding in SteamVR to lock GestureLeft & GestureRight input.
|
||||
|
||||
Does nothing on Knuckles controllers as the bind is used for finger tracking.
|
||||
|
||||

|
||||
|
||||
|
||||
---
|
||||
|
||||
Here is the block of text where I tell you this mod is not affiliated or endorsed by ABI.
|
||||
https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
|
||||
|
||||
> This mod is an independent creation and is not affiliated with, supported by or approved by Alpha Blend Interactive.
|
||||
|
||||
> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use.
|
||||
|
||||
> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive.
|
23
.Deprecated/GestureLock/format.json
Normal file
23
.Deprecated/GestureLock/format.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"_id": 93,
|
||||
"name": "GestureLock",
|
||||
"modversion": "2.0.1",
|
||||
"gameversion": "2023r171",
|
||||
"loaderversion": "0.6.1",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Locks GestureLeft & GestureRight on SteamVR binding.\nDoes nothing on Knuckles controllers.\n\nMake sure to bind Controller Toggle Gestures in SteamVR.",
|
||||
"searchtags": [
|
||||
"gesture",
|
||||
"lock",
|
||||
"GestureLeft",
|
||||
"GestureRight"
|
||||
],
|
||||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r16/GestureLock.dll",
|
||||
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/GestureLock/",
|
||||
"changelog": "- Fixes for 2023r171.",
|
||||
"embedcolor": "#804221"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue