mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 06:49:22 +00:00
Move many mods to Deprecated folder, fix spelling
This commit is contained in:
parent
5e822cec8d
commit
0042590aa6
539 changed files with 7475 additions and 3120 deletions
|
@ -1,45 +0,0 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using MelonLoader;
|
||||
using System.Collections;
|
||||
|
||||
namespace NAK.CVRGizmos;
|
||||
|
||||
public class CVRGizmos : MelonMod
|
||||
{
|
||||
public static readonly MelonPreferences_Category CategoryCVRGizmos =
|
||||
MelonPreferences.CreateCategory(nameof(CVRGizmos));
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
CategoryCVRGizmos.CreateEntry("Enabled", false, description: "Toggle CVR Gizmos entirely.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryLocalOnly =
|
||||
CategoryCVRGizmos.CreateEntry("Local Only", false, description: "Toggle CVR Gizmos local-only mode.");
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
EntryEnabled.OnEntryValueChangedUntyped.Subscribe(CVRGizmosEnabled);
|
||||
EntryLocalOnly.OnEntryValueChangedUntyped.Subscribe(CVRGizmosLocalOnly);
|
||||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||
}
|
||||
|
||||
private IEnumerator WaitForLocalPlayer()
|
||||
{
|
||||
while (PlayerSetup.Instance == null)
|
||||
yield return null;
|
||||
|
||||
PlayerSetup.Instance.gameObject.AddComponent<CVRGizmoManager>();
|
||||
}
|
||||
|
||||
public void CVRGizmosEnabled(object arg1, object arg2)
|
||||
{
|
||||
if (!CVRGizmoManager.Instance) return;
|
||||
CVRGizmoManager.Instance.EnableGizmos(EntryEnabled.Value);
|
||||
}
|
||||
|
||||
public void CVRGizmosLocalOnly(object arg1, object arg2)
|
||||
{
|
||||
if (!CVRGizmoManager.Instance) return;
|
||||
CVRGizmoManager.Instance.g_localOnly = EntryLocalOnly.Value;
|
||||
CVRGizmoManager.Instance.RefreshGizmos();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue