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,104 @@
using ABI_RC.Core.InteractionSystem;
using ABI_RC.Core.Player;
using ABI_RC.Core.UI;
using HarmonyLib;
using MelonLoader;
using UnityEngine;
namespace NAK.SmartReticle;
public class SmartReticleMod : MelonMod
{
#region Melon Preferences
private const string SettingsCategory = nameof(SmartReticleMod);
private static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(SettingsCategory);
private static readonly MelonPreferences_Entry<bool> Entry_Enabled =
Category.CreateEntry("enabled", true, display_name: "Enabled",description: "Toggle SmartReticleMod entirely.");
private static readonly MelonPreferences_Entry<float> Entry_HideTimeout =
Category.CreateEntry("hide_timeout", 1f, display_name: "Hide Timeout (s)", description: "Timeout before the reticle hides again. Set to 0 to instantly hide.");
#endregion Melon Preferences
public override void OnInitializeMelon()
{
ApplyPatches(typeof(ControllerRay_Patches));
}
private void ApplyPatches(Type type)
{
try
{
HarmonyInstance.PatchAll(type);
}
catch (Exception e)
{
LoggerInstance.Msg($"Failed while patching {type.Name}!");
LoggerInstance.Error(e);
}
}
#region Patches
private static class ControllerRay_Patches
{
private static Transform _mainMenuTransform;
private static Transform _quickMenuTransform;
private static float _lastDisplayedTime;
[HarmonyPostfix]
[HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.Start))]
private static void Postfix_ControllerRay_Start()
{
_mainMenuTransform = ViewManager.Instance.transform;
_quickMenuTransform = CVR_MenuManager.Instance.transform;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(ControllerRay), nameof(ControllerRay.DisplayAuraHighlight))]
private static void Postfix_ControllerRay_DisplayAuraHighlight(ref ControllerRay __instance)
{
if (!Entry_Enabled.Value)
return;
GameObject pointer;
if (__instance.isDesktopRay) // in desktop mode
pointer = CohtmlHud.Instance.desktopPointer;
else if (__instance.isHeadRay) // in VR mode with no controllers
pointer = __instance.backupCrossHair;
else
return;
if (!pointer.activeSelf)
{
_lastDisplayedTime = 0; // reset time
return; // pointing at menu or cursor / controllers active
}
bool shouldDisplayPointer = (__instance._interact // pressing mouse1 or mouse2
|| __instance._isTryingToPickup
// using some tool/utility
|| (PlayerSetup.Instance.GetCurrentPropSelectionMode()
!= PlayerSetup.PropSelectionMode.None)
// hit something- other than the two menus
|| (__instance._objectWasHit
&& (__instance.hitTransform != _mainMenuTransform
&& __instance.hitTransform != _quickMenuTransform)));
if (shouldDisplayPointer)
{
_lastDisplayedTime = Time.time;
return;
}
if (Time.time - _lastDisplayedTime > Entry_HideTimeout.Value)
pointer.SetActive(false);
}
}
#endregion Patches
}

View file

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

View file

@ -0,0 +1,14 @@
# SmartReticle
Simple mod that makes the Desktop/VR Head reticle only appear when hovering over an interactable, holding an interaction button, or when using a tool.
---
Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI.
https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
> This mod is an independent creation 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,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,23 @@
{
"_id": 233,
"name": "SmartReticle",
"modversion": "1.0.1",
"gameversion": "2024r175",
"loaderversion": "0.6.1",
"modtype": "Mod",
"author": "NotAKidoS",
"description": "Simple mod that makes the Desktop/VR Head reticle only appear when hovering over an interactable, holding an interaction button, or when using a tool.",
"searchtags": [
"reticle",
"hud",
"cursor",
"dot"
],
"requirements": [
"None"
],
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r40/SmartReticle.dll",
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SmartReticle/",
"changelog": "- Adjusted to also work for the VR head reticle.",
"embedcolor": "#f61963"
}