mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
major cleanup
This commit is contained in:
parent
b33e15377f
commit
e5242f76c7
85 changed files with 584 additions and 571 deletions
|
@ -15,7 +15,7 @@ using System.Reflection;
|
||||||
nameof(NAK.AASBufferFix),
|
nameof(NAK.AASBufferFix),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/AASBufferFix"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/AASBufferFix"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/AASBufferFix/releases/download/v1.0.5/AASBufferFix.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/AASBufferFix.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/AASBufferFix/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/AASBufferFix/",
|
||||||
"changelog": "- Don't send AAS while switching avatar.\n\nPlease read the changelog for [v1.0.5](https://github.com/NotAKidOnSteam/AASBufferFix/releases/tag/v1.0.5) for better understanding of why syncing nothing may be worse than syncing garbage AAS.",
|
"changelog": "",
|
||||||
"embedcolor": "9b59b6"
|
"embedcolor": "9b59b6"
|
||||||
}
|
}
|
|
@ -6,17 +6,17 @@ namespace NAK.BadAnimatorFix;
|
||||||
|
|
||||||
public static class BadAnimatorFixManager
|
public static class BadAnimatorFixManager
|
||||||
{
|
{
|
||||||
private static List<BadAnimatorFix> badAnimatorFixes = new List<BadAnimatorFix>();
|
private static List<BadAnimatorFixer> badAnimatorFixes = new List<BadAnimatorFixer>();
|
||||||
private static int currentIndex = 0;
|
private static int currentIndex = 0;
|
||||||
private static float checkInterval = 5f;
|
private static float checkInterval = 5f;
|
||||||
|
|
||||||
public static void Add(BadAnimatorFix bad)
|
public static void Add(BadAnimatorFixer bad)
|
||||||
{
|
{
|
||||||
if (!badAnimatorFixes.Contains(bad))
|
if (!badAnimatorFixes.Contains(bad))
|
||||||
badAnimatorFixes.Add(bad);
|
badAnimatorFixes.Add(bad);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Remove(BadAnimatorFix bad)
|
public static void Remove(BadAnimatorFixer bad)
|
||||||
{
|
{
|
||||||
if (badAnimatorFixes.Contains(bad))
|
if (badAnimatorFixes.Contains(bad))
|
||||||
badAnimatorFixes.Remove(bad);
|
badAnimatorFixes.Remove(bad);
|
||||||
|
@ -24,7 +24,7 @@ public static class BadAnimatorFixManager
|
||||||
|
|
||||||
public static void OnPlayerLoaded()
|
public static void OnPlayerLoaded()
|
||||||
{
|
{
|
||||||
ToggleJob(BadAnimatorFixMod.EntryEnabled.Value);
|
ToggleJob(BadAnimatorFix.EntryEnabled.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OnSceneInitialized(string sceneName)
|
public static void OnSceneInitialized(string sceneName)
|
||||||
|
@ -36,9 +36,9 @@ public static class BadAnimatorFixManager
|
||||||
foreach (var animator in allAnimators)
|
foreach (var animator in allAnimators)
|
||||||
{
|
{
|
||||||
// Ignore objects that have our "fix", this shouldn't be needed but eh
|
// Ignore objects that have our "fix", this shouldn't be needed but eh
|
||||||
if (!animator.TryGetComponent<BadAnimatorFix>(out _))
|
if (!animator.TryGetComponent<BadAnimatorFixer>(out _))
|
||||||
{
|
{
|
||||||
animator.gameObject.AddComponent<BadAnimatorFix>();
|
animator.gameObject.AddComponent<BadAnimatorFixer>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public static class BadAnimatorFixManager
|
||||||
if (badAnimatorFixes.Count == 0) return;
|
if (badAnimatorFixes.Count == 0) return;
|
||||||
currentIndex = (currentIndex + 1) % badAnimatorFixes.Count;
|
currentIndex = (currentIndex + 1) % badAnimatorFixes.Count;
|
||||||
|
|
||||||
BadAnimatorFix currentAnimatorFix = badAnimatorFixes[currentIndex];
|
BadAnimatorFixer currentAnimatorFix = badAnimatorFixes[currentIndex];
|
||||||
currentAnimatorFix.AttemptRewindAnimator();
|
currentAnimatorFix.AttemptRewindAnimator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ using UnityEngine.Playables;
|
||||||
|
|
||||||
namespace NAK.BadAnimatorFix;
|
namespace NAK.BadAnimatorFix;
|
||||||
|
|
||||||
public class BadAnimatorFix : MonoBehaviour
|
public class BadAnimatorFixer : MonoBehaviour
|
||||||
{
|
{
|
||||||
private const float StateLimit = 20f;
|
private const float StateLimit = 20f;
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ public class BadAnimatorFix : MonoBehaviour
|
||||||
PlayableExtensions.SetTime<Playable>(animator.playableGraph.GetRootPlayable(0), 0);
|
PlayableExtensions.SetTime<Playable>(animator.playableGraph.GetRootPlayable(0), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BadAnimatorFixMod.EntryLogging.Value)
|
if (BadAnimatorFix.EntryLogging.Value)
|
||||||
{
|
{
|
||||||
string message = rewound ? $"Rewound animator and playable {animator}." : $"Animator did not meet criteria to rewind {animator}.";
|
string message = rewound ? $"Rewound animator and playable {animator}." : $"Animator did not meet criteria to rewind {animator}.";
|
||||||
BadAnimatorFixMod.Logger.Msg(message);
|
BadAnimatorFix.Logger.Msg(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -19,7 +19,7 @@ internal static class AnimatorPatches
|
||||||
[HarmonyPatch(typeof(CVRAvatar), "Start")]
|
[HarmonyPatch(typeof(CVRAvatar), "Start")]
|
||||||
private static void Postfix_CVRAvatar_Start(CVRAvatar __instance)
|
private static void Postfix_CVRAvatar_Start(CVRAvatar __instance)
|
||||||
{
|
{
|
||||||
if (!BadAnimatorFixMod.EntryCVRAvatar.Value) return;
|
if (!BadAnimatorFix.EntryCVRAvatar.Value) return;
|
||||||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ internal static class AnimatorPatches
|
||||||
[HarmonyPatch(typeof(CVRSpawnable), "Start")]
|
[HarmonyPatch(typeof(CVRSpawnable), "Start")]
|
||||||
private static void Postfix_CVRSpawnable_Start(CVRSpawnable __instance)
|
private static void Postfix_CVRSpawnable_Start(CVRSpawnable __instance)
|
||||||
{
|
{
|
||||||
if (!BadAnimatorFixMod.EntryCVRSpawnable.Value) return;
|
if (!BadAnimatorFix.EntryCVRSpawnable.Value) return;
|
||||||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ internal static class AnimatorPatches
|
||||||
[HarmonyPatch(typeof(CVR_MenuManager), "Start")]
|
[HarmonyPatch(typeof(CVR_MenuManager), "Start")]
|
||||||
private static void Postfix_CVR_MenuManager_Start(ref CVR_MenuManager __instance)
|
private static void Postfix_CVR_MenuManager_Start(ref CVR_MenuManager __instance)
|
||||||
{
|
{
|
||||||
if (!BadAnimatorFixMod.EntryMenus.Value) return;
|
if (!BadAnimatorFix.EntryMenus.Value) return;
|
||||||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ internal static class AnimatorPatches
|
||||||
[HarmonyPatch(typeof(ViewManager), "Start")]
|
[HarmonyPatch(typeof(ViewManager), "Start")]
|
||||||
private static void Postfix_ViewManager_Start(ref ViewManager __instance)
|
private static void Postfix_ViewManager_Start(ref ViewManager __instance)
|
||||||
{
|
{
|
||||||
if (!BadAnimatorFixMod.EntryMenus.Value) return;
|
if (!BadAnimatorFix.EntryMenus.Value) return;
|
||||||
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
AddBadAnimatorFixComponentIfAnimatorExists(__instance.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ internal static class AnimatorPatches
|
||||||
Animator[] animators = gameObject.GetComponentsInChildren<Animator>(true);
|
Animator[] animators = gameObject.GetComponentsInChildren<Animator>(true);
|
||||||
foreach (Animator animator in animators)
|
foreach (Animator animator in animators)
|
||||||
{
|
{
|
||||||
if (!animator.TryGetComponent<BadAnimatorFix>(out _))
|
if (!animator.TryGetComponent<BadAnimatorFixer>(out _))
|
||||||
{
|
{
|
||||||
animator.gameObject.AddComponent<BadAnimatorFix>();
|
animator.gameObject.AddComponent<BadAnimatorFixer>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
namespace NAK.BadAnimatorFix;
|
namespace NAK.BadAnimatorFix;
|
||||||
|
|
||||||
public class BadAnimatorFixMod : MelonMod
|
public class BadAnimatorFix : MelonMod
|
||||||
{
|
{
|
||||||
internal static MelonLogger.Instance Logger;
|
internal static MelonLogger.Instance Logger;
|
||||||
public const string SettingsCategory = "BadAnimatorFix";
|
|
||||||
public static readonly MelonPreferences_Category CategoryBadAnimatorFix = MelonPreferences.CreateCategory(SettingsCategory);
|
public static readonly MelonPreferences_Category CategoryBadAnimatorFix =
|
||||||
|
MelonPreferences.CreateCategory(nameof(BadAnimatorFix));
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||||
CategoryBadAnimatorFix.CreateEntry("Enabled", true, description: "Toggle BadAnimatorFix entirely. Requires avatar/spawnable/world reload.");
|
CategoryBadAnimatorFix.CreateEntry("Enabled", true, description: "Toggle BadAnimatorFix entirely. Requires avatar/spawnable/world reload.");
|
||||||
|
|
|
@ -10,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.BadAnimatorFix))]
|
[assembly: AssemblyProduct(nameof(NAK.BadAnimatorFix))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.BadAnimatorFix.BadAnimatorFixMod),
|
typeof(NAK.BadAnimatorFix.BadAnimatorFixer),
|
||||||
nameof(NAK.BadAnimatorFix),
|
nameof(NAK.BadAnimatorFix),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/BadAnimatorFix"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/BadAnimatorFix"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/BadAnimatorFix/releases/download/v1.0.0/BadAnimatorFix.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/BadAnimatorFix.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/BadAnimatorFix/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/BadAnimatorFix/",
|
||||||
"changelog": "Initial Release",
|
"changelog": "Initial Release",
|
||||||
"embedcolor": "7F3F99"
|
"embedcolor": "7F3F99"
|
||||||
}
|
}
|
|
@ -44,14 +44,14 @@ static class AssetsHandler
|
||||||
ms_loadedAssets.Add(l_assetName, l_assetBundle);
|
ms_loadedAssets.Add(l_assetName, l_assetBundle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MelonLoader.MelonLogger.Warning("Unable to load bundled '" + l_assetName + "' asset");
|
Blackout.Logger.Warning("Unable to load bundled '" + l_assetName + "' asset");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MelonLoader.MelonLogger.Warning("Unable to get bundled '" + l_assetName + "' asset stream");
|
Blackout.Logger.Warning("Unable to get bundled '" + l_assetName + "' asset stream");
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
MelonLoader.MelonLogger.Warning("Unable to load bundled '" + l_assetName + "' asset, reason: " + e.Message);
|
Blackout.Logger.Warning("Unable to load bundled '" + l_assetName + "' asset, reason: " + e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace NAK.Blackout;
|
||||||
public class BlackoutController : MonoBehaviour
|
public class BlackoutController : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static BlackoutController Instance;
|
public static BlackoutController Instance;
|
||||||
|
|
||||||
// The current state of the player's consciousness.
|
// The current state of the player's consciousness.
|
||||||
public BlackoutState CurrentState = BlackoutState.Awake;
|
public BlackoutState CurrentState = BlackoutState.Awake;
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class BlackoutController : MonoBehaviour
|
||||||
blackoutAnimator = blackoutGO.GetComponent<Animator>();
|
blackoutAnimator = blackoutGO.GetComponent<Animator>();
|
||||||
if (!blackoutAnimator)
|
if (!blackoutAnimator)
|
||||||
{
|
{
|
||||||
MelonLogger.Error("Blackout: Could not find blackout animator component!");
|
Blackout.Logger.Error("Blackout: Could not find blackout animator component!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ public class BlackoutController : MonoBehaviour
|
||||||
//broken, needs to run next frame
|
//broken, needs to run next frame
|
||||||
private void SendHUDMessage(string message)
|
private void SendHUDMessage(string message)
|
||||||
{
|
{
|
||||||
MelonLogger.Msg(message);
|
Blackout.Logger.Msg(message);
|
||||||
if (!CohtmlHud.Instance || !HudMessages) return;
|
if (!CohtmlHud.Instance || !HudMessages) return;
|
||||||
|
|
||||||
StringBuilder secondmessage = new StringBuilder();
|
StringBuilder secondmessage = new StringBuilder();
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Core.Savior;
|
using ABI_RC.Core.Savior;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using MelonLoader;
|
|
||||||
|
|
||||||
namespace NAK.Blackout.HarmonyPatches;
|
namespace NAK.Blackout.HarmonyPatches;
|
||||||
|
|
||||||
|
@ -15,7 +14,7 @@ internal class HarmonyPatches
|
||||||
{
|
{
|
||||||
if (Blackout.inVR != MetaPort.Instance.isUsingVr)
|
if (Blackout.inVR != MetaPort.Instance.isUsingVr)
|
||||||
{
|
{
|
||||||
MelonLogger.Msg("VRMode change detected! Reinitializing Blackout Instance...");
|
Blackout.Logger.Msg("VRMode change detected! Reinitializing Blackout Instance...");
|
||||||
Blackout.inVR = MetaPort.Instance.isUsingVr;
|
Blackout.inVR = MetaPort.Instance.isUsingVr;
|
||||||
BlackoutController.Instance.SetupBlackoutInstance();
|
BlackoutController.Instance.SetupBlackoutInstance();
|
||||||
BlackoutController.Instance.ChangeBlackoutState(BlackoutController.BlackoutState.Awake);
|
BlackoutController.Instance.ChangeBlackoutState(BlackoutController.BlackoutState.Awake);
|
||||||
|
|
|
@ -13,7 +13,7 @@ public static class BTKUIAddon
|
||||||
Page miscPage = QuickMenuAPI.MiscTabPage;
|
Page miscPage = QuickMenuAPI.MiscTabPage;
|
||||||
Category miscCategory = miscPage.AddCategory(Blackout.SettingsCategory);
|
Category miscCategory = miscPage.AddCategory(Blackout.SettingsCategory);
|
||||||
|
|
||||||
AddMelonToggle(ref miscCategory, Blackout.m_entryEnabled);
|
AddMelonToggle(ref miscCategory, Blackout.EntryEnabled);
|
||||||
|
|
||||||
//Add my own page to not clog up Misc Menu
|
//Add my own page to not clog up Misc Menu
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ public static class BTKUIAddon
|
||||||
|
|
||||||
Category blackoutCategory = blackoutPage.AddCategory("Blackout");
|
Category blackoutCategory = blackoutPage.AddCategory("Blackout");
|
||||||
|
|
||||||
AddMelonToggle(ref blackoutCategory, Blackout.m_entryEnabled);
|
AddMelonToggle(ref blackoutCategory, Blackout.EntryEnabled);
|
||||||
|
|
||||||
//manual state changing
|
//manual state changing
|
||||||
var state_Awake = blackoutCategory.AddButton("Awake State", null, "Enter the Awake State.");
|
var state_Awake = blackoutCategory.AddButton("Awake State", null, "Enter the Awake State.");
|
||||||
|
@ -32,21 +32,21 @@ public static class BTKUIAddon
|
||||||
state_Drowsy.OnPress += () => BlackoutController.Instance?.ChangeBlackoutState(BlackoutController.BlackoutState.Drowsy);
|
state_Drowsy.OnPress += () => BlackoutController.Instance?.ChangeBlackoutState(BlackoutController.BlackoutState.Drowsy);
|
||||||
var state_Sleeping = blackoutCategory.AddButton("Sleeping State", null, "Enter the Sleeping State.");
|
var state_Sleeping = blackoutCategory.AddButton("Sleeping State", null, "Enter the Sleeping State.");
|
||||||
state_Sleeping.OnPress += () => BlackoutController.Instance?.ChangeBlackoutState(BlackoutController.BlackoutState.Sleeping);
|
state_Sleeping.OnPress += () => BlackoutController.Instance?.ChangeBlackoutState(BlackoutController.BlackoutState.Sleeping);
|
||||||
|
|
||||||
//dimming strength
|
//dimming strength
|
||||||
AddMelonSlider(ref blackoutPage, Blackout.m_entryDrowsyDimStrength, 0f, 1f);
|
AddMelonSlider(ref blackoutPage, Blackout.EntryDrowsyDimStrength, 0f, 1f);
|
||||||
|
|
||||||
//velocity dim multiplier
|
//velocity dim multiplier
|
||||||
AddMelonToggle(ref blackoutCategory, Blackout.m_entryDrowsyVelocityMultiplier);
|
AddMelonToggle(ref blackoutCategory, Blackout.EntryDrowsyVelocityMultiplier);
|
||||||
|
|
||||||
//hud messages
|
//hud messages
|
||||||
AddMelonToggle(ref blackoutCategory, Blackout.m_entryHudMessages);
|
AddMelonToggle(ref blackoutCategory, Blackout.EntryHudMessages);
|
||||||
|
|
||||||
//lower fps while sleep (desktop)
|
//lower fps while sleep (desktop)
|
||||||
AddMelonToggle(ref blackoutCategory, Blackout.m_entryDropFPSOnSleep);
|
AddMelonToggle(ref blackoutCategory, Blackout.EntryDropFPSOnSleep);
|
||||||
|
|
||||||
//auto sleep state
|
//auto sleep state
|
||||||
AddMelonToggle(ref blackoutCategory, Blackout.m_entryAutoSleepState);
|
AddMelonToggle(ref blackoutCategory, Blackout.EntryAutoSleepState);
|
||||||
|
|
||||||
//i will add the rest of the settings once BTKUILib supports int input
|
//i will add the rest of the settings once BTKUILib supports int input
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public static class BTKUIAddon
|
||||||
{
|
{
|
||||||
category.AddToggle(entry.DisplayName, entry.Description, entry.Value).OnValueUpdated += b => entry.Value = b;
|
category.AddToggle(entry.DisplayName, entry.Description, entry.Value).OnValueUpdated += b => entry.Value = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AddMelonSlider(ref Page page, MelonLoader.MelonPreferences_Entry<float> entry, float min, float max)
|
private static void AddMelonSlider(ref Page page, MelonLoader.MelonPreferences_Entry<float> entry, float min, float max)
|
||||||
{
|
{
|
||||||
page.AddSlider(entry.DisplayName, entry.Description, entry.Value, min, max).OnValueUpdated += f => entry.Value = f;
|
page.AddSlider(entry.DisplayName, entry.Description, entry.Value, min, max).OnValueUpdated += f => entry.Value = f;
|
||||||
|
|
|
@ -15,7 +15,6 @@ public static class UIExpansionKitAddon
|
||||||
also because it **used to work**... a game update broke it and uiexpansionkit hasnt updated since
|
also because it **used to work**... a game update broke it and uiexpansionkit hasnt updated since
|
||||||
|
|
||||||
what pisses me off more, is that DesktopVRSwitch works, and that was originally copied from Blackout -_-
|
what pisses me off more, is that DesktopVRSwitch works, and that was originally copied from Blackout -_-
|
||||||
https://github.com/NotAKidOnSteam/DesktopVRSwitch/blob/main/DesktopVRSwitch/UIExpansionKitAddon.cs
|
|
||||||
**/
|
**/
|
||||||
var settings = ExpansionKitApi.GetSettingsCategory(Blackout.SettingsCategory);
|
var settings = ExpansionKitApi.GetSettingsCategory(Blackout.SettingsCategory);
|
||||||
settings.AddSimpleButton("Awake State", AwakeState);
|
settings.AddSimpleButton("Awake State", AwakeState);
|
||||||
|
|
|
@ -7,52 +7,65 @@ namespace NAK.Blackout;
|
||||||
public class Blackout : MelonMod
|
public class Blackout : MelonMod
|
||||||
{
|
{
|
||||||
internal static bool inVR;
|
internal static bool inVR;
|
||||||
internal const string SettingsCategory = "Blackout";
|
internal static MelonLogger.Instance Logger;
|
||||||
|
internal const string SettingsCategory = nameof(Blackout);
|
||||||
|
|
||||||
internal static MelonPreferences_Category m_categoryBlackout;
|
public static readonly MelonPreferences_Category CategoryBlackout =
|
||||||
internal static MelonPreferences_Entry<bool>
|
MelonPreferences.CreateCategory(SettingsCategory);
|
||||||
m_entryEnabled,
|
|
||||||
m_entryAutoSleepState,
|
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||||
m_entryHudMessages,
|
CategoryBlackout.CreateEntry("Automatic State Change", true, "Should the screen automatically dim if head is still for enough time?");
|
||||||
m_entryDropFPSOnSleep,
|
|
||||||
m_entryDrowsyVelocityMultiplier;
|
public static readonly MelonPreferences_Entry<bool> EntryHudMessages =
|
||||||
internal static MelonPreferences_Entry<float>
|
CategoryBlackout.CreateEntry("Hud Messages", true, "Notify on state change.");
|
||||||
m_entryDrowsyThreshold, m_entryAwakeThreshold,
|
|
||||||
m_entryDrowsyModeTimer, m_entrySleepModeTimer,
|
public static readonly MelonPreferences_Entry<bool> EntryDropFPSOnSleep =
|
||||||
m_entryDrowsyDimStrength;
|
CategoryBlackout.CreateEntry("Limit FPS While Sleep", false, "Limits FPS to 5 while in Sleep State. This only works in Desktop, as SteamVR/HMD handles VR FPS.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryDrowsyVelocityMultiplier =
|
||||||
|
CategoryBlackout.CreateEntry("Drowsy Velocity Multiplier", true, "Should head velocity act as a multiplier to Drowsy Dim Strength?");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryAutoSleepState =
|
||||||
|
CategoryBlackout.CreateEntry("Auto Sleep State", true, "Should the sleep state be used during Automatic State Change?");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<float> EntryDrowsyThreshold =
|
||||||
|
CategoryBlackout.CreateEntry("Drowsy Threshold", 2f, "Velocity to return partial vision.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<float> EntryAwakeThreshold =
|
||||||
|
CategoryBlackout.CreateEntry("Awake Threshold", 4f, "Velocity to return full vision.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<float> EntryDrowsyModeTimer =
|
||||||
|
CategoryBlackout.CreateEntry("Enter Drowsy Time (Minutes)", 3f, "How many minutes without movement until enter drowsy mode.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<float> EntrySleepModeTimer =
|
||||||
|
CategoryBlackout.CreateEntry("Enter Sleep Time (Seconds)", 10f, "How many seconds without movement until enter sleep mode.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<float> EntryDrowsyDimStrength =
|
||||||
|
CategoryBlackout.CreateEntry("Drowsy Dim Strength", 0.6f, "How strong of a dimming effect should drowsy mode have.");
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
m_categoryBlackout = MelonPreferences.CreateCategory(SettingsCategory);
|
Logger = LoggerInstance;
|
||||||
m_entryEnabled = m_categoryBlackout.CreateEntry<bool>("Automatic State Change", true, description: "Should the screen automatically dim if head is still for enough time?");
|
EntryEnabled.OnEntryValueChangedUntyped.Subscribe(OnUpdateEnabled);
|
||||||
m_entryEnabled.OnEntryValueChangedUntyped.Subscribe(OnUpdateEnabled);
|
foreach (var entry in CategoryBlackout.Entries)
|
||||||
m_entryHudMessages = m_categoryBlackout.CreateEntry<bool>("Hud Messages", true, description: "Notify on state change.");
|
|
||||||
m_entryDropFPSOnSleep = m_categoryBlackout.CreateEntry<bool>("Limit FPS While Sleep", false, description: "Limits FPS to 5 while in Sleep State. This only works in Desktop, as SteamVR/HMD handles VR FPS.");
|
|
||||||
m_entryDrowsyVelocityMultiplier = m_categoryBlackout.CreateEntry<bool>("Drowsy Velocity Multiplier", true, description: "Should head velocity act as a multiplier to Drowsy Dim Strength?");
|
|
||||||
m_entryAutoSleepState = m_categoryBlackout.CreateEntry<bool>("Auto Sleep State", true, description: "Should the sleep state be used during Automatic State Change?");
|
|
||||||
m_entryDrowsyThreshold = m_categoryBlackout.CreateEntry<float>("Drowsy Threshold", 2f, description: "Velocity to return partial vision.");
|
|
||||||
m_entryAwakeThreshold = m_categoryBlackout.CreateEntry<float>("Awake Threshold", 4f, description: "Velocity to return full vision.");
|
|
||||||
m_entryDrowsyModeTimer = m_categoryBlackout.CreateEntry<float>("Enter Drowsy Time (Minutes)", 3f, description: "How many minutes without movement until enter drowsy mode.");
|
|
||||||
m_entrySleepModeTimer = m_categoryBlackout.CreateEntry<float>("Enter Sleep Time (Seconds)", 10f, description: "How many seconds without movement until enter sleep mode.");
|
|
||||||
m_entryDrowsyDimStrength = m_categoryBlackout.CreateEntry<float>("Drowsy Dim Strength", 0.6f, description: "How strong of a dimming effect should drowsy mode have.");
|
|
||||||
|
|
||||||
foreach (var setting in m_categoryBlackout.Entries)
|
|
||||||
{
|
{
|
||||||
if (!setting.OnEntryValueChangedUntyped.GetSubscribers().Any())
|
if (entry != EntryEnabled && !entry.OnEntryValueChangedUntyped.GetSubscribers().Any())
|
||||||
setting.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
{
|
||||||
|
entry.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//UIExpansionKit addon
|
//UIExpansionKit addon
|
||||||
if (MelonMod.RegisteredMelons.Any(it => it.Info.Name == "UI Expansion Kit"))
|
if (MelonMod.RegisteredMelons.Any(it => it.Info.Name == "UI Expansion Kit"))
|
||||||
{
|
{
|
||||||
MelonLogger.Msg("Initializing UIExpansionKit support.");
|
Logger.Msg("Initializing UIExpansionKit support.");
|
||||||
UIExpansionKitAddon.Init();
|
UIExpansionKitAddon.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
//BTKUILib addon
|
//BTKUILib addon
|
||||||
if (MelonMod.RegisteredMelons.Any(it => it.Info.Name == "BTKUILib"))
|
if (MelonMod.RegisteredMelons.Any(it => it.Info.Name == "BTKUILib"))
|
||||||
{
|
{
|
||||||
MelonLogger.Msg("Initializing BTKUILib support.");
|
Logger.Msg("Initializing BTKUILib support.");
|
||||||
BTKUIAddon.Init();
|
BTKUIAddon.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +94,7 @@ public class Blackout : MelonMod
|
||||||
private void OnEnabled()
|
private void OnEnabled()
|
||||||
{
|
{
|
||||||
if (!BlackoutController.Instance) return;
|
if (!BlackoutController.Instance) return;
|
||||||
if (m_entryEnabled.Value)
|
if (EntryEnabled.Value)
|
||||||
{
|
{
|
||||||
BlackoutController.Instance.OnEnable();
|
BlackoutController.Instance.OnEnable();
|
||||||
}
|
}
|
||||||
|
@ -89,21 +102,21 @@ public class Blackout : MelonMod
|
||||||
{
|
{
|
||||||
BlackoutController.Instance.OnDisable();
|
BlackoutController.Instance.OnDisable();
|
||||||
}
|
}
|
||||||
BlackoutController.Instance.AutomaticStateChange = m_entryEnabled.Value;
|
BlackoutController.Instance.AutomaticStateChange = EntryEnabled.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAllSettings()
|
private void UpdateAllSettings()
|
||||||
{
|
{
|
||||||
if (!BlackoutController.Instance) return;
|
if (!BlackoutController.Instance) return;
|
||||||
BlackoutController.Instance.HudMessages = m_entryHudMessages.Value;
|
BlackoutController.Instance.HudMessages = EntryHudMessages.Value;
|
||||||
BlackoutController.Instance.AutoSleepState = m_entryAutoSleepState.Value;
|
BlackoutController.Instance.AutoSleepState = EntryAutoSleepState.Value;
|
||||||
BlackoutController.Instance.DropFPSOnSleep = m_entryDropFPSOnSleep.Value;
|
BlackoutController.Instance.DropFPSOnSleep = EntryDropFPSOnSleep.Value;
|
||||||
BlackoutController.Instance.drowsyThreshold = m_entryDrowsyThreshold.Value;
|
BlackoutController.Instance.drowsyThreshold = EntryDrowsyThreshold.Value;
|
||||||
BlackoutController.Instance.wakeThreshold = m_entryAwakeThreshold.Value;
|
BlackoutController.Instance.wakeThreshold = EntryAwakeThreshold.Value;
|
||||||
BlackoutController.Instance.DrowsyModeTimer = m_entryDrowsyModeTimer.Value;
|
BlackoutController.Instance.DrowsyModeTimer = EntryDrowsyModeTimer.Value;
|
||||||
BlackoutController.Instance.SleepModeTimer = m_entrySleepModeTimer.Value;
|
BlackoutController.Instance.SleepModeTimer = EntrySleepModeTimer.Value;
|
||||||
BlackoutController.Instance.DrowsyDimStrength = m_entryDrowsyDimStrength.Value;
|
BlackoutController.Instance.DrowsyDimStrength = EntryDrowsyDimStrength.Value;
|
||||||
BlackoutController.Instance.DrowsyVelocityMultiplier = m_entryDrowsyVelocityMultiplier.Value;
|
BlackoutController.Instance.DrowsyVelocityMultiplier = EntryDrowsyVelocityMultiplier.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUpdateEnabled(object arg1, object arg2) => OnEnabled();
|
private void OnUpdateEnabled(object arg1, object arg2) => OnEnabled();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using NAK.Blackout.Properties;
|
using MelonLoader;
|
||||||
using MelonLoader;
|
using NAK.Blackout.Properties;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ using System.Reflection;
|
||||||
nameof(NAK.Blackout),
|
nameof(NAK.Blackout),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/Blackout"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/Blackout"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
"BTKUILib",
|
"BTKUILib",
|
||||||
"UIExpansionKit"
|
"UIExpansionKit"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/Blackout/releases/download/v2.0.0/Blackout.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/Blackout.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/Blackout/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/Blackout/",
|
||||||
"changelog": "- Added BTKUILib support.\n- Added dimming strength velocity multiplier option.\n- Added option to not use Automatic Sleep State.\n- Dimming strengh now updates in realtime when configuring.",
|
"changelog": "- Added BTKUILib support.\n- Added dimming strength velocity multiplier option.\n- Added option to not use Automatic Sleep State.\n- Dimming strengh now updates in realtime when configuring.",
|
||||||
"embedcolor": "#161b22"
|
"embedcolor": "#161b22"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
using CVRGizmos.GismoTypes;
|
using CVRGizmos.GismoTypes;
|
||||||
using Gizmos = Popcron.Gizmos;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Gizmos = Popcron.Gizmos;
|
||||||
|
|
||||||
namespace CVRGizmos
|
namespace CVRGizmos
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,49 +31,49 @@ namespace CVRGizmos.GismoTypes
|
||||||
CacheGizmos();
|
CacheGizmos();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (references[i].target == null)
|
if (references[i].target == null)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (references[i].maxDistance < references[i].minDistance && references[i].maxDistance != 0f)
|
if (references[i].maxDistance < references[i].minDistance && references[i].maxDistance != 0f)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Vector3 normalized = (references[i].transform.position - references[i].target.position).normalized;
|
Vector3 normalized = (references[i].transform.position - references[i].target.position).normalized;
|
||||||
|
|
||||||
//BUG: Matrix addition isn't reset, other gizmo types Matrix will persist.
|
//BUG: Matrix addition isn't reset, other gizmo types Matrix will persist.
|
||||||
//This gizmo type could be a bit fucked, but I don't have the time to test.
|
//This gizmo type could be a bit fucked, but I don't have the time to test.
|
||||||
Gizmos.Matrix = Matrix4x4.identity;
|
Gizmos.Matrix = Matrix4x4.identity;
|
||||||
|
|
||||||
if (references[i].minDistance == 0f)
|
if (references[i].minDistance == 0f)
|
||||||
{
|
{
|
||||||
if (references[i].maxDistance == 0f)
|
if (references[i].maxDistance == 0f)
|
||||||
{
|
{
|
||||||
Gizmos.Color = Color.green;
|
Gizmos.Color = Color.green;
|
||||||
Gizmos.Line(references[i].target.position, normalized * 9999f);
|
Gizmos.Line(references[i].target.position, normalized * 9999f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Gizmos.Color = Color.green;
|
Gizmos.Color = Color.green;
|
||||||
Gizmos.Line(references[i].target.position, references[i].target.position + normalized * references[i].maxDistance);
|
Gizmos.Line(references[i].target.position, references[i].target.position + normalized * references[i].maxDistance);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (references[i].maxDistance == 0f)
|
if (references[i].maxDistance == 0f)
|
||||||
{
|
{
|
||||||
Gizmos.Color = Color.red;
|
Gizmos.Color = Color.red;
|
||||||
Gizmos.Line(references[i].target.position, references[i].target.position + normalized * references[i].minDistance);
|
Gizmos.Line(references[i].target.position, references[i].target.position + normalized * references[i].minDistance);
|
||||||
Gizmos.Color = Color.green;
|
Gizmos.Color = Color.green;
|
||||||
Gizmos.Line(references[i].target.position + normalized * references[i].minDistance, normalized * 9999f);
|
Gizmos.Line(references[i].target.position + normalized * references[i].minDistance, normalized * 9999f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Gizmos.Color = Color.red;
|
Gizmos.Color = Color.red;
|
||||||
Gizmos.Line(references[i].target.position, references[i].target.position + normalized * references[i].minDistance);
|
Gizmos.Line(references[i].target.position, references[i].target.position + normalized * references[i].minDistance);
|
||||||
Gizmos.Color = Color.green;
|
Gizmos.Color = Color.green;
|
||||||
Gizmos.Line(references[i].target.position + normalized * references[i].minDistance, references[i].target.position + normalized * references[i].maxDistance);
|
Gizmos.Line(references[i].target.position + normalized * references[i].minDistance, references[i].target.position + normalized * references[i].maxDistance);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,28 +1,22 @@
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using UnityEngine;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace CVRGizmos;
|
namespace CVRGizmos;
|
||||||
|
|
||||||
public class CVRGizmos : MelonMod
|
public class CVRGizmos : MelonMod
|
||||||
{
|
{
|
||||||
|
public static readonly MelonPreferences_Category CategoryCVRGizmos =
|
||||||
|
MelonPreferences.CreateCategory(nameof(CVRGizmos));
|
||||||
|
|
||||||
private static MelonPreferences_Category m_categoryCVRGizmos;
|
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||||
private static MelonPreferences_Entry<bool> m_entryCVRGizmosEnabled;
|
CategoryCVRGizmos.CreateEntry("Enabled", false, description: "Toggle CVR Gizmos entirely.", dont_save_default: true);
|
||||||
private static MelonPreferences_Entry<bool> m_entryCVRGizmosLocalOnly;
|
|
||||||
|
|
||||||
public override void OnApplicationStart()
|
public static readonly MelonPreferences_Entry<bool> EntryLocalOnly =
|
||||||
|
CategoryCVRGizmos.CreateEntry("Local Only", false, description: "Toggle CVR Gizmos local-only mode.", dont_save_default: true);
|
||||||
|
|
||||||
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
m_categoryCVRGizmos = MelonPreferences.CreateCategory(nameof(CVRGizmos));
|
|
||||||
m_entryCVRGizmosEnabled = m_categoryCVRGizmos.CreateEntry<bool>("Enabled", false);
|
|
||||||
m_entryCVRGizmosLocalOnly = m_categoryCVRGizmos.CreateEntry<bool>("Local Only", false);
|
|
||||||
m_entryCVRGizmosEnabled.Value = false;
|
|
||||||
|
|
||||||
m_categoryCVRGizmos.SaveToFile(false);
|
|
||||||
m_entryCVRGizmosEnabled.OnValueChangedUntyped += CVRGizmosEnabled;
|
|
||||||
m_entryCVRGizmosLocalOnly.OnValueChangedUntyped += CVRGizmosLocalOnly;
|
|
||||||
|
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,13 +31,13 @@ public class CVRGizmos : MelonMod
|
||||||
public void CVRGizmosEnabled()
|
public void CVRGizmosEnabled()
|
||||||
{
|
{
|
||||||
if (!CVRGizmoManager.Instance) return;
|
if (!CVRGizmoManager.Instance) return;
|
||||||
CVRGizmoManager.Instance.EnableGizmos(m_entryCVRGizmosEnabled.Value);
|
CVRGizmoManager.Instance.EnableGizmos(EntryEnabled.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CVRGizmosLocalOnly()
|
public void CVRGizmosLocalOnly()
|
||||||
{
|
{
|
||||||
if (!CVRGizmoManager.Instance) return;
|
if (!CVRGizmoManager.Instance) return;
|
||||||
CVRGizmoManager.Instance.g_localOnly = m_entryCVRGizmosLocalOnly.Value;
|
CVRGizmoManager.Instance.g_localOnly = EntryLocalOnly.Value;
|
||||||
CVRGizmoManager.Instance.RefreshGizmos();
|
CVRGizmoManager.Instance.RefreshGizmos();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,6 @@
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -15,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(CVRGizmos),
|
nameof(CVRGizmos),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/CVRGizmos"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/CVRGizmos"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/CVRGizmos/releases/download/r2/CVRGizmos.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/CVRGizmos.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/CVRGizmos/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/CVRGizmos/",
|
||||||
"changelog": "Added option to scale player collision. Fixed some VR specific issues.",
|
"changelog": "Added option to scale player collision. Fixed some VR specific issues.",
|
||||||
"embedcolor": "804221"
|
"embedcolor": "804221"
|
||||||
}
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
using ABI_RC.Core;
|
using ABI_RC.Core;
|
||||||
using ABI_RC.Core.Base;
|
using ABI_RC.Core.Base;
|
||||||
using Kafe.ChatBox;
|
|
||||||
|
|
||||||
namespace NAK.ChatBoxExtensions.Integrations;
|
namespace NAK.ChatBoxExtensions.Integrations;
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,30 @@
|
||||||
namespace NAK.ChatBoxExtensions.Integrations;
|
namespace NAK.ChatBoxExtensions.Integrations;
|
||||||
|
|
||||||
public static class Commands {
|
public static class Commands
|
||||||
|
{
|
||||||
|
|
||||||
private const string Character = "/";
|
private const string Character = "/";
|
||||||
private static readonly List<Command> CommandList = new();
|
private static readonly List<Command> CommandList = new();
|
||||||
|
|
||||||
internal static void InitializeCommandHandlers() {
|
internal static void InitializeCommandHandlers()
|
||||||
|
{
|
||||||
Kafe.ChatBox.API.OnMessageSent += (source, msg, notification, displayMsg) => HandleSentCommand(msg, notification, displayMsg);
|
Kafe.ChatBox.API.OnMessageSent += (source, msg, notification, displayMsg) => HandleSentCommand(msg, notification, displayMsg);
|
||||||
Kafe.ChatBox.API.OnMessageReceived += (source, sender, msg, notification, displayMsg) => HandleReceivedCommand(sender, msg, notification, displayMsg);
|
Kafe.ChatBox.API.OnMessageReceived += (source, sender, msg, notification, displayMsg) => HandleReceivedCommand(sender, msg, notification, displayMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void RegisterCommand(string prefix, Action<string, bool, bool> onCommandSent = null, Action<string, string, bool, bool> onCommandReceived = null) {
|
internal static void RegisterCommand(string prefix, Action<string, bool, bool> onCommandSent = null, Action<string, string, bool, bool> onCommandReceived = null)
|
||||||
|
{
|
||||||
var cmd = new Command { Prefix = prefix, OnCommandSent = onCommandSent, OnCommandReceived = onCommandReceived };
|
var cmd = new Command { Prefix = prefix, OnCommandSent = onCommandSent, OnCommandReceived = onCommandReceived };
|
||||||
CommandList.Add(cmd);
|
CommandList.Add(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void UnregisterCommand(string prefix) {
|
internal static void UnregisterCommand(string prefix)
|
||||||
|
{
|
||||||
CommandList.RemoveAll(cmd => cmd.Prefix == prefix);
|
CommandList.RemoveAll(cmd => cmd.Prefix == prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Command {
|
private class Command
|
||||||
|
{
|
||||||
|
|
||||||
internal string Prefix;
|
internal string Prefix;
|
||||||
|
|
||||||
|
@ -30,16 +35,20 @@ public static class Commands {
|
||||||
internal Action<string, string, bool, bool> OnCommandReceived;
|
internal Action<string, string, bool, bool> OnCommandReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void HandleSentCommand(string message, bool notification, bool displayMsg) {
|
private static void HandleSentCommand(string message, bool notification, bool displayMsg)
|
||||||
|
{
|
||||||
if (!message.StartsWith(Character)) return;
|
if (!message.StartsWith(Character)) return;
|
||||||
foreach (var command in CommandList.Where(command => message.StartsWith(Character + command.Prefix))) {
|
foreach (var command in CommandList.Where(command => message.StartsWith(Character + command.Prefix)))
|
||||||
|
{
|
||||||
command.OnCommandSent?.Invoke(message, notification, displayMsg);
|
command.OnCommandSent?.Invoke(message, notification, displayMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void HandleReceivedCommand(string sender, string message, bool notification, bool displayMsg) {
|
private static void HandleReceivedCommand(string sender, string message, bool notification, bool displayMsg)
|
||||||
|
{
|
||||||
if (!message.StartsWith(Character)) return;
|
if (!message.StartsWith(Character)) return;
|
||||||
foreach (var command in CommandList.Where(command => message.StartsWith(Character + command.Prefix))) {
|
foreach (var command in CommandList.Where(command => message.StartsWith(Character + command.Prefix)))
|
||||||
|
{
|
||||||
command.OnCommandReceived?.Invoke(sender, message, notification, displayMsg);
|
command.OnCommandReceived?.Invoke(sender, message, notification, displayMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ using System.Reflection;
|
||||||
nameof(NAK.ChatBoxExtensions),
|
nameof(NAK.ChatBoxExtensions),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/ChatBoxExtensions"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ChatBoxExtensions"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/ChatBoxExtensions/releases/download/v1.0.1/ChatBoxExtensions.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/ChatBoxExtensions.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/ChatBoxExtensions/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ChatBoxExtensions/",
|
||||||
"changelog": "- Initial Release\n- No double patching. Bad. Stinky. Dont do it.",
|
"changelog": "",
|
||||||
"embedcolor": "#ffc700"
|
"embedcolor": "#ffc700"
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
using NAK.ClearHudNotifications.Properties;
|
using MelonLoader;
|
||||||
using MelonLoader;
|
using NAK.ClearHudNotifications.Properties;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ using System.Reflection;
|
||||||
nameof(NAK.ClearHudNotifications),
|
nameof(NAK.ClearHudNotifications),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/UndoPropButton"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/UndoPropButton"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/ClearHudNotifications/releases/download/v1.0.0/ClearHudNotifications.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/ClearHudNotifications.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/ClearHudNotifications/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ClearHudNotifications/",
|
||||||
"changelog": "- Initial Release",
|
"changelog": "- Initial Release",
|
||||||
"embedcolor": "#6495ED"
|
"embedcolor": "#6495ED"
|
||||||
}
|
}
|
|
@ -200,7 +200,7 @@ internal class DesktopVRIKSystem : MonoBehaviour
|
||||||
|
|
||||||
_cameraTransform = playerSetup.desktopCamera.transform;
|
_cameraTransform = playerSetup.desktopCamera.transform;
|
||||||
|
|
||||||
DesktopVRIKMod.UpdateAllSettings();
|
DesktopVRIK.UpdateAllSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using ABI.CCK.Components;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
|
|
|
@ -12,35 +12,35 @@ public static class BTKUIAddon
|
||||||
//Add myself to the Misc Menu
|
//Add myself to the Misc Menu
|
||||||
|
|
||||||
Page miscPage = QuickMenuAPI.MiscTabPage;
|
Page miscPage = QuickMenuAPI.MiscTabPage;
|
||||||
Category miscCategory = miscPage.AddCategory(DesktopVRIKMod.SettingsCategory);
|
Category miscCategory = miscPage.AddCategory(DesktopVRIK.SettingsCategory);
|
||||||
|
|
||||||
AddMelonToggle(ref miscCategory, DesktopVRIKMod.EntryEnabled);
|
AddMelonToggle(ref miscCategory, DesktopVRIK.EntryEnabled);
|
||||||
|
|
||||||
//Add my own page to not clog up Misc Menu
|
//Add my own page to not clog up Misc Menu
|
||||||
Page desktopVRIKPage = miscCategory.AddPage("DesktopVRIK Settings", "", "Configure the settings for DesktopVRIK.", "DesktopVRIK");
|
Page desktopVRIKPage = miscCategory.AddPage("DesktopVRIK Settings", "", "Configure the settings for DesktopVRIK.", "DesktopVRIK");
|
||||||
desktopVRIKPage.MenuTitle = "DesktopVRIK Settings";
|
desktopVRIKPage.MenuTitle = "DesktopVRIK Settings";
|
||||||
Category desktopVRIKCategory = desktopVRIKPage.AddCategory(DesktopVRIKMod.SettingsCategory);
|
Category desktopVRIKCategory = desktopVRIKPage.AddCategory(DesktopVRIK.SettingsCategory);
|
||||||
|
|
||||||
// General Settings
|
// General Settings
|
||||||
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIKMod.EntryPlantFeet);
|
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIK.EntryPlantFeet);
|
||||||
|
|
||||||
// Calibration Settings
|
// Calibration Settings
|
||||||
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIKMod.EntryUseVRIKToes);
|
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIK.EntryUseVRIKToes);
|
||||||
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIKMod.EntryFindUnmappedToes);
|
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIK.EntryFindUnmappedToes);
|
||||||
|
|
||||||
// Fine-tuning Settings
|
// Fine-tuning Settings
|
||||||
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIKMod.EntryResetFootstepsOnIdle);
|
AddMelonToggle(ref desktopVRIKCategory, DesktopVRIK.EntryResetFootstepsOnIdle);
|
||||||
|
|
||||||
// Body Leaning Weight
|
// Body Leaning Weight
|
||||||
AddMelonSlider(ref desktopVRIKPage, DesktopVRIKMod.EntryBodyLeanWeight, 0, 1f, 1);
|
AddMelonSlider(ref desktopVRIKPage, DesktopVRIK.EntryBodyLeanWeight, 0, 1f, 1);
|
||||||
|
|
||||||
// Max Root Heading Limit & Weights
|
// Max Root Heading Limit & Weights
|
||||||
AddMelonSlider(ref desktopVRIKPage, DesktopVRIKMod.EntryBodyHeadingLimit, 0, 90f, 0);
|
AddMelonSlider(ref desktopVRIKPage, DesktopVRIK.EntryBodyHeadingLimit, 0, 90f, 0);
|
||||||
AddMelonSlider(ref desktopVRIKPage, DesktopVRIKMod.EntryPelvisHeadingWeight, 0, 1f, 1);
|
AddMelonSlider(ref desktopVRIKPage, DesktopVRIK.EntryPelvisHeadingWeight, 0, 1f, 1);
|
||||||
AddMelonSlider(ref desktopVRIKPage, DesktopVRIKMod.EntryChestHeadingWeight, 0, 1f, 1);
|
AddMelonSlider(ref desktopVRIKPage, DesktopVRIK.EntryChestHeadingWeight, 0, 1f, 1);
|
||||||
|
|
||||||
// Lerp Speed
|
// Lerp Speed
|
||||||
AddMelonSlider(ref desktopVRIKPage, DesktopVRIKMod.EntryIKLerpSpeed, 0, 20f, 0);
|
AddMelonSlider(ref desktopVRIKPage, DesktopVRIK.EntryIKLerpSpeed, 0, 20f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AddMelonToggle(ref Category category, MelonLoader.MelonPreferences_Entry<bool> entry)
|
private static void AddMelonToggle(ref Category category, MelonLoader.MelonPreferences_Entry<bool> entry)
|
||||||
|
|
|
@ -3,11 +3,13 @@ using UnityEngine;
|
||||||
|
|
||||||
namespace NAK.DesktopVRIK;
|
namespace NAK.DesktopVRIK;
|
||||||
|
|
||||||
public class DesktopVRIKMod : MelonMod
|
public class DesktopVRIK : MelonMod
|
||||||
{
|
{
|
||||||
internal static MelonLogger.Instance Logger;
|
internal static MelonLogger.Instance Logger;
|
||||||
public const string SettingsCategory = "DesktopVRIK";
|
internal const string SettingsCategory = nameof(DesktopVRIK);
|
||||||
public static readonly MelonPreferences_Category CategoryDesktopVRIK = MelonPreferences.CreateCategory(SettingsCategory);
|
|
||||||
|
public static readonly MelonPreferences_Category CategoryDesktopVRIK =
|
||||||
|
MelonPreferences.CreateCategory(SettingsCategory);
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||||
CategoryDesktopVRIK.CreateEntry("Enabled", true, description: "Toggle DesktopVRIK entirely. Requires avatar reload.");
|
CategoryDesktopVRIK.CreateEntry("Enabled", true, description: "Toggle DesktopVRIK entirely. Requires avatar reload.");
|
||||||
|
@ -97,7 +99,7 @@ public class DesktopVRIKMod : MelonMod
|
||||||
|
|
||||||
// Integration Settings
|
// Integration Settings
|
||||||
DesktopVRIKSystem.Instance.Setting_IntegrationAMT = EntryIntegrationAMT.Value && integration_AMT;
|
DesktopVRIKSystem.Instance.Setting_IntegrationAMT = EntryIntegrationAMT.Value && integration_AMT;
|
||||||
|
|
||||||
// Funny Settings
|
// Funny Settings
|
||||||
DesktopVRIKSystem.Instance.Setting_ProneThrusting = EntryProneThrusting.Value;
|
DesktopVRIKSystem.Instance.Setting_ProneThrusting = EntryProneThrusting.Value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.DesktopVRIK))]
|
[assembly: AssemblyProduct(nameof(NAK.DesktopVRIK))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.DesktopVRIK.DesktopVRIKMod),
|
typeof(NAK.DesktopVRIK.DesktopVRIK),
|
||||||
nameof(NAK.DesktopVRIK),
|
nameof(NAK.DesktopVRIK),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/DesktopVRIK"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRIK"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"BTKUILib"
|
"BTKUILib"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r2/DesktopVRIK.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/DesktopVRIK.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRIK",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRIK/",
|
||||||
"changelog": "- Fixed feet targeting previous movement parent position for a frame.\n- Fixed issue with incorrect initialHeadHeight value causing avatar to always have footsteps disabled.",
|
"changelog": "- Fixed feet targeting previous movement parent position for a frame.\n- Fixed issue with incorrect initialHeadHeight value causing avatar to always have footsteps disabled.",
|
||||||
"embedcolor": "9b59b6"
|
"embedcolor": "9b59b6"
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@ using Valve.VR;
|
||||||
|
|
||||||
namespace NAK.DesktopVRSwitch;
|
namespace NAK.DesktopVRSwitch;
|
||||||
|
|
||||||
public class DesktopVRSwitch : MonoBehaviour
|
public class DesktopVRSwitcher : MonoBehaviour
|
||||||
{
|
{
|
||||||
//Debug Settings
|
//Debug Settings
|
||||||
public bool _reloadLocalAvatar = true;
|
public bool _reloadLocalAvatar = true;
|
||||||
|
@ -52,7 +52,7 @@ public class DesktopVRSwitch : MonoBehaviour
|
||||||
yield return null; //wait a frame before checking
|
yield return null; //wait a frame before checking
|
||||||
if (!string.IsNullOrEmpty(XRSettings.loadedDeviceName))
|
if (!string.IsNullOrEmpty(XRSettings.loadedDeviceName))
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Starting SteamVR...");
|
DesktopVRSwitch.Logger.Msg("Starting SteamVR...");
|
||||||
XRSettings.enabled = true;
|
XRSettings.enabled = true;
|
||||||
//force steamvr to reinitialize input
|
//force steamvr to reinitialize input
|
||||||
//this does SteamVR_Input.actionSets[0].Activate() for us (we deactivate in StopVR())
|
//this does SteamVR_Input.actionSets[0].Activate() for us (we deactivate in StopVR())
|
||||||
|
@ -63,7 +63,7 @@ public class DesktopVRSwitch : MonoBehaviour
|
||||||
PostVRModeSwitch(true);
|
PostVRModeSwitch(true);
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
DesktopVRSwitchMod.Logger.Error("Initializing VR Failed. Is there no VR device connected?");
|
DesktopVRSwitch.Logger.Error("Initializing VR Failed. Is there no VR device connected?");
|
||||||
FailedVRModeSwitch(true);
|
FailedVRModeSwitch(true);
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ public class DesktopVRSwitch : MonoBehaviour
|
||||||
PostVRModeSwitch(false);
|
PostVRModeSwitch(false);
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
DesktopVRSwitchMod.Logger.Error("Attempted to exit VR without a VR device loaded.");
|
DesktopVRSwitch.Logger.Error("Attempted to exit VR without a VR device loaded.");
|
||||||
FailedVRModeSwitch(false);
|
FailedVRModeSwitch(false);
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
|
@ -19,11 +19,11 @@ internal class PlayerSetupPatches
|
||||||
{
|
{
|
||||||
if (CheckVR.Instance != null)
|
if (CheckVR.Instance != null)
|
||||||
{
|
{
|
||||||
CheckVR.Instance.gameObject.AddComponent<DesktopVRSwitch>();
|
CheckVR.Instance.gameObject.AddComponent<DesktopVRSwitcher>();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
__instance.gameObject.AddComponent<DesktopVRSwitch>();
|
__instance.gameObject.AddComponent<DesktopVRSwitcher>();
|
||||||
DesktopVRSwitchMod.Logger.Error("CheckVR not found. Reverting to fallback method. This should never happen!");
|
DesktopVRSwitch.Logger.Error("CheckVR not found. Reverting to fallback method. This should never happen!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,21 +15,19 @@
|
||||||
|
|
||||||
namespace NAK.DesktopVRSwitch;
|
namespace NAK.DesktopVRSwitch;
|
||||||
|
|
||||||
public class DesktopVRSwitchMod : MelonMod
|
public class DesktopVRSwitch : MelonMod
|
||||||
{
|
{
|
||||||
internal const string SettingsCategory = "DesktopVRSwitch";
|
|
||||||
internal static MelonPreferences_Category mCategory;
|
|
||||||
internal static MelonLogger.Instance Logger;
|
internal static MelonLogger.Instance Logger;
|
||||||
|
|
||||||
internal static MelonPreferences_Entry<bool>
|
public static readonly MelonPreferences_Category Category =
|
||||||
mSetting_EnterCalibrationOnSwitch;
|
MelonPreferences.CreateCategory(nameof(DesktopVRSwitch));
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryEnterCalibrationOnSwitch =
|
||||||
|
Category.CreateEntry("Enter Calibration on Switch", true, "Should you automatically be placed into calibration after switch if FBT is available? Overridden by Save Calibration IK setting.");
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Logger = LoggerInstance;
|
Logger = LoggerInstance;
|
||||||
mCategory = MelonPreferences.CreateCategory(SettingsCategory);
|
|
||||||
mSetting_EnterCalibrationOnSwitch = mCategory.CreateEntry<bool>("Enter Calibration on Switch", true, description: "Should you automatically be placed into calibration after switch if FBT is available? Overridden by Save Calibration IK setting.");
|
|
||||||
|
|
||||||
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
|
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
|
||||||
ApplyPatches(typeof(HarmonyPatches.CVRPickupObjectPatches));
|
ApplyPatches(typeof(HarmonyPatches.CVRPickupObjectPatches));
|
||||||
ApplyPatches(typeof(HarmonyPatches.CVRWorldPatches));
|
ApplyPatches(typeof(HarmonyPatches.CVRWorldPatches));
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class IKSystemTracker : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
//make it so you dont instantly end up in FBT from Desktop
|
//make it so you dont instantly end up in FBT from Desktop
|
||||||
IKSystem.firstAvatarLoaded = DesktopVRSwitchMod.mSetting_EnterCalibrationOnSwitch.Value;
|
IKSystem.firstAvatarLoaded = DesktopVRSwitch.EntryEnterCalibrationOnSwitch.Value;
|
||||||
//turn of finger tracking just in case user switched controllers
|
//turn of finger tracking just in case user switched controllers
|
||||||
ikSystem.FingerSystem.controlActive = false;
|
ikSystem.FingerSystem.controlActive = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ internal class ReferenceCameraPatch
|
||||||
|
|
||||||
internal static void CopyToInactiveCam(Camera activeCam, Camera inactiveCam)
|
internal static void CopyToInactiveCam(Camera activeCam, Camera inactiveCam)
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Copying active camera settings & components to inactive camera.");
|
DesktopVRSwitch.Logger.Msg("Copying active camera settings & components to inactive camera.");
|
||||||
|
|
||||||
//steal basic settings
|
//steal basic settings
|
||||||
inactiveCam.farClipPlane = activeCam.farClipPlane;
|
inactiveCam.farClipPlane = activeCam.farClipPlane;
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class VRModeSwitchTracker
|
||||||
{
|
{
|
||||||
TryCatchHell.TryCatchWrapper(() =>
|
TryCatchHell.TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Invoking VRModeSwitchTracker.OnPreVRModeSwitch.");
|
DesktopVRSwitch.Logger.Msg("Invoking VRModeSwitchTracker.OnPreVRModeSwitch.");
|
||||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||||
VRModeSwitchTracker.OnPreVRModeSwitch?.Invoke(isVR, activeCamera);
|
VRModeSwitchTracker.OnPreVRModeSwitch?.Invoke(isVR, activeCamera);
|
||||||
},
|
},
|
||||||
|
@ -25,7 +25,7 @@ public class VRModeSwitchTracker
|
||||||
{
|
{
|
||||||
TryCatchHell.TryCatchWrapper(() =>
|
TryCatchHell.TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Invoking VRModeSwitchTracker.OnPostVRModeSwitch.");
|
DesktopVRSwitch.Logger.Msg("Invoking VRModeSwitchTracker.OnPostVRModeSwitch.");
|
||||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||||
VRModeSwitchTracker.OnPostVRModeSwitch?.Invoke(isVR, activeCamera);
|
VRModeSwitchTracker.OnPostVRModeSwitch?.Invoke(isVR, activeCamera);
|
||||||
},
|
},
|
||||||
|
@ -36,7 +36,7 @@ public class VRModeSwitchTracker
|
||||||
{
|
{
|
||||||
TryCatchHell.TryCatchWrapper(() =>
|
TryCatchHell.TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Invoking VRModeSwitchTracker.OnFailVRModeSwitch.");
|
DesktopVRSwitch.Logger.Msg("Invoking VRModeSwitchTracker.OnFailVRModeSwitch.");
|
||||||
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
Camera activeCamera = PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>();
|
||||||
VRModeSwitchTracker.OnFailVRModeSwitch?.Invoke(isVR, activeCamera);
|
VRModeSwitchTracker.OnFailVRModeSwitch?.Invoke(isVR, activeCamera);
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.DesktopVRSwitch))]
|
[assembly: AssemblyProduct(nameof(NAK.DesktopVRSwitch))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.DesktopVRSwitch.DesktopVRSwitchMod),
|
typeof(NAK.DesktopVRSwitch.DesktopVRSwitch),
|
||||||
nameof(NAK.DesktopVRSwitch),
|
nameof(NAK.DesktopVRSwitch),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/DesktopVRSwitch"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRSwitch"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -20,8 +20,8 @@ internal class TryCatchHell
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Error(string.Format(errorMsg, msgArgs));
|
DesktopVRSwitch.Logger.Error(string.Format(errorMsg, msgArgs));
|
||||||
DesktopVRSwitchMod.Logger.Msg(ex.Message);
|
DesktopVRSwitch.Logger.Msg(ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Closing ViewManager & CVR_MenuManager menus.");
|
DesktopVRSwitch.Logger.Msg("Closing ViewManager & CVR_MenuManager menus.");
|
||||||
ViewManager.Instance.UiStateToggle(false);
|
ViewManager.Instance.UiStateToggle(false);
|
||||||
CVR_MenuManager.Instance.ToggleQuickMenu(false);
|
CVR_MenuManager.Instance.ToggleQuickMenu(false);
|
||||||
},
|
},
|
||||||
|
@ -40,7 +40,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg($"Setting CheckVR hasVrDeviceLoaded to {isVR}.");
|
DesktopVRSwitch.Logger.Msg($"Setting CheckVR hasVrDeviceLoaded to {isVR}.");
|
||||||
CheckVR.Instance.hasVrDeviceLoaded = isVR;
|
CheckVR.Instance.hasVrDeviceLoaded = isVR;
|
||||||
},
|
},
|
||||||
"Setting CheckVR hasVrDeviceLoaded failed.");
|
"Setting CheckVR hasVrDeviceLoaded failed.");
|
||||||
|
@ -50,7 +50,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg($"Setting MetaPort isUsingVr to {isVR}.");
|
DesktopVRSwitch.Logger.Msg($"Setting MetaPort isUsingVr to {isVR}.");
|
||||||
MetaPort.Instance.isUsingVr = isVR;
|
MetaPort.Instance.isUsingVr = isVR;
|
||||||
},
|
},
|
||||||
"Setting MetaPort isUsingVr failed.");
|
"Setting MetaPort isUsingVr failed.");
|
||||||
|
@ -60,7 +60,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Configuring new hud affinity for CohtmlHud.");
|
DesktopVRSwitch.Logger.Msg("Configuring new hud affinity for CohtmlHud.");
|
||||||
CohtmlHud.Instance.gameObject.transform.parent = isVR ? PlayerSetup.Instance.vrCamera.transform : PlayerSetup.Instance.desktopCamera.transform;
|
CohtmlHud.Instance.gameObject.transform.parent = isVR ? PlayerSetup.Instance.vrCamera.transform : PlayerSetup.Instance.desktopCamera.transform;
|
||||||
CVRTools.ConfigureHudAffinity();
|
CVRTools.ConfigureHudAffinity();
|
||||||
CohtmlHud.Instance.gameObject.transform.localScale = new Vector3(1.2f, 1f, 1.2f);
|
CohtmlHud.Instance.gameObject.transform.localScale = new Vector3(1.2f, 1f, 1.2f);
|
||||||
|
@ -72,7 +72,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Switching HudOperations worldLoadingItem & worldLoadStatus.");
|
DesktopVRSwitch.Logger.Msg("Switching HudOperations worldLoadingItem & worldLoadStatus.");
|
||||||
HudOperations.Instance.worldLoadingItem = isVR ? HudOperations.Instance.worldLoadingItemVr : HudOperations.Instance.worldLoadingItemDesktop;
|
HudOperations.Instance.worldLoadingItem = isVR ? HudOperations.Instance.worldLoadingItemVr : HudOperations.Instance.worldLoadingItemDesktop;
|
||||||
HudOperations.Instance.worldLoadStatus = isVR ? HudOperations.Instance.worldLoadStatusVr : HudOperations.Instance.worldLoadStatusDesktop;
|
HudOperations.Instance.worldLoadStatus = isVR ? HudOperations.Instance.worldLoadStatusVr : HudOperations.Instance.worldLoadStatusDesktop;
|
||||||
},
|
},
|
||||||
|
@ -83,7 +83,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Forcing PortableCamera canvas mirroring off.");
|
DesktopVRSwitch.Logger.Msg("Forcing PortableCamera canvas mirroring off.");
|
||||||
//tell the game we are in mirror mode so itll disable it (if enabled)
|
//tell the game we are in mirror mode so itll disable it (if enabled)
|
||||||
PortableCamera.Instance.mode = MirroringMode.Mirror;
|
PortableCamera.Instance.mode = MirroringMode.Mirror;
|
||||||
PortableCamera.Instance.ChangeMirroring();
|
PortableCamera.Instance.ChangeMirroring();
|
||||||
|
@ -95,7 +95,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Switching active PlayerSetup camera rigs. Updating Desktop camera FOV.");
|
DesktopVRSwitch.Logger.Msg("Switching active PlayerSetup camera rigs. Updating Desktop camera FOV.");
|
||||||
PlayerSetup.Instance.desktopCameraRig.SetActive(!isVR);
|
PlayerSetup.Instance.desktopCameraRig.SetActive(!isVR);
|
||||||
PlayerSetup.Instance.vrCameraRig.SetActive(isVR);
|
PlayerSetup.Instance.vrCameraRig.SetActive(isVR);
|
||||||
CVR_DesktopCameraController.UpdateFov();
|
CVR_DesktopCameraController.UpdateFov();
|
||||||
|
@ -110,7 +110,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg($"Setting CVRInputManager inputEnabled & CVR_InteractableManager enableInteractions to {!toggle}");
|
DesktopVRSwitch.Logger.Msg($"Setting CVRInputManager inputEnabled & CVR_InteractableManager enableInteractions to {!toggle}");
|
||||||
CVRInputManager.Instance.inputEnabled = !toggle;
|
CVRInputManager.Instance.inputEnabled = !toggle;
|
||||||
CVR_InteractableManager.enableInteractions = !toggle;
|
CVR_InteractableManager.enableInteractions = !toggle;
|
||||||
},
|
},
|
||||||
|
@ -121,7 +121,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Resetting CVRInputManager inputs.");
|
DesktopVRSwitch.Logger.Msg("Resetting CVRInputManager inputs.");
|
||||||
//just in case
|
//just in case
|
||||||
CVRInputManager.Instance.blockedByUi = false;
|
CVRInputManager.Instance.blockedByUi = false;
|
||||||
//sometimes head can get stuck, so just in case
|
//sometimes head can get stuck, so just in case
|
||||||
|
@ -141,7 +141,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Attempting to reload current local avatar from GUID.");
|
DesktopVRSwitch.Logger.Msg("Attempting to reload current local avatar from GUID.");
|
||||||
AssetManagement.Instance.LoadLocalAvatar(MetaPort.Instance.currentAvatarGuid);
|
AssetManagement.Instance.LoadLocalAvatar(MetaPort.Instance.currentAvatarGuid);
|
||||||
},
|
},
|
||||||
"Failed to reload local avatar.");
|
"Failed to reload local avatar.");
|
||||||
|
@ -153,13 +153,13 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
if (MetaPort.Instance.settings.GetSettingsBool("ImplementationRichPresenceDiscordEnabled", true))
|
if (MetaPort.Instance.settings.GetSettingsBool("ImplementationRichPresenceDiscordEnabled", true))
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Forcing Discord Rich Presence update.");
|
DesktopVRSwitch.Logger.Msg("Forcing Discord Rich Presence update.");
|
||||||
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceDiscordEnabled", false);
|
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceDiscordEnabled", false);
|
||||||
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceDiscordEnabled", true);
|
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceDiscordEnabled", true);
|
||||||
}
|
}
|
||||||
if (MetaPort.Instance.settings.GetSettingsBool("ImplementationRichPresenceSteamEnabled", true))
|
if (MetaPort.Instance.settings.GetSettingsBool("ImplementationRichPresenceSteamEnabled", true))
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Forcing Steam Rich Presence update.");
|
DesktopVRSwitch.Logger.Msg("Forcing Steam Rich Presence update.");
|
||||||
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceSteamEnabled", false);
|
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceSteamEnabled", false);
|
||||||
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceSteamEnabled", true);
|
MetaPort.Instance.settings.SetSettingsBool("ImplementationRichPresenceSteamEnabled", true);
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Updating CVRGestureRecognizer _camera to active camera.");
|
DesktopVRSwitch.Logger.Msg("Updating CVRGestureRecognizer _camera to active camera.");
|
||||||
Traverse.Create(CVRGestureRecognizer.Instance).Field("_camera").SetValue(PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>());
|
Traverse.Create(CVRGestureRecognizer.Instance).Field("_camera").SetValue(PlayerSetup.Instance.GetActiveCamera().GetComponent<Camera>());
|
||||||
},
|
},
|
||||||
"Failed to update CVRGestureRecognizer camera.");
|
"Failed to update CVRGestureRecognizer camera.");
|
||||||
|
@ -181,7 +181,7 @@ internal class TryCatchHell
|
||||||
{
|
{
|
||||||
TryCatchWrapper(() =>
|
TryCatchWrapper(() =>
|
||||||
{
|
{
|
||||||
DesktopVRSwitchMod.Logger.Msg("Updating CVR_Menu_Data core data.");
|
DesktopVRSwitch.Logger.Msg("Updating CVR_Menu_Data core data.");
|
||||||
CVR_MenuManager.Instance.coreData.core.inVr = isVR;
|
CVR_MenuManager.Instance.coreData.core.inVr = isVR;
|
||||||
},
|
},
|
||||||
"Failed to update CVR_Menu_Data core data.");
|
"Failed to update CVR_Menu_Data core data.");
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/DesktopVRSwitch/releases/download/v4.3.5/DesktopVRSwitch.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/DesktopVRSwitch.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/DesktopVRSwitch/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRSwitch/",
|
||||||
"changelog": "- Reinitialize SteamVR input on switch. Correct fixedDeltaTime when entering Desktop.\n- Tweak to initial switch position for correcting offsets.\n- Fixed FBT tracking point initial size.\n- Update core menu data so QM Recalibrate/SeatedPlay button works.",
|
"changelog": "- Reinitialize SteamVR input on switch. Correct fixedDeltaTime when entering Desktop.\n- Tweak to initial switch position for correcting offsets.\n- Fixed FBT tracking point initial size.\n- Update core menu data so QM Recalibrate/SeatedPlay button works.",
|
||||||
"embedcolor": "3498db"
|
"embedcolor": "3498db"
|
||||||
}
|
}
|
|
@ -1,92 +0,0 @@
|
||||||
using ABI_RC.Core.InteractionSystem;
|
|
||||||
using ABI_RC.Core.IO;
|
|
||||||
using cohtml;
|
|
||||||
using HarmonyLib;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace NAK.FuckMetrics;
|
|
||||||
|
|
||||||
public static class FuckMetrics
|
|
||||||
{
|
|
||||||
public enum SettingState
|
|
||||||
{
|
|
||||||
Always,
|
|
||||||
MenuOnly,
|
|
||||||
Disabled
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ToggleMetrics(bool enable)
|
|
||||||
{
|
|
||||||
var job = SchedulerSystem.Instance.activeJobs.FirstOrDefault(pair => pair.Job.Method.Name == "UpdateMetrics").Job;
|
|
||||||
if (enable && job == null)
|
|
||||||
{
|
|
||||||
SchedulerSystem.AddJob(new SchedulerSystem.Job(ViewManager.Instance.UpdateMetrics), 0f, FuckMetricsMod.EntryMetricsUpdateRate.Value, -1);
|
|
||||||
}
|
|
||||||
else if (!enable && job != null)
|
|
||||||
{
|
|
||||||
SchedulerSystem.RemoveJob(job);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ToggleCoreUpdates(bool enable)
|
|
||||||
{
|
|
||||||
var job = SchedulerSystem.Instance.activeJobs.FirstOrDefault(pair => pair.Job.Method.Name == "SendCoreUpdate").Job;
|
|
||||||
if (enable && job == null)
|
|
||||||
{
|
|
||||||
SchedulerSystem.AddJob(new SchedulerSystem.Job(CVR_MenuManager.Instance.SendCoreUpdate), 0f, FuckMetricsMod.EntryCoreUpdateRate.Value, -1);
|
|
||||||
}
|
|
||||||
else if (!enable && job != null)
|
|
||||||
{
|
|
||||||
SchedulerSystem.RemoveJob(job);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ApplyMetricsSettings(bool show)
|
|
||||||
{
|
|
||||||
var disableMetrics = FuckMetricsMod.EntryDisableMetrics.Value;
|
|
||||||
if (disableMetrics == FuckMetrics.SettingState.Always) return;
|
|
||||||
|
|
||||||
if (disableMetrics == FuckMetrics.SettingState.MenuOnly)
|
|
||||||
{
|
|
||||||
FuckMetrics.ToggleMetrics(show);
|
|
||||||
}
|
|
||||||
else if (disableMetrics == FuckMetrics.SettingState.Disabled && show)
|
|
||||||
{
|
|
||||||
ViewManager.Instance.UpdateMetrics();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ApplyCoreUpdatesSettings(bool show)
|
|
||||||
{
|
|
||||||
var disableCoreUpdates = FuckMetricsMod.EntryDisableCoreUpdates.Value;
|
|
||||||
if (disableCoreUpdates == FuckMetrics.SettingState.Always) return;
|
|
||||||
|
|
||||||
if (disableCoreUpdates == FuckMetrics.SettingState.MenuOnly)
|
|
||||||
{
|
|
||||||
FuckMetrics.ToggleCoreUpdates(show);
|
|
||||||
}
|
|
||||||
else if (disableCoreUpdates == FuckMetrics.SettingState.Disabled && show)
|
|
||||||
{
|
|
||||||
CVR_MenuManager.Instance.SendCoreUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void CohtmlAdvanceView(CohtmlView cohtmlView, Traverse menuOpenTraverse)
|
|
||||||
{
|
|
||||||
if (!FuckMetricsMod.EntryDisableCohtmlViewOnIdle.Value) return;
|
|
||||||
|
|
||||||
if (cohtmlView != null && !menuOpenTraverse.GetValue<bool>())
|
|
||||||
{
|
|
||||||
cohtmlView.enabled = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
cohtmlView.View.Advance(cohtmlView.CohtmlUISystem?.Id ?? 0, (double)Time.unscaledTime * 1000.0);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
FuckMetricsMod.Logger.Error($"An exception was thrown while calling CohtmlView.Advance(). Error message: {e.Message}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +1,20 @@
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.InteractionSystem;
|
||||||
|
using ABI_RC.Core.IO;
|
||||||
|
using ABI_RC.Core.Player;
|
||||||
|
using cohtml;
|
||||||
|
using HarmonyLib;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NAK.FuckMetrics;
|
namespace NAK.FuckMetrics;
|
||||||
|
|
||||||
public class FuckMetricsMod : MelonMod
|
public class FuckMetrics : MelonMod
|
||||||
{
|
{
|
||||||
public static MelonLogger.Instance Logger;
|
internal static MelonLogger.Instance Logger;
|
||||||
public const string SettingsCategory = "FuckMetrics";
|
|
||||||
public static readonly MelonPreferences_Category CategoryFuckMetrics = MelonPreferences.CreateCategory(SettingsCategory);
|
public static readonly MelonPreferences_Category CategoryFuckMetrics =
|
||||||
|
MelonPreferences.CreateCategory(nameof(FuckMetrics));
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryDisableCohtmlViewOnIdle =
|
public static readonly MelonPreferences_Entry<bool> EntryDisableCohtmlViewOnIdle =
|
||||||
CategoryFuckMetrics.CreateEntry("Disable CohtmlView On Idle", false, description: "Disables CohtmlView on the menus when idle. Takes up to 6 seconds after menu exit. This can give a huge performance boost.");
|
CategoryFuckMetrics.CreateEntry("Disable CohtmlView On Idle", false, description: "Disables CohtmlView on the menus when idle. Takes up to 6 seconds after menu exit. This can give a huge performance boost.");
|
||||||
|
@ -95,4 +101,86 @@ public class FuckMetricsMod : MelonMod
|
||||||
Logger.Error(e);
|
Logger.Error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum SettingState
|
||||||
|
{
|
||||||
|
Always,
|
||||||
|
MenuOnly,
|
||||||
|
Disabled
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ToggleMetrics(bool enable)
|
||||||
|
{
|
||||||
|
var job = SchedulerSystem.Instance.activeJobs.FirstOrDefault(pair => pair.Job.Method.Name == "UpdateMetrics").Job;
|
||||||
|
if (enable && job == null)
|
||||||
|
{
|
||||||
|
SchedulerSystem.AddJob(new SchedulerSystem.Job(ViewManager.Instance.UpdateMetrics), 0f, FuckMetrics.EntryMetricsUpdateRate.Value, -1);
|
||||||
|
}
|
||||||
|
else if (!enable && job != null)
|
||||||
|
{
|
||||||
|
SchedulerSystem.RemoveJob(job);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ToggleCoreUpdates(bool enable)
|
||||||
|
{
|
||||||
|
var job = SchedulerSystem.Instance.activeJobs.FirstOrDefault(pair => pair.Job.Method.Name == "SendCoreUpdate").Job;
|
||||||
|
if (enable && job == null)
|
||||||
|
{
|
||||||
|
SchedulerSystem.AddJob(new SchedulerSystem.Job(CVR_MenuManager.Instance.SendCoreUpdate), 0f, FuckMetrics.EntryCoreUpdateRate.Value, -1);
|
||||||
|
}
|
||||||
|
else if (!enable && job != null)
|
||||||
|
{
|
||||||
|
SchedulerSystem.RemoveJob(job);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ApplyMetricsSettings(bool show)
|
||||||
|
{
|
||||||
|
var disableMetrics = FuckMetrics.EntryDisableMetrics.Value;
|
||||||
|
if (disableMetrics == FuckMetrics.SettingState.Always) return;
|
||||||
|
|
||||||
|
if (disableMetrics == FuckMetrics.SettingState.MenuOnly)
|
||||||
|
{
|
||||||
|
FuckMetrics.ToggleMetrics(show);
|
||||||
|
}
|
||||||
|
else if (disableMetrics == FuckMetrics.SettingState.Disabled && show)
|
||||||
|
{
|
||||||
|
ViewManager.Instance.UpdateMetrics();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ApplyCoreUpdatesSettings(bool show)
|
||||||
|
{
|
||||||
|
var disableCoreUpdates = FuckMetrics.EntryDisableCoreUpdates.Value;
|
||||||
|
if (disableCoreUpdates == FuckMetrics.SettingState.Always) return;
|
||||||
|
|
||||||
|
if (disableCoreUpdates == FuckMetrics.SettingState.MenuOnly)
|
||||||
|
{
|
||||||
|
FuckMetrics.ToggleCoreUpdates(show);
|
||||||
|
}
|
||||||
|
else if (disableCoreUpdates == FuckMetrics.SettingState.Disabled && show)
|
||||||
|
{
|
||||||
|
CVR_MenuManager.Instance.SendCoreUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void CohtmlAdvanceView(CohtmlView cohtmlView, Traverse menuOpenTraverse)
|
||||||
|
{
|
||||||
|
if (!FuckMetrics.EntryDisableCohtmlViewOnIdle.Value) return;
|
||||||
|
|
||||||
|
if (cohtmlView != null && !menuOpenTraverse.GetValue<bool>())
|
||||||
|
{
|
||||||
|
cohtmlView.enabled = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
cohtmlView.View.Advance(cohtmlView.CohtmlUISystem?.Id ?? 0, (double)Time.unscaledTime * 1000.0);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
FuckMetrics.Logger.Error($"An exception was thrown while calling CohtmlView.Advance(). Error message: {e.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,6 @@
|
||||||
using NAK.FuckMetrics.Properties;
|
using NAK.FuckMetrics.Properties;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -11,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.FuckMetrics))]
|
[assembly: AssemblyProduct(nameof(NAK.FuckMetrics))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.FuckMetrics.FuckMetricsMod),
|
typeof(NAK.FuckMetrics.FuckMetrics),
|
||||||
nameof(NAK.FuckMetrics),
|
nameof(NAK.FuckMetrics),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/FuckMetrics"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/FuckMetrics"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/FuckMetrics/releases/download/v1.0.4/FuckMetrics.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/FuckMetrics.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/FuckMetrics/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/FuckMetrics/",
|
||||||
"changelog": "- Initial Release.\n- Renamed to FuckMetrics.\n- Add Update Rate settings.\n- Add back CohtmlView disabling as option.\n- Update CoreUpdate on mic toggle if QM is open.\n- Fix Cohtml disabling not using menu instance.",
|
"changelog": "- Initial Release.\n- Renamed to FuckMetrics.\n- Add Update Rate settings.\n- Add back CohtmlView disabling as option.\n- Update CoreUpdate on mic toggle if QM is open.\n- Fix Cohtml disabling not using menu instance.",
|
||||||
"embedcolor": "#8ed6fb"
|
"embedcolor": "#8ed6fb"
|
||||||
}
|
}
|
|
@ -15,9 +15,9 @@ class VRIKPatches
|
||||||
//only run for PlayerLocal VRIK
|
//only run for PlayerLocal VRIK
|
||||||
if (__instance.gameObject.layer != 8) return;
|
if (__instance.gameObject.layer != 8) return;
|
||||||
|
|
||||||
if (FuckToesMod.m_entryEnabledVR.Value && MetaPort.Instance.isUsingVr)
|
if (FuckToes.EntryEnabledVR.Value && MetaPort.Instance.isUsingVr)
|
||||||
{
|
{
|
||||||
if (!FuckToesMod.m_entryEnabledFBT.Value && MetaPort.Instance.isUsingFullbody) return;
|
if (!FuckToes.EntryEnabledFBT.Value && MetaPort.Instance.isUsingFullbody) return;
|
||||||
__instance.references.leftToes = null;
|
__instance.references.leftToes = null;
|
||||||
__instance.references.rightToes = null;
|
__instance.references.rightToes = null;
|
||||||
}
|
}
|
|
@ -2,17 +2,19 @@
|
||||||
|
|
||||||
namespace NAK.FuckToes;
|
namespace NAK.FuckToes;
|
||||||
|
|
||||||
public class FuckToesMod : MelonMod
|
public class FuckToes : MelonMod
|
||||||
{
|
{
|
||||||
internal const string SettingsCategory = "FuckToes";
|
public static readonly MelonPreferences_Category Category =
|
||||||
internal static MelonPreferences_Category m_categoryFuckToes;
|
MelonPreferences.CreateCategory(nameof(FuckToes));
|
||||||
internal static MelonPreferences_Entry<bool> m_entryEnabledVR, m_entryEnabledFBT;
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryEnabledVR =
|
||||||
|
Category.CreateEntry("Enabled", true, "Nuke VRIK toes when in Halfbody.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryEnabledFBT =
|
||||||
|
Category.CreateEntry("Enabled in FBT", false, "Nuke VRIK toes when in FBT.");
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
m_categoryFuckToes = MelonPreferences.CreateCategory(SettingsCategory);
|
|
||||||
m_entryEnabledVR = m_categoryFuckToes.CreateEntry<bool>("Enabled", true, description: "Nuke VRIK toes when in Halfbody.");
|
|
||||||
m_entryEnabledFBT = m_categoryFuckToes.CreateEntry<bool>("Enabled in FBT", false, description: "Nuke VRIK toes when in FBT.");
|
|
||||||
|
|
||||||
//Apply patches (i stole)
|
//Apply patches (i stole)
|
||||||
ApplyPatches(typeof(HarmonyPatches.VRIKPatches));
|
ApplyPatches(typeof(HarmonyPatches.VRIKPatches));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -11,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.FuckToes))]
|
[assembly: AssemblyProduct(nameof(NAK.FuckToes))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.FuckToes.FuckToesMod),
|
typeof(NAK.FuckToes.FuckToes),
|
||||||
nameof(NAK.FuckToes),
|
nameof(NAK.FuckToes),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/FuckToes"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/FuckToes"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/FuckToes/releases/download/v1.0.1/FuckToes.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/FuckToes.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/FuckToes/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/FuckToes/",
|
||||||
"changelog": "- Initial Release\n- No double patching. Bad. Stinky. Dont do it.",
|
"changelog": "- Initial Release\n- No double patching. Bad. Stinky. Dont do it.",
|
||||||
"embedcolor": "#ffc700"
|
"embedcolor": "#ffc700"
|
||||||
}
|
}
|
58
GestureLock/HarmonyPatches.cs
Normal file
58
GestureLock/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
using ABI_RC.Core.Player;
|
||||||
|
using ABI_RC.Core.Savior;
|
||||||
|
using ABI_RC.Core.UI;
|
||||||
|
using HarmonyLib;
|
||||||
|
using Valve.VR;
|
||||||
|
|
||||||
|
namespace NAK.GestureLock.HarmonyPatches;
|
||||||
|
|
||||||
|
class Patches
|
||||||
|
{
|
||||||
|
private static bool isLocked;
|
||||||
|
private static float oldGestureLeft;
|
||||||
|
private static float oldGestureRight;
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(InputModuleSteamVR), nameof(InputModuleSteamVR.UpdateInput))]
|
||||||
|
private static void Postfix_InputModuleSteamVR_UpdateInput
|
||||||
|
(
|
||||||
|
ref CVRInputManager ____inputManager,
|
||||||
|
ref VRTrackerManager ____trackerManager,
|
||||||
|
ref SteamVR_Action_Boolean ___steamVrIndexGestureToggle
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (!MetaPort.Instance.isUsingVr)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (___steamVrIndexGestureToggle.stateDown && !____trackerManager.trackerNames.Contains("knuckles"))
|
||||||
|
{
|
||||||
|
isLocked = !isLocked;
|
||||||
|
oldGestureLeft = ____inputManager.gestureLeft;
|
||||||
|
oldGestureRight = ____inputManager.gestureRight;
|
||||||
|
CohtmlHud.Instance.ViewDropTextImmediate("", "Gesture Lock", "Gestures " + (isLocked ? "Locked" : "Unlocked"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(CVRInputManager), nameof(CVRInputManager.Update))]
|
||||||
|
private static void Postfix_CVRInputManager_Update
|
||||||
|
(
|
||||||
|
ref float ___gestureLeft,
|
||||||
|
ref float ___gestureRight
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (!MetaPort.Instance.isUsingVr)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isLocked)
|
||||||
|
{
|
||||||
|
// Dont override raw, other systems like the camera gesture recognizer need it.
|
||||||
|
___gestureLeft = oldGestureLeft;
|
||||||
|
___gestureRight = oldGestureRight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,70 +1,24 @@
|
||||||
using ABI_RC.Core.Player;
|
using MelonLoader;
|
||||||
using ABI_RC.Core.Savior;
|
|
||||||
using ABI_RC.Core.UI;
|
|
||||||
using HarmonyLib;
|
|
||||||
using MelonLoader;
|
|
||||||
using Valve.VR;
|
|
||||||
|
|
||||||
//I legitimately threw this at ChatGPT to rewrite cause i couldn't be bothered.
|
namespace NAK.GestureLock;
|
||||||
|
|
||||||
namespace NAK.GestureLock
|
public class GestureLock : MelonMod
|
||||||
{
|
{
|
||||||
public class GestureLockMod : MelonMod
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
[HarmonyPatch]
|
ApplyPatches(typeof(HarmonyPatches.Patches));
|
||||||
private class HarmonyPatches
|
}
|
||||||
|
|
||||||
|
void ApplyPatches(Type type)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
private static bool isLocked;
|
HarmonyInstance.PatchAll(type);
|
||||||
private static float oldGestureLeft;
|
}
|
||||||
private static float oldGestureRight;
|
catch (Exception e)
|
||||||
|
{
|
||||||
[HarmonyPostfix]
|
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||||
[HarmonyPatch(typeof(InputModuleSteamVR), "UpdateInput")]
|
LoggerInstance.Error(e);
|
||||||
private static void Postfix_InputModuleSteamVR_UpdateInput
|
|
||||||
(
|
|
||||||
ref CVRInputManager ____inputManager,
|
|
||||||
ref VRTrackerManager ____trackerManager,
|
|
||||||
ref SteamVR_Action_Boolean ___steamVrIndexGestureToggle
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!MetaPort.Instance.isUsingVr)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (___steamVrIndexGestureToggle.stateDown && !____trackerManager.trackerNames.Contains("knuckles"))
|
|
||||||
{
|
|
||||||
isLocked = !isLocked;
|
|
||||||
oldGestureLeft = ____inputManager.gestureLeft;
|
|
||||||
oldGestureRight = ____inputManager.gestureRight;
|
|
||||||
CohtmlHud.Instance.ViewDropTextImmediate("", "Gesture Lock", "Gestures " + (isLocked ? "Locked" : "Unlocked"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPostfix]
|
|
||||||
[HarmonyPatch(typeof(CVRInputManager), "Update")]
|
|
||||||
private static void Postfix_CVRInputManager_Update
|
|
||||||
(
|
|
||||||
ref float ___gestureLeft,
|
|
||||||
ref float ___gestureRight,
|
|
||||||
ref float ___gestureLeftRaw,
|
|
||||||
ref float ___gestureRightRaw
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!MetaPort.Instance.isUsingVr)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLocked)
|
|
||||||
{
|
|
||||||
// Dont override raw, other systems like the camera gesture recognizer need it.
|
|
||||||
//gestureLeftRaw = gestureLeft;
|
|
||||||
//gestureRightRaw = gestureRight;
|
|
||||||
___gestureLeft = oldGestureLeft;
|
|
||||||
___gestureRight = oldGestureRight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.GestureLock))]
|
[assembly: AssemblyProduct(nameof(NAK.GestureLock))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.GestureLock.GestureLockMod),
|
typeof(NAK.GestureLock.GestureLock),
|
||||||
nameof(NAK.GestureLock),
|
nameof(NAK.GestureLock),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/GestureLock"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/GestureLock"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/GestureLock/releases/download/v2.0.0/GestureLock.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/GestureLock.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/GestureLock/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/GestureLock/",
|
||||||
"changelog": "- Simplification & refactor.",
|
"changelog": "- Simplification & refactor.",
|
||||||
"embedcolor": "804221"
|
"embedcolor": "804221"
|
||||||
}
|
}
|
|
@ -4,8 +4,8 @@ namespace NAK.IKFixes;
|
||||||
|
|
||||||
public class IKFixes : MelonMod
|
public class IKFixes : MelonMod
|
||||||
{
|
{
|
||||||
public const string SettingsCategory = nameof(IKFixes);
|
public static readonly MelonPreferences_Category Category =
|
||||||
public static readonly MelonPreferences_Category Category = MelonPreferences.CreateCategory(SettingsCategory);
|
MelonPreferences.CreateCategory(nameof(IKFixes));
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryUseFakeRootAngle =
|
public static readonly MelonPreferences_Entry<bool> EntryUseFakeRootAngle =
|
||||||
Category.CreateEntry("Use Fake Root Angle", true, description: "Emulates maxRootAngle. This fixes feet pointing in direction of head when looking around.");
|
Category.CreateEntry("Use Fake Root Angle", true, description: "Emulates maxRootAngle. This fixes feet pointing in direction of head when looking around.");
|
||||||
|
|
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(NAK.IKFixes),
|
nameof(NAK.IKFixes),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/IKFixes"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/IKFixes"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r2/IKFixes.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/IKFixes.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/IKFixes/",
|
||||||
"changelog": "- Fixed feet targeting previous movement parent position for a frame.",
|
"changelog": "- Fixed feet targeting previous movement parent position for a frame.",
|
||||||
"embedcolor": "f46e49"
|
"embedcolor": "f46e49"
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace NAK.JumpPatch;
|
namespace NAK.JumpPatch;
|
||||||
|
|
||||||
public class JumpPatchMod : MelonMod
|
public class JumpPatch : MelonMod
|
||||||
{
|
{
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.JumpPatch))]
|
[assembly: AssemblyProduct(nameof(NAK.JumpPatch))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.JumpPatch.JumpPatchMod),
|
typeof(NAK.JumpPatch.JumpPatch),
|
||||||
nameof(NAK.JumpPatch),
|
nameof(NAK.JumpPatch),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/JumpPatch"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/JumpPatch"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/JumpPatch/releases/download/v1.0.0/JumpPatch.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/JumpPatch.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/JumpPatch/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/JumpPatch/",
|
||||||
"changelog": "- Initial Release\n- I like my jump animations.",
|
"changelog": "- Initial Release\n- I like my jump animations.",
|
||||||
"embedcolor": "#e56597"
|
"embedcolor": "#e56597"
|
||||||
}
|
}
|
|
@ -4,12 +4,13 @@ namespace NAK.MenuScalePatch;
|
||||||
|
|
||||||
public class MenuScalePatch : MelonMod
|
public class MenuScalePatch : MelonMod
|
||||||
{
|
{
|
||||||
internal static MelonPreferences_Category Category = MelonPreferences.CreateCategory(nameof(MenuScalePatch));
|
public static MelonPreferences_Category Category =
|
||||||
|
MelonPreferences.CreateCategory(nameof(MenuScalePatch));
|
||||||
|
|
||||||
internal static MelonPreferences_Entry<bool> EntryUseIndependentHeadTurn =
|
public static MelonPreferences_Entry<bool> EntryUseIndependentHeadTurn =
|
||||||
Category.CreateEntry<bool>("Use Independent Head Turn", true, description: "Should you be able to use independent head turn in a menu while in Desktop?");
|
Category.CreateEntry<bool>("Use Independent Head Turn", true, description: "Should you be able to use independent head turn in a menu while in Desktop?");
|
||||||
|
|
||||||
internal static MelonPreferences_Entry<bool> EntryPlayerAnchorMenus =
|
public static MelonPreferences_Entry<bool> EntryPlayerAnchorMenus =
|
||||||
Category.CreateEntry<bool>("Player Anchor Menus", true, description: "Should the menus be anchored to & constantly follow the player?");
|
Category.CreateEntry<bool>("Player Anchor Menus", true, description: "Should the menus be anchored to & constantly follow the player?");
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
|
|
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(NAK.MenuScalePatch),
|
nameof(NAK.MenuScalePatch),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/MenuScalePatch"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r2/MenuScalePatch.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/MenuScalePatch.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/MenuScalePatch/",
|
||||||
"changelog": "- Menus are no longer forced closed on world load.",
|
"changelog": "- Menus are no longer forced closed on world load.",
|
||||||
"embedcolor": "363020"
|
"embedcolor": "363020"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
using ABI.CCK.Components;
|
using ABI.CCK.Components;
|
||||||
using UnityEngine;
|
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NAK.CCK.CustomComponents;
|
namespace NAK.CCK.CustomComponents;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(NAK.CustomComponents),
|
nameof(NAK.CustomComponents),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/UndoPropButton"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/CustomComponents"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/PropUndoButton/releases/download/v1.0.1/PropUndoButton.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/PropUndoButton.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/PropUndoButton/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PropUndoButton/",
|
||||||
"changelog": "- Initial Release\n- Added redo button.\n- Mitigated issue of props getting stuck locally if deleting them before they fully spawn.\n- Lowered SFX volume to match existing UI sounds.",
|
"changelog": "- Initial Release\n- Added redo button.\n- Mitigated issue of props getting stuck locally if deleting them before they fully spawn.\n- Lowered SFX volume to match existing UI sounds.",
|
||||||
"embedcolor": "#00FFFF"
|
"embedcolor": "#00FFFF"
|
||||||
}
|
}
|
|
@ -3,46 +3,46 @@ using ABI_RC.Core.Player;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NAK.PathCamDisabler
|
namespace NAK.PathCamDisabler;
|
||||||
|
|
||||||
|
public class PathCamDisabler : MelonMod
|
||||||
{
|
{
|
||||||
public class PathCamDisablerMod : MelonMod
|
public static readonly MelonPreferences_Category Category =
|
||||||
|
MelonPreferences.CreateCategory(nameof(PathCamDisabler));
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryDisablePathCam =
|
||||||
|
Category.CreateEntry("Disable Path Camera Controller.", true, "Disable Path Camera Controller.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryDisableFlightBind =
|
||||||
|
Category.CreateEntry("Disable Flight Binding (if controller off).", false, "Disable flight bind if Path Camera Controller is also disabled.");
|
||||||
|
|
||||||
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
internal const string SettingsCategory = "PathCamDisabler";
|
EntryDisablePathCam.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||||
internal static MelonPreferences_Category m_categoryPathCamDisabler;
|
|
||||||
internal static MelonPreferences_Entry<bool> m_entryDisablePathCam, m_entryDisableFlightBind;
|
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
MelonLoader.MelonCoroutines.Start(WaitForCVRPathCamController());
|
||||||
|
}
|
||||||
|
|
||||||
|
private System.Collections.IEnumerator WaitForCVRPathCamController()
|
||||||
|
{
|
||||||
|
while (CVRPathCamController.Instance == null)
|
||||||
|
yield return null;
|
||||||
|
UpdateSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateSettings()
|
||||||
|
{
|
||||||
|
CVRPathCamController.Instance.enabled = !EntryDisablePathCam.Value;
|
||||||
|
}
|
||||||
|
private void OnUpdateSettings(object arg1, object arg2) => UpdateSettings();
|
||||||
|
|
||||||
|
public override void OnUpdate()
|
||||||
|
{
|
||||||
|
if (EntryDisablePathCam.Value && !EntryDisableFlightBind.Value)
|
||||||
{
|
{
|
||||||
m_categoryPathCamDisabler = MelonPreferences.CreateCategory(SettingsCategory);
|
if (Input.GetKeyDown(KeyCode.Keypad5))
|
||||||
m_entryDisablePathCam = m_categoryPathCamDisabler.CreateEntry<bool>("Disable Path Camera Controller.", true, description: "Disable Path Camera Controller.");
|
|
||||||
m_entryDisableFlightBind = m_categoryPathCamDisabler.CreateEntry<bool>("Disable Flight Binding (if controller off).", false, description: "Disable flight bind if Path Camera Controller is also disabled.");
|
|
||||||
|
|
||||||
m_entryDisablePathCam.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
|
||||||
|
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForCVRPathCamController());
|
|
||||||
}
|
|
||||||
|
|
||||||
private System.Collections.IEnumerator WaitForCVRPathCamController()
|
|
||||||
{
|
|
||||||
while (CVRPathCamController.Instance == null)
|
|
||||||
yield return null;
|
|
||||||
UpdateSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateSettings()
|
|
||||||
{
|
|
||||||
CVRPathCamController.Instance.enabled = !m_entryDisablePathCam.Value;
|
|
||||||
}
|
|
||||||
private void OnUpdateSettings(object arg1, object arg2) => UpdateSettings();
|
|
||||||
|
|
||||||
public override void OnUpdate()
|
|
||||||
{
|
|
||||||
if (m_entryDisablePathCam.Value && !m_entryDisableFlightBind.Value)
|
|
||||||
{
|
{
|
||||||
if (Input.GetKeyDown(KeyCode.Keypad5))
|
PlayerSetup.Instance._movementSystem.ToggleFlight();
|
||||||
{
|
|
||||||
PlayerSetup.Instance._movementSystem.ToggleFlight();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using System.Reflection;
|
|
||||||
using NAK.PathCamDisabler.Properties;
|
using NAK.PathCamDisabler.Properties;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -10,11 +10,11 @@ using NAK.PathCamDisabler.Properties;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.PathCamDisabler))]
|
[assembly: AssemblyProduct(nameof(NAK.PathCamDisabler))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.PathCamDisabler.PathCamDisablerMod),
|
typeof(NAK.PathCamDisabler.PathCamDisabler),
|
||||||
nameof(NAK.PathCamDisabler),
|
nameof(NAK.PathCamDisabler),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/PathCamDisabler"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PathCamDisabler"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/PathCamDisabler/releases/download/v1.0.1/PathCamDisabler.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/PathCamDisabler.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/PathCamDisabler/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PathCamDisabler/",
|
||||||
"changelog": "- Organizational changes.\n- No longer using SaveToFile().",
|
"changelog": "- Organizational changes.\n- No longer using SaveToFile().",
|
||||||
"embedcolor": "#9b59b6"
|
"embedcolor": "#9b59b6"
|
||||||
}
|
}
|
|
@ -1,9 +1,7 @@
|
||||||
using ABI.CCK.Components;
|
using ABI.CCK.Components;
|
||||||
using ABI_RC.Core.Player;
|
|
||||||
using ABI_RC.Core.Savior;
|
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
|
||||||
using NAK.PickupPushPull.InputModules;
|
using NAK.PickupPushPull.InputModules;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NAK.PickupPushPull.HarmonyPatches;
|
namespace NAK.PickupPushPull.HarmonyPatches;
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,9 @@ public class PickupPushPull_Module : CVRInputModule
|
||||||
public Vector2 objectRotation = Vector2.zero;
|
public Vector2 objectRotation = Vector2.zero;
|
||||||
|
|
||||||
//Global settings
|
//Global settings
|
||||||
public float Setting_PushPullSpeed = 100f;
|
public float EntryPushPullSpeed = 100f;
|
||||||
public float Setting_RotationSpeed = 200f;
|
public float EntryRotationSpeed = 200f;
|
||||||
public bool Setting_EnableRotation = false;
|
public bool EntryEnableRotation = false;
|
||||||
|
|
||||||
//Desktop settings
|
//Desktop settings
|
||||||
public bool Desktop_UseZoomForRotate = true;
|
public bool Desktop_UseZoomForRotate = true;
|
||||||
|
@ -34,7 +34,6 @@ public class PickupPushPull_Module : CVRInputModule
|
||||||
private SteamVR_Action_Boolean VR_RotateBind_Boolean;
|
private SteamVR_Action_Boolean VR_RotateBind_Boolean;
|
||||||
|
|
||||||
//Local stuff
|
//Local stuff
|
||||||
private CVRInputManager _inputManager;
|
|
||||||
private ControllerRay desktopControllerRay;
|
private ControllerRay desktopControllerRay;
|
||||||
private float deadzoneRightValue;
|
private float deadzoneRightValue;
|
||||||
private bool controlGamepadEnabled;
|
private bool controlGamepadEnabled;
|
||||||
|
@ -52,7 +51,7 @@ public class PickupPushPull_Module : CVRInputModule
|
||||||
_inputManager = CVRInputManager.Instance;
|
_inputManager = CVRInputManager.Instance;
|
||||||
Instance = this;
|
Instance = this;
|
||||||
base.Start();
|
base.Start();
|
||||||
|
|
||||||
//Get desktop controller ray
|
//Get desktop controller ray
|
||||||
desktopControllerRay = PlayerSetup.Instance.desktopCamera.GetComponent<ControllerRay>();
|
desktopControllerRay = PlayerSetup.Instance.desktopCamera.GetComponent<ControllerRay>();
|
||||||
|
|
||||||
|
@ -140,10 +139,10 @@ public class PickupPushPull_Module : CVRInputModule
|
||||||
if (!Desktop_UseZoomForRotate) return;
|
if (!Desktop_UseZoomForRotate) return;
|
||||||
|
|
||||||
//mouse rotation when zoomed
|
//mouse rotation when zoomed
|
||||||
if (Setting_EnableRotation && _inputManager.zoom)
|
if (EntryEnableRotation && _inputManager.zoom)
|
||||||
{
|
{
|
||||||
objectRotation.x += Setting_RotationSpeed * _inputManager.rawLookVector.x;
|
objectRotation.x += EntryRotationSpeed * _inputManager.rawLookVector.x;
|
||||||
objectRotation.y += Setting_RotationSpeed * _inputManager.rawLookVector.y * -1;
|
objectRotation.y += EntryRotationSpeed * _inputManager.rawLookVector.y * -1;
|
||||||
_inputManager.lookVector = Vector2.zero;
|
_inputManager.lookVector = Vector2.zero;
|
||||||
_inputManager.zoom = false;
|
_inputManager.zoom = false;
|
||||||
return;
|
return;
|
||||||
|
@ -161,15 +160,15 @@ public class PickupPushPull_Module : CVRInputModule
|
||||||
if (button1 || button2)
|
if (button1 || button2)
|
||||||
{
|
{
|
||||||
//Rotation
|
//Rotation
|
||||||
if (Setting_EnableRotation && button2)
|
if (EntryEnableRotation && button2)
|
||||||
{
|
{
|
||||||
objectRotation.x += Setting_RotationSpeed * _inputManager.rawLookVector.x;
|
objectRotation.x += EntryRotationSpeed * _inputManager.rawLookVector.x;
|
||||||
objectRotation.y += Setting_RotationSpeed * _inputManager.rawLookVector.y * -1;
|
objectRotation.y += EntryRotationSpeed * _inputManager.rawLookVector.y * -1;
|
||||||
_inputManager.lookVector = Vector2.zero;
|
_inputManager.lookVector = Vector2.zero;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_inputManager.objectPushPull += _inputManager.rawLookVector.y * Setting_PushPullSpeed * Time.deltaTime;
|
_inputManager.objectPushPull += _inputManager.rawLookVector.y * EntryPushPullSpeed * Time.deltaTime;
|
||||||
_inputManager.lookVector = Vector2.zero;
|
_inputManager.lookVector = Vector2.zero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,19 +182,19 @@ public class PickupPushPull_Module : CVRInputModule
|
||||||
bool canRotate = (leftObject != null && leftObject.gripType == CVRPickupObject.GripType.Free) ||
|
bool canRotate = (leftObject != null && leftObject.gripType == CVRPickupObject.GripType.Free) ||
|
||||||
(rightObject != null && rightObject.gripType == CVRPickupObject.GripType.Free);
|
(rightObject != null && rightObject.gripType == CVRPickupObject.GripType.Free);
|
||||||
|
|
||||||
if (Setting_EnableRotation && canRotate && VR_RotateBind_Boolean.GetState((SteamVR_Input_Sources)VR_RotateHand))
|
if (EntryEnableRotation && canRotate && VR_RotateBind_Boolean.GetState((SteamVR_Input_Sources)VR_RotateHand))
|
||||||
{
|
{
|
||||||
Vector2 rawLookVector = new Vector2(CVRTools.AxisDeadZone(vrLookAction.GetAxis(SteamVR_Input_Sources.Any).x, deadzoneRightValue, true),
|
Vector2 rawLookVector = new Vector2(CVRTools.AxisDeadZone(vrLookAction.GetAxis(SteamVR_Input_Sources.Any).x, deadzoneRightValue, true),
|
||||||
CVRTools.AxisDeadZone(vrLookAction.GetAxis(SteamVR_Input_Sources.Any).y, deadzoneRightValue, true));
|
CVRTools.AxisDeadZone(vrLookAction.GetAxis(SteamVR_Input_Sources.Any).y, deadzoneRightValue, true));
|
||||||
|
|
||||||
objectRotation.x += Setting_RotationSpeed * rawLookVector.x;
|
objectRotation.x += EntryRotationSpeed * rawLookVector.x;
|
||||||
objectRotation.y += Setting_RotationSpeed * rawLookVector.y * -1;
|
objectRotation.y += EntryRotationSpeed * rawLookVector.y * -1;
|
||||||
|
|
||||||
_inputManager.lookVector = Vector2.zero;
|
_inputManager.lookVector = Vector2.zero;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVRInputManager.Instance.objectPushPull += CVRInputManager.Instance.floatDirection * Setting_PushPullSpeed * Time.deltaTime;
|
CVRInputManager.Instance.objectPushPull += CVRInputManager.Instance.floatDirection * EntryPushPullSpeed * Time.deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,46 +1,44 @@
|
||||||
using ABI.CCK.Components;
|
using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Core.Player;
|
|
||||||
using ABI_RC.Core.Savior;
|
using ABI_RC.Core.Savior;
|
||||||
using HarmonyLib;
|
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using UnityEngine;
|
|
||||||
using Valve.VR;
|
|
||||||
using NAK.PickupPushPull.InputModules;
|
using NAK.PickupPushPull.InputModules;
|
||||||
|
|
||||||
namespace NAK.PickupPushPull;
|
namespace NAK.PickupPushPull;
|
||||||
|
|
||||||
public class PickupPushPull : MelonMod
|
public class PickupPushPull : MelonMod
|
||||||
{
|
{
|
||||||
private static MelonPreferences_Category Category_PickupPushPull;
|
public static readonly MelonPreferences_Category Category =
|
||||||
private static MelonPreferences_Entry<float> Setting_PushPullSpeed, Setting_RotateSpeed;
|
MelonPreferences.CreateCategory(nameof(PickupPushPull));
|
||||||
private static MelonPreferences_Entry<bool> Setting_EnableRotation, Setting_Desktop_UseZoomForRotate;
|
|
||||||
private static MelonPreferences_Entry<BindingOptionsVR.BindHand> Setting_VR_RotateHand;
|
//Global settings
|
||||||
private static MelonPreferences_Entry<BindingOptionsVR.BindingOptions> Setting_VR_RotateBind;
|
public static readonly MelonPreferences_Entry<float> EntryPushPullSpeed =
|
||||||
|
Category.CreateEntry<float>("Push Pull Speed", 2f, "Up/down on right joystick for VR. Left button + Up/down on right joystick for Gamepad.");
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<float> EntryRotateSpeed =
|
||||||
|
Category.CreateEntry<float>("Rotate Speed", 6f);
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryEnableRotation =
|
||||||
|
Category.CreateEntry<bool>("Enable Rotation", false, "Hold left trigger in VR or right button on Gamepad.");
|
||||||
|
|
||||||
|
//Desktop settings
|
||||||
|
public static readonly MelonPreferences_Entry<bool> EntryDesktopUseZoomForRotate =
|
||||||
|
Category.CreateEntry<bool>("Desktop Use Zoom For Rotate", true, "Use zoom bind for rotation while a prop is held.");
|
||||||
|
|
||||||
|
//VR settings
|
||||||
|
public static readonly MelonPreferences_Entry<BindingOptionsVR.BindHand> EntryVRRotateHand =
|
||||||
|
Category.CreateEntry<BindingOptionsVR.BindHand>("VR Hand", BindingOptionsVR.BindHand.LeftHand);
|
||||||
|
|
||||||
|
public static readonly MelonPreferences_Entry<BindingOptionsVR.BindingOptions> EntryVRRotateBind =
|
||||||
|
Category.CreateEntry<BindingOptionsVR.BindingOptions>("VR Binding", BindingOptionsVR.BindingOptions.ButtonATouch);
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Category_PickupPushPull = MelonPreferences.CreateCategory(nameof(PickupPushPull));
|
foreach (var entry in Category.Entries)
|
||||||
|
|
||||||
//Global settings
|
|
||||||
Setting_PushPullSpeed = Category_PickupPushPull.CreateEntry("Push Pull Speed", 2f, description: "Up/down on right joystick for VR. Left buSettingr + Up/down on right joystick for Gamepad.");
|
|
||||||
Setting_RotateSpeed = Category_PickupPushPull.CreateEntry<float>("Rotate Speed", 6f);
|
|
||||||
Setting_EnableRotation = Category_PickupPushPull.CreateEntry<bool>("Enable Rotation", false, description: "Hold left trigger in VR or right buSettingr on Gamepad.");
|
|
||||||
|
|
||||||
//Desktop settings
|
|
||||||
Setting_Desktop_UseZoomForRotate = Category_PickupPushPull.CreateEntry<bool>("Desktop Use Zoom For Rotate", true, description: "Use zoom bind for rotation while a prop is held.");
|
|
||||||
|
|
||||||
//VR settings
|
|
||||||
Setting_VR_RotateHand = Category_PickupPushPull.CreateEntry("VR Hand", BindingOptionsVR.BindHand.LeftHand);
|
|
||||||
|
|
||||||
//bruh
|
|
||||||
foreach (var setting in Category_PickupPushPull.Entries)
|
|
||||||
{
|
{
|
||||||
setting.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
entry.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
//special setting
|
EntryVRRotateBind.OnEntryValueChangedUntyped.Subscribe(OnUpdateVRBinding);
|
||||||
Setting_VR_RotateBind = Category_PickupPushPull.CreateEntry("VR Binding", BindingOptionsVR.BindingOptions.ButtonATouch);
|
|
||||||
Setting_VR_RotateBind.OnEntryValueChangedUntyped.Subscribe(OnUpdateVRBinding);
|
|
||||||
|
|
||||||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||||
}
|
}
|
||||||
|
@ -69,19 +67,19 @@ public class PickupPushPull : MelonMod
|
||||||
if (!PickupPushPull_Module.Instance) return;
|
if (!PickupPushPull_Module.Instance) return;
|
||||||
|
|
||||||
//Global settings
|
//Global settings
|
||||||
PickupPushPull_Module.Instance.Setting_PushPullSpeed = Setting_PushPullSpeed.Value * 50;
|
PickupPushPull_Module.Instance.EntryPushPullSpeed = EntryPushPullSpeed.Value * 50;
|
||||||
PickupPushPull_Module.Instance.Setting_RotationSpeed = Setting_RotateSpeed.Value * 50;
|
PickupPushPull_Module.Instance.EntryRotationSpeed = EntryRotateSpeed.Value * 50;
|
||||||
PickupPushPull_Module.Instance.Setting_EnableRotation = Setting_EnableRotation.Value;
|
PickupPushPull_Module.Instance.EntryEnableRotation = EntryEnableRotation.Value;
|
||||||
//Desktop settings
|
//Desktop settings
|
||||||
PickupPushPull_Module.Instance.Desktop_UseZoomForRotate = Setting_Desktop_UseZoomForRotate.Value;
|
PickupPushPull_Module.Instance.Desktop_UseZoomForRotate = EntryDesktopUseZoomForRotate.Value;
|
||||||
//VR settings
|
//VR settings
|
||||||
PickupPushPull_Module.Instance.VR_RotateHand = Setting_VR_RotateHand.Value;
|
PickupPushPull_Module.Instance.VR_RotateHand = EntryVRRotateHand.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateVRBinding()
|
private void UpdateVRBinding()
|
||||||
{
|
{
|
||||||
//VR special settings
|
//VR special settings
|
||||||
PickupPushPull_Module.Instance.VR_RotateBind = Setting_VR_RotateBind.Value;
|
PickupPushPull_Module.Instance.VR_RotateBind = EntryVRRotateBind.Value;
|
||||||
PickupPushPull_Module.Instance.UpdateVRBinding();
|
PickupPushPull_Module.Instance.UpdateVRBinding();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
using NAK.PickupPushPull.Properties;
|
using MelonLoader;
|
||||||
using MelonLoader;
|
using NAK.PickupPushPull.Properties;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -15,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(NAK.PickupPushPull),
|
nameof(NAK.PickupPushPull),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/PickupPushPull"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PickupPushPull"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/PickupPushPull/releases/download/v3.0.2/PickupPushPull.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/PickupPushPull.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/PickupPushPull/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PickupPushPull/",
|
||||||
"changelog": "- Fixed issue where ControlEnableGamepad setting was improperly checked on startup.",
|
"changelog": "- Fixed issue where ControlEnableGamepad setting was improperly checked on startup.",
|
||||||
"embedcolor": "804221"
|
"embedcolor": "804221"
|
||||||
}
|
}
|
|
@ -2,7 +2,6 @@
|
||||||
using NAK.PortableCameraAdditions.Properties;
|
using NAK.PortableCameraAdditions.Properties;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -15,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(NAK.PortableCameraAdditions),
|
nameof(NAK.PortableCameraAdditions),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/PortableCameraAdditions"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PortableCameraAdditions"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/PortableCameraAdditions/releases/download/v1.0.2/PortableCameraAdditions.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/PortableCameraAdditions.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/PortableCameraAdditions/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PortableCameraAdditions/",
|
||||||
"changelog": "Added F11 bind to fullscreen Portable Camera on Desktop.",
|
"changelog": "Added F11 bind to fullscreen Portable Camera on Desktop.",
|
||||||
"embedcolor": "9b59b6"
|
"embedcolor": "9b59b6"
|
||||||
}
|
}
|
|
@ -14,9 +14,7 @@ namespace NAK.PropUndoButton;
|
||||||
|
|
||||||
public class PropUndoButton : MelonMod
|
public class PropUndoButton : MelonMod
|
||||||
{
|
{
|
||||||
public static List<DeletedProp> deletedProps = new List<DeletedProp>();
|
public static readonly MelonPreferences_Category Category =
|
||||||
|
|
||||||
private static readonly MelonPreferences_Category Category =
|
|
||||||
MelonPreferences.CreateCategory(nameof(PropUndoButton));
|
MelonPreferences.CreateCategory(nameof(PropUndoButton));
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||||
|
@ -24,16 +22,18 @@ public class PropUndoButton : MelonMod
|
||||||
|
|
||||||
public static readonly MelonPreferences_Entry<bool> EntryUseSFX =
|
public static readonly MelonPreferences_Entry<bool> EntryUseSFX =
|
||||||
Category.CreateEntry("Use SFX", true, description: "Toggle audio queues for prop spawn, undo, redo, and warning.");
|
Category.CreateEntry("Use SFX", true, description: "Toggle audio queues for prop spawn, undo, redo, and warning.");
|
||||||
|
|
||||||
|
internal static List<DeletedProp> deletedProps = new List<DeletedProp>();
|
||||||
|
|
||||||
// audio clip names, InterfaceAudio adds "PropUndo_" prefix
|
// audio clip names, InterfaceAudio adds "PropUndo_" prefix
|
||||||
public const string sfx_spawn = "PropUndo_sfx_spawn";
|
internal const string sfx_spawn = "PropUndo_sfx_spawn";
|
||||||
public const string sfx_undo = "PropUndo_sfx_undo";
|
internal const string sfx_undo = "PropUndo_sfx_undo";
|
||||||
public const string sfx_redo = "PropUndo_sfx_redo";
|
internal const string sfx_redo = "PropUndo_sfx_redo";
|
||||||
public const string sfx_warn = "PropUndo_sfx_warn";
|
internal const string sfx_warn = "PropUndo_sfx_warn";
|
||||||
public const string sfx_deny = "PropUndo_sfx_deny";
|
internal const string sfx_deny = "PropUndo_sfx_deny";
|
||||||
|
|
||||||
public const int redoHistoryLimit = 20; // amount that can be in history at once
|
const int redoHistoryLimit = 20; // amount that can be in history at once
|
||||||
public const int redoTimeoutLimit = 120; // seconds
|
const int redoTimeoutLimit = 120; // seconds
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using NAK.PropUndoButton.Properties;
|
using MelonLoader;
|
||||||
using MelonLoader;
|
using NAK.PropUndoButton.Properties;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||||
nameof(NAK.PropUndoButton),
|
nameof(NAK.PropUndoButton),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/UndoPropButton"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/UndoPropButton"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/PropUndoButton/releases/download/v1.0.1/PropUndoButton.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/PropUndoButton.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/PropUndoButton/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/PropUndoButton/",
|
||||||
"changelog": "- Initial Release\n- Added redo button.\n- Mitigated issue of props getting stuck locally if deleting them before they fully spawn.\n- Lowered SFX volume to match existing UI sounds.",
|
"changelog": "- Initial Release\n- Added redo button.\n- Mitigated issue of props getting stuck locally if deleting them before they fully spawn.\n- Lowered SFX volume to match existing UI sounds.",
|
||||||
"embedcolor": "#00FFFF"
|
"embedcolor": "#00FFFF"
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static NAK.ThirdPerson.CameraLogic;
|
using static NAK.ThirdPerson.CameraLogic;
|
||||||
|
|
|
@ -11,9 +11,9 @@ internal class PlayerSetupPatches
|
||||||
private static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
|
private static void Post_PlayerSetup_Start(ref PlayerSetup __instance)
|
||||||
{
|
{
|
||||||
// Add TrackedControllerFix
|
// Add TrackedControllerFix
|
||||||
var vrLeftHandTracker = __instance.vrLeftHandTracker.AddComponent<TrackedControllerFix>();
|
var vrLeftHandTracker = __instance.vrLeftHandTracker.AddComponent<TrackedControllerFixer>();
|
||||||
vrLeftHandTracker.inputSource = SteamVR_Input_Sources.LeftHand;
|
vrLeftHandTracker.inputSource = SteamVR_Input_Sources.LeftHand;
|
||||||
var vrRightHandTracker = __instance.vrRightHandTracker.AddComponent<TrackedControllerFix>();
|
var vrRightHandTracker = __instance.vrRightHandTracker.AddComponent<TrackedControllerFixer>();
|
||||||
vrRightHandTracker.inputSource = SteamVR_Input_Sources.RightHand;
|
vrRightHandTracker.inputSource = SteamVR_Input_Sources.RightHand;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace NAK.TrackedControllerFix;
|
namespace NAK.TrackedControllerFix;
|
||||||
|
|
||||||
public class TrackedControllerFixMod : MelonMod
|
public class TrackedControllerFix : MelonMod
|
||||||
{
|
{
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,11 +10,11 @@ using System.Reflection;
|
||||||
[assembly: AssemblyProduct(nameof(NAK.TrackedControllerFix))]
|
[assembly: AssemblyProduct(nameof(NAK.TrackedControllerFix))]
|
||||||
|
|
||||||
[assembly: MelonInfo(
|
[assembly: MelonInfo(
|
||||||
typeof(NAK.TrackedControllerFix.TrackedControllerFixMod),
|
typeof(NAK.TrackedControllerFix.TrackedControllerFix),
|
||||||
nameof(NAK.TrackedControllerFix),
|
nameof(NAK.TrackedControllerFix),
|
||||||
AssemblyInfoParams.Version,
|
AssemblyInfoParams.Version,
|
||||||
AssemblyInfoParams.Author,
|
AssemblyInfoParams.Author,
|
||||||
downloadLink: "https://github.com/NotAKidOnSteam/TrackedControllerFix"
|
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/TrackedControllerFix"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
|
|
@ -3,7 +3,7 @@ using Valve.VR;
|
||||||
|
|
||||||
namespace NAK.TrackedControllerFix;
|
namespace NAK.TrackedControllerFix;
|
||||||
|
|
||||||
public class TrackedControllerFix : MonoBehaviour
|
public class TrackedControllerFixer : MonoBehaviour
|
||||||
{
|
{
|
||||||
public SteamVR_Input_Sources inputSource;
|
public SteamVR_Input_Sources inputSource;
|
||||||
public int deviceIndex;
|
public int deviceIndex;
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"None"
|
"None"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/TrackedControllerFix/releases/download/v1.0.0/TrackedControllerFix.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/TrackedControllerFix.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/TrackedControllerFix/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/TrackedControllerFix/",
|
||||||
"changelog": "Initial Release",
|
"changelog": "Initial Release",
|
||||||
"embedcolor": "3498db"
|
"embedcolor": "3498db"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue