mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-01 05:49:23 +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
|
@ -211,7 +211,7 @@ public class AvatarScaleManager : MonoBehaviour
|
|||
public float GetHeight()
|
||||
{
|
||||
if (_localAvatarScaler == null)
|
||||
return PlayerAvatarPoint.defaultAvatarHeight;
|
||||
return PlayerAvatarPoint.DefaultAvatarHeight;
|
||||
|
||||
if (!_localAvatarScaler.IsForcingHeight())
|
||||
return PlayerSetup.Instance.GetAvatarHeight();
|
||||
|
@ -222,7 +222,7 @@ public class AvatarScaleManager : MonoBehaviour
|
|||
public float GetAnimationClipHeight()
|
||||
{
|
||||
if (_localAvatarScaler == null)
|
||||
return PlayerAvatarPoint.defaultAvatarHeight;
|
||||
return PlayerAvatarPoint.DefaultAvatarHeight;
|
||||
|
||||
if (!_localAvatarScaler.IsForcingHeight())
|
||||
return PlayerSetup.Instance.GetAvatarHeight();
|
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.UI;
|
||||
using NAK.AvatarScaleMod.AvatarScaling;
|
||||
using UnityEngine;
|
||||
|
@ -72,7 +73,7 @@ public class LocalScaler : BaseScaler
|
|||
}
|
||||
|
||||
// animation scale changed, record it!
|
||||
Vector3 scaleDifference = PlayerSetup.DivideVectors(localScale - _initialScale, _initialScale);
|
||||
Vector3 scaleDifference = CVRTools.DivideVectors(localScale - _initialScale, _initialScale);
|
||||
_animatedScaleFactor = scaleDifference.y;
|
||||
_animatedHeight = (_initialHeight * _animatedScaleFactor) + _initialHeight;
|
||||
_animatedScale = localScale;
|
|
@ -3,8 +3,8 @@ using BTKUILib;
|
|||
using BTKUILib.UIObjects;
|
||||
using NAK.AvatarScaleMod.AvatarScaling;
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations
|
||||
{
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
private static Page _asmRootPage;
|
||||
|
@ -97,4 +97,3 @@ namespace NAK.AvatarScaleMod.Integrations
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
using BTKUILib.UIObjects;
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations
|
||||
{
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
private static void Setup_AvatarScaleModCategory(Page page)
|
||||
|
@ -14,4 +14,3 @@ namespace NAK.AvatarScaleMod.Integrations
|
|||
AddMelonToggle(ref avScaleModCategory, ModSettings.EntryPersistThroughRestart);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
using BTKUILib.UIObjects;
|
||||
using BTKUILib.UIObjects.Components;
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations
|
||||
{
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
private static void Setup_AvatarScaleToolCategory(Page page)
|
||||
|
@ -20,4 +20,3 @@ namespace NAK.AvatarScaleMod.Integrations
|
|||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
using BTKUILib.UIObjects;
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations
|
||||
{
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
private static void Setup_DebugOptionsCategory(Page page)
|
||||
|
@ -13,4 +13,3 @@ namespace NAK.AvatarScaleMod.Integrations
|
|||
AddMelonToggle(ref debugCategory, ModSettings.Debug_ComponentSearchTime);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,8 +4,8 @@ using BTKUILib.UIObjects.Components;
|
|||
using NAK.AvatarScaleMod.AvatarScaling;
|
||||
using System.Collections.Generic; // Added for list support
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations
|
||||
{
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
private static readonly List<QMUIElement> USM_QmUiElements = new();
|
||||
|
@ -72,4 +72,3 @@ namespace NAK.AvatarScaleMod.Integrations
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -3,8 +3,8 @@ using BTKUILib.UIObjects;
|
|||
using BTKUILib.UIObjects.Components;
|
||||
using NAK.AvatarScaleMod.AvatarScaling;
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations
|
||||
{
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
private static Button _playerHasModElement;
|
||||
|
@ -62,4 +62,3 @@ namespace NAK.AvatarScaleMod.Integrations
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Reflection;
|
||||
using BTKUILib;
|
||||
using BTKUILib.UIObjects;
|
||||
using BTKUILib.UIObjects.Components;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.AvatarScaleMod.Integrations;
|
||||
|
||||
public static partial class BtkUiAddon
|
||||
{
|
||||
#region Melon Preference Helpers
|
||||
|
||||
private static ToggleButton AddMelonToggle(ref Category category, MelonPreferences_Entry<bool> entry)
|
||||
{
|
||||
ToggleButton toggle = category.AddToggle(entry.DisplayName, entry.Description, entry.Value);
|
||||
toggle.OnValueUpdated += b => entry.Value = b;
|
||||
return toggle;
|
||||
}
|
||||
|
||||
private static SliderFloat AddMelonSlider(ref Category category, MelonPreferences_Entry<float> entry, float min,
|
||||
float max, int decimalPlaces = 2, bool allowReset = true)
|
||||
{
|
||||
SliderFloat slider = category.AddSlider(entry.DisplayName, entry.Description,
|
||||
Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset);
|
||||
slider.OnValueUpdated += f => entry.Value = f;
|
||||
return slider;
|
||||
}
|
||||
|
||||
private static Button AddMelonStringInput(ref Category category, MelonPreferences_Entry<string> entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly)
|
||||
{
|
||||
Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle);
|
||||
button.OnPress += () => QuickMenuAPI.OpenKeyboard(entry.Value, s => entry.Value = s);
|
||||
return button;
|
||||
}
|
||||
|
||||
private static Button AddMelonNumberInput(ref Category category, MelonPreferences_Entry<float> entry, string buttonIcon = "", ButtonStyle buttonStyle = ButtonStyle.TextOnly)
|
||||
{
|
||||
Button button = category.AddButton(entry.DisplayName, buttonIcon, entry.Description, buttonStyle);
|
||||
button.OnPress += () => QuickMenuAPI.OpenNumberInput(entry.DisplayName, entry.Value, f => entry.Value = f);
|
||||
return button;
|
||||
}
|
||||
|
||||
// private static SliderFloat AddMelonSlider(ref Page page, MelonPreferences_Entry<float> entry, float min, float max, int decimalPlaces = 2, bool allowReset = true)
|
||||
// {
|
||||
// SliderFloat slider = page.AddSlider(entry.DisplayName, entry.Description, Mathf.Clamp(entry.Value, min, max), min, max, decimalPlaces, entry.DefaultValue, allowReset);
|
||||
// slider.OnValueUpdated += f => entry.Value = f;
|
||||
// return slider;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to create a category that saves its collapsed state to a MelonPreferences entry.
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="entry"></param>
|
||||
/// <param name="showHeader"></param>
|
||||
/// <returns></returns>
|
||||
private static Category AddMelonCategory(ref Page page, MelonPreferences_Entry<bool> entry, bool showHeader = true)
|
||||
{
|
||||
Category category = page.AddCategory(entry.DisplayName, showHeader, true, entry.Value);
|
||||
category.OnCollapse += b => entry.Value = b;
|
||||
return category;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Icon Utils
|
||||
|
||||
private static Stream GetIconStream(string iconName)
|
||||
{
|
||||
Assembly assembly = Assembly.GetExecutingAssembly();
|
||||
string assemblyName = assembly.GetName().Name;
|
||||
return assembly.GetManifestResourceStream($"{assemblyName}.resources.{iconName}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
|
@ -3,8 +3,8 @@ using System.IO;
|
|||
using System.Reflection;
|
||||
|
||||
// https://github.com/SDraw/ml_mods_cvr/blob/master/ml_amt/Scripts.cs
|
||||
namespace NAK.AvatarScaleMod
|
||||
{
|
||||
namespace NAK.AvatarScaleMod;
|
||||
|
||||
static class Scripts
|
||||
{
|
||||
public static string GetEmbeddedScript(string p_name)
|
||||
|
@ -24,4 +24,3 @@ namespace NAK.AvatarScaleMod
|
|||
return l_result;
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -2,8 +2,8 @@
|
|||
using UnityEngine;
|
||||
using Gizmos = Popcron.Gizmos;
|
||||
|
||||
namespace NAK.CVRGizmos
|
||||
{
|
||||
namespace NAK.CVRGizmos;
|
||||
|
||||
public class CVRGizmoManager : MonoBehaviour
|
||||
{
|
||||
public static CVRGizmoManager Instance;
|
||||
|
@ -58,4 +58,3 @@ namespace NAK.CVRGizmos
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue