Move many mods to Deprecated folder, fix spelling

This commit is contained in:
NotAKidoS 2025-04-03 02:57:35 -05:00
parent 5e822cec8d
commit 0042590aa6
539 changed files with 7475 additions and 3120 deletions

View file

@ -0,0 +1,16 @@
using ABI_RC.Core.Player;
using HarmonyLib;
using Valve.VR;
namespace NAK.TrackedControllerFix.HarmonyPatches;
internal class PlayerSetupPatches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Start))]
private static void Postfix_PlayerSetup_Start(ref PlayerSetup __instance)
{
__instance.vrLeftHandTracker.AddComponent<TrackedControllerFixer>().inputSource = SteamVR_Input_Sources.LeftHand;
__instance.vrRightHandTracker.AddComponent<TrackedControllerFixer>().inputSource = SteamVR_Input_Sources.RightHand;
}
}

View file

@ -0,0 +1,24 @@
using MelonLoader;
namespace NAK.TrackedControllerFix;
public class TrackedControllerFix : MelonMod
{
public override void OnInitializeMelon()
{
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
}
private void ApplyPatches(Type type)
{
try
{
HarmonyInstance.PatchAll(type);
}
catch (Exception e)
{
LoggerInstance.Msg($"Failed while patching {type.Name}!");
LoggerInstance.Error(e);
}
}
}

View file

@ -0,0 +1,32 @@
using MelonLoader;
using NAK.TrackedControllerFix.Properties;
using System.Reflection;
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
[assembly: AssemblyTitle(nameof(NAK.TrackedControllerFix))]
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
[assembly: AssemblyProduct(nameof(NAK.TrackedControllerFix))]
[assembly: MelonInfo(
typeof(NAK.TrackedControllerFix.TrackedControllerFix),
nameof(NAK.TrackedControllerFix),
AssemblyInfoParams.Version,
AssemblyInfoParams.Author,
downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/TrackedControllerFix"
)]
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
[assembly: MelonColor(255, 52, 152, 219)]
[assembly: MelonAuthorColor(255, 158, 21, 32)]
[assembly: HarmonyDontPatchAll]
namespace NAK.TrackedControllerFix.Properties;
internal static class AssemblyInfoParams
{
public const string Version = "1.0.6";
public const string Author = "NotAKidoS";
}

View file

@ -0,0 +1,19 @@
# TrackedControllerFix
lazy af fix for a small issue
Your Left/Right hand controllers will now track faster and while in the Steam overlay.
This approach to fixing the issue is made lazy to support DesktopVRSwitch.
(also because im lazy)
---
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.

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk"/>

View file

@ -0,0 +1,110 @@
using ABI_RC.Core.Savior;
using UnityEngine;
using Valve.VR;
namespace NAK.TrackedControllerFix;
public class TrackedControllerFixer : MonoBehaviour
{
#region Variables
public SteamVR_Input_Sources inputSource;
public int deviceIndex = -1;
private SteamVR_TrackedObject _trackedObject;
private SteamVR_Behaviour_Pose _oldBehaviourPose;
private SteamVR_Action_Pose _actionPose;
private SteamVR_RenderModel _renderModel;
#endregion
#region Unity Methods
private void Awake()
{
_trackedObject = gameObject.AddComponent<SteamVR_TrackedObject>();
_oldBehaviourPose = gameObject.GetComponent<SteamVR_Behaviour_Pose>();
_oldBehaviourPose.broadcastDeviceChanges = false; //this messes us up
_renderModel = gameObject.GetComponentInChildren<SteamVR_RenderModel>();
_actionPose = SteamVR_Input.GetAction<SteamVR_Action_Pose>("Pose", false);
}
private void OnEnable()
{
UpdateBehaviourPose(false);
UpdateActionPose(true);
}
private void OnDisable()
{
UpdateBehaviourPose(true);
UpdateActionPose(false);
}
private void Update()
{
if (_oldBehaviourPose.enabled)
return;
if (deviceIndex < 0)
CheckDeviceIndex();
}
#endregion
#region Private Methods
private void UpdateBehaviourPose(bool enable)
{
if (CheckVR.Instance.forceOpenXr)
return;
if (_oldBehaviourPose == null)
return;
_oldBehaviourPose.enabled = enable;
}
private void UpdateActionPose(bool enable)
{
if (CheckVR.Instance.forceOpenXr)
return;
if (_actionPose == null)
return;
if (enable)
{
_actionPose[inputSource].onDeviceConnectedChanged += OnDeviceConnectedChanged;
CheckDeviceIndex();
return;
}
_actionPose[inputSource].onDeviceConnectedChanged -= OnDeviceConnectedChanged;
}
private void OnDeviceConnectedChanged(SteamVR_Action_Pose changedAction, SteamVR_Input_Sources changedSource, bool connected)
{
_actionPose = changedAction;
if (changedSource != inputSource)
return;
CheckDeviceIndex();
}
private void CheckDeviceIndex()
{
if (!_actionPose[inputSource].deviceIsConnected)
return;
int trackedDeviceIndex = (int)_actionPose[inputSource].trackedDeviceIndex;
if (deviceIndex == trackedDeviceIndex)
return;
deviceIndex = trackedDeviceIndex;
_trackedObject?.SetDeviceIndex(deviceIndex);
_renderModel?.SetDeviceIndex(deviceIndex);
}
#endregion
}

View file

@ -0,0 +1,23 @@
{
"_id": 161,
"name": "TrackedControllerFix",
"modversion": "1.0.6",
"gameversion": "2023r171",
"loaderversion": "0.6.1",
"modtype": "Mod",
"author": "NotAKidoS",
"description": "Allows your controllers to track while the SteamVR overlay is open. This also fixes Quest/Touch controllers feeling slow during fast movements.\n\nSupport for SmoothRay & DesktopVRSwitch.\n**Only supports OpenVR, not OpenXR.**",
"searchtags": [
"vr",
"quest",
"controller",
"tracking"
],
"requirements": [
"None"
],
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r16/TrackedControllerFix.dll",
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/TrackedControllerFix/",
"changelog": "- Fixes for 2023r171.\n- Prevented from initializing when launching with OpenXR.",
"embedcolor": "#3498db"
}