[FuckToes] i guess bring this back

This commit is contained in:
NotAKidoS 2025-04-12 16:38:19 -05:00
parent c4ab9cce47
commit 6e37bcbabb
5 changed files with 22 additions and 20 deletions

View file

@ -3,23 +3,22 @@ using ABI_RC.Systems.IK;
using MelonLoader;
using RootMotion.FinalIK;
using System.Reflection;
using ABI_RC.Core;
namespace NAK.FuckToes;
public class FuckToesMod : MelonMod
{
private static MelonLogger.Instance Logger;
#region Melon Preferences
private static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(nameof(FuckToesMod));
MelonPreferences.CreateCategory(nameof(FuckToes));
private static readonly MelonPreferences_Entry<bool> EntryEnabledVR =
Category.CreateEntry("Enabled in HalfBody", true, description: "Nuke VRIK toes when in Halfbody.");
Category.CreateEntry("use_in_halfbody", true, display_name:"No Toes in Halfbody", description: "Nuke VRIK toes when in Halfbody.");
private static readonly MelonPreferences_Entry<bool> EntryEnabledFBT =
Category.CreateEntry("Enabled in FBT", true, description: "Nuke VRIK toes when in FBT.");
Category.CreateEntry("use_in_fbt", true, display_name:"No Toes in Fullbody", description: "Nuke VRIK toes when in FBT.");
#endregion Melon Preferences
@ -27,10 +26,10 @@ public class FuckToesMod : MelonMod
public override void OnInitializeMelon()
{
Logger = LoggerInstance;
HarmonyInstance.Patch(
typeof(VRIK).GetMethod(nameof(VRIK.AutoDetectReferences)),
prefix: new HarmonyLib.HarmonyMethod(typeof(FuckToesMod).GetMethod(nameof(OnVRIKAutoDetectReferences_Prefix), BindingFlags.NonPublic | BindingFlags.Static))
prefix: new HarmonyLib.HarmonyMethod(typeof(FuckToesMod).GetMethod(nameof(OnVRIKAutoDetectReferences_Prefix),
BindingFlags.NonPublic | BindingFlags.Static))
);
}
@ -43,13 +42,12 @@ public class FuckToesMod : MelonMod
try
{
// Must be PlayerLocal layer and in VR
if (__instance.gameObject.layer != 8
if (__instance.gameObject.layer != CVRLayers.PlayerLocal
|| !MetaPort.Instance.isUsingVr)
return;
switch (IKSystem.Instance.BodySystem.FullBodyActive)
{
case false when !EntryEnabledVR.Value: // Not in FBT, and not enabled, perish
case true when !EntryEnabledFBT.Value: // In FBT, and not enabled in fbt, perish
return;
@ -61,8 +59,8 @@ public class FuckToesMod : MelonMod
}
catch (Exception e)
{
Logger.Error($"Error during the patched method {nameof(OnVRIKAutoDetectReferences_Prefix)}");
Logger.Error(e);
MelonLogger.Error($"Error during the patched method {nameof(OnVRIKAutoDetectReferences_Prefix)}");
MelonLogger.Error(e);
}
}

View file

@ -27,6 +27,6 @@ using System.Reflection;
namespace NAK.FuckToes.Properties;
internal static class AssemblyInfoParams
{
public const string Version = "1.0.3";
public const string Version = "1.0.4";
public const string Author = "NotAKidoS";
}

View file

@ -1,7 +1,6 @@
# FuckToes
Prevents VRIK from autodetecting toes in HalfbodyIK.
Optionally can be applied in FBT, but toes in FBT are nice so you are a monster if so.
Prevents VRIK from autodetecting toes in Halfbody or Fullbody.
![fuckthetoes](https://user-images.githubusercontent.com/37721153/216518012-ae3b1dde-17ea-419a-a875-48d57e13f3dd.png)
@ -14,5 +13,4 @@ https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
> 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.
> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive.

View file

@ -1,8 +1,8 @@
{
"_id": 129,
"name": "FuckToes",
"modversion": "1.0.3",
"gameversion": "2023r171",
"modversion": "1.0.4",
"gameversion": "2025r179",
"loaderversion": "0.6.1",
"modtype": "Mod",
"author": "NotAKidoS",
@ -16,8 +16,8 @@
"requirements": [
"None"
],
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r14/FuckToes.dll",
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/FuckToes.dll",
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/FuckToes/",
"changelog": "- Fixes for 2023r171.",
"changelog": "- Recompiled for 2025r179",
"embedcolor": "#f61963"
}