From fcc83aa5708cea5b3cbbeaf3f6348a3e2039397d Mon Sep 17 00:00:00 2001
From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com>
Date: Thu, 2 Feb 2023 22:54:47 -0600
Subject: [PATCH] init
---
FuckToes/FuckToes.cs | 25 ++++++++++++++
FuckToes/FuckToes.csproj | 52 +++++++++++++++++++++++++++++
FuckToes/FuckToes.sln | 25 ++++++++++++++
FuckToes/Main.cs | 32 ++++++++++++++++++
FuckToes/Properties/AssemblyInfo.cs | 31 +++++++++++++++++
FuckToes/format.json | 23 +++++++++++++
6 files changed, 188 insertions(+)
create mode 100644 FuckToes/FuckToes.cs
create mode 100644 FuckToes/FuckToes.csproj
create mode 100644 FuckToes/FuckToes.sln
create mode 100644 FuckToes/Main.cs
create mode 100644 FuckToes/Properties/AssemblyInfo.cs
create mode 100644 FuckToes/format.json
diff --git a/FuckToes/FuckToes.cs b/FuckToes/FuckToes.cs
new file mode 100644
index 0000000..d960d3c
--- /dev/null
+++ b/FuckToes/FuckToes.cs
@@ -0,0 +1,25 @@
+using ABI_RC.Core.Savior;
+using HarmonyLib;
+using RootMotion.FinalIK;
+
+
+namespace NAK.Melons.FuckToes.HarmonyPatches;
+
+//yes im patching VRIK directly, cvr does not force calibration or mess with references, and leaves it to vrik to handle
+class VRIKPatches
+{
+ [HarmonyPostfix]
+ [HarmonyPatch(typeof(VRIK), "AutoDetectReferences")]
+ private static void Postfix_VRIK_AutoDetectReferences(ref VRIK __instance)
+ {
+ //only run for PlayerLocal VRIK
+ if (__instance.gameObject.layer != 8) return;
+
+ if (FuckToesMod.m_entryEnabledVR.Value && MetaPort.Instance.isUsingVr)
+ {
+ if (!FuckToesMod.m_entryEnabledFBT.Value && MetaPort.Instance.isUsingFullbody) return;
+ __instance.references.leftToes = null;
+ __instance.references.rightToes = null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/FuckToes/FuckToes.csproj b/FuckToes/FuckToes.csproj
new file mode 100644
index 0000000..c432ed3
--- /dev/null
+++ b/FuckToes/FuckToes.csproj
@@ -0,0 +1,52 @@
+
+
+
+
+ net472
+ enable
+ latest
+ false
+
+
+
+
+ C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll
+
+
+ C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll
+
+
+ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll
+
+
+ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll
+
+
+ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll
+
+
+ C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll
+
+
+ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll
+
+
+ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AssetBundleModule.dll
+
+
+ C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll
+
+
+ C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll
+
+
+ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll
+
+
+
+
+
+
+
+
+
diff --git a/FuckToes/FuckToes.sln b/FuckToes/FuckToes.sln
new file mode 100644
index 0000000..4fb6ac2
--- /dev/null
+++ b/FuckToes/FuckToes.sln
@@ -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}") = "FuckToes", "FuckToes.csproj", "{7A4864FE-17AD-4D6D-B2CD-4111C05754D8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {C0D6DAF4-5963-47A0-8D33-5E0E22061DAF}
+ EndGlobalSection
+EndGlobal
diff --git a/FuckToes/Main.cs b/FuckToes/Main.cs
new file mode 100644
index 0000000..4021132
--- /dev/null
+++ b/FuckToes/Main.cs
@@ -0,0 +1,32 @@
+using MelonLoader;
+
+namespace NAK.Melons.FuckToes;
+
+public class FuckToesMod : MelonMod
+{
+ internal const string SettingsCategory = "Fuck Toes";
+ internal static MelonPreferences_Category m_categoryFuckToes;
+ internal static MelonPreferences_Entry m_entryEnabledVR, m_entryEnabledFBT;
+ public override void OnInitializeMelon()
+ {
+ m_categoryFuckToes = MelonPreferences.CreateCategory(SettingsCategory);
+ m_entryEnabledVR = m_categoryFuckToes.CreateEntry("Enabled", true, description: "Nuke VRIK toes when in Halfbody.");
+ m_entryEnabledFBT = m_categoryFuckToes.CreateEntry("Enabled in FBT", false, description: "Nuke VRIK toes when in FBT.");
+
+ //Apply patches (i stole)
+ ApplyPatches(typeof(HarmonyPatches.VRIKPatches));
+ }
+
+ private void ApplyPatches(Type type)
+ {
+ try
+ {
+ HarmonyInstance.PatchAll(type);
+ }
+ catch (Exception e)
+ {
+ LoggerInstance.Msg($"Failed while patching {type.Name}!");
+ LoggerInstance.Error(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/FuckToes/Properties/AssemblyInfo.cs b/FuckToes/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..cbba1cf
--- /dev/null
+++ b/FuckToes/Properties/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+using FuckToes.Properties;
+using MelonLoader;
+using System.Reflection;
+
+
+[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
+[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
+[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
+[assembly: AssemblyTitle(nameof(NAK.Melons.FuckToes))]
+[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
+[assembly: AssemblyProduct(nameof(NAK.Melons.FuckToes))]
+
+[assembly: MelonInfo(
+ typeof(NAK.Melons.FuckToes.FuckToesMod),
+ nameof(NAK.Melons.FuckToes),
+ AssemblyInfoParams.Version,
+ AssemblyInfoParams.Author,
+ downloadLink: "https://github.com/NotAKidOnSteam/FuckToes"
+)]
+
+[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
+[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
+[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
+[assembly: MelonOptionalDependencies("BTKUILib")]
+
+namespace FuckToes.Properties;
+internal static class AssemblyInfoParams
+{
+ public const string Version = "1.0.0";
+ public const string Author = "NotAKidoS";
+}
\ No newline at end of file
diff --git a/FuckToes/format.json b/FuckToes/format.json
new file mode 100644
index 0000000..a19b0a9
--- /dev/null
+++ b/FuckToes/format.json
@@ -0,0 +1,23 @@
+{
+ "_id": -1,
+ "name": "FuckToes",
+ "modversion": "1.0.0",
+ "gameversion": "2022r170",
+ "loaderversion": "0.5.7",
+ "modtype": "Mod",
+ "author": "NotAKidoS",
+ "description": "Prevents VRIK from using toe bones in VR & optionaly FBT.\n\nVRIK calculates weird center of mass when toes are mapped, so it is sometimes desired to unmap toes to prevent an avatars feet from resting far back.",
+ "searchtags": [
+ "toes",
+ "vrik",
+ "ik",
+ "feet"
+ ],
+ "requirements": [
+ "None"
+ ],
+ "downloadlink": "https://github.com/NotAKidOnSteam/HalfbodyIKFixes/releases/download/v1.0.0/FuckToes.dll",
+ "sourcelink": "https://github.com/NotAKidOnSteam/FuckToes/",
+ "changelog": "- Initial Release",
+ "embedcolor": "9b59b6"
+}
\ No newline at end of file