mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[AvatarScale] Cleanup
This commit is contained in:
parent
ab4276e880
commit
5b40a2a185
4 changed files with 12 additions and 12 deletions
|
@ -220,13 +220,13 @@ public class AvatarScaleManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
ApplyAvatarScaling();
|
ApplyAvatarScaling();
|
||||||
ApplyComponentScaling();
|
ApplyComponentScaling();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LateUpdate()
|
private void LateUpdate()
|
||||||
{
|
{
|
||||||
ApplyAvatarScaling();
|
ApplyAvatarScaling();
|
||||||
ApplyComponentScaling();
|
ApplyComponentScaling();
|
||||||
|
|
|
@ -8,11 +8,11 @@ using RootMotion.FinalIK;
|
||||||
|
|
||||||
namespace NAK.AvatarScaleMod.HarmonyPatches;
|
namespace NAK.AvatarScaleMod.HarmonyPatches;
|
||||||
|
|
||||||
class PlayerSetupPatches
|
internal class PlayerSetupPatches
|
||||||
{
|
{
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetupAvatar))]
|
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetupAvatar))]
|
||||||
static void Postfix_PlayerSetup_SetupAvatar(ref PlayerSetup __instance)
|
private static void Postfix_PlayerSetup_SetupAvatar(ref PlayerSetup __instance)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -27,11 +27,11 @@ class PlayerSetupPatches
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PuppetMasterPatches
|
internal class PuppetMasterPatches
|
||||||
{
|
{
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(PuppetMaster), nameof(PuppetMaster.AvatarInstantiated))]
|
[HarmonyPatch(typeof(PuppetMaster), nameof(PuppetMaster.AvatarInstantiated))]
|
||||||
static void Postfix_PuppetMaster_AvatarInstantiated(ref PuppetMaster __instance)
|
private static void Postfix_PuppetMaster_AvatarInstantiated(ref PuppetMaster __instance)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -45,11 +45,11 @@ class PuppetMasterPatches
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GesturePlaneTestPatches
|
internal class GesturePlaneTestPatches
|
||||||
{
|
{
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
[HarmonyPatch(typeof(GesturePlaneTest), nameof(GesturePlaneTest.Start))]
|
[HarmonyPatch(typeof(GesturePlaneTest), nameof(GesturePlaneTest.Start))]
|
||||||
static void Postfix_GesturePlaneTest_Start()
|
private static void Postfix_GesturePlaneTest_Start()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class AvatarScaleMod : MelonMod
|
||||||
ApplyPatches(typeof(HarmonyPatches.GesturePlaneTestPatches));
|
ApplyPatches(typeof(HarmonyPatches.GesturePlaneTestPatches));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplyPatches(Type type)
|
private void ApplyPatches(Type type)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace NAK.AvatarScaleMod;
|
||||||
|
|
||||||
// i like this
|
// i like this
|
||||||
|
|
||||||
static class ModSettings
|
internal static class ModSettings
|
||||||
{
|
{
|
||||||
public static readonly MelonPreferences_Category Category =
|
public static readonly MelonPreferences_Category Category =
|
||||||
MelonPreferences.CreateCategory(nameof(AvatarScaleMod));
|
MelonPreferences.CreateCategory(nameof(AvatarScaleMod));
|
||||||
|
@ -27,12 +27,12 @@ static class ModSettings
|
||||||
AvatarScaleGesture.GestureEnabled = EntryUseScaleGesture.Value;
|
AvatarScaleGesture.GestureEnabled = EntryUseScaleGesture.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnEntryEnabledChanged(bool oldValue, bool newValue)
|
private static void OnEntryEnabledChanged(bool oldValue, bool newValue)
|
||||||
{
|
{
|
||||||
AvatarScaleManager.GlobalEnabled = newValue;
|
AvatarScaleManager.GlobalEnabled = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnEntryUseScaleGestureChanged(bool oldValue, bool newValue)
|
private static void OnEntryUseScaleGestureChanged(bool oldValue, bool newValue)
|
||||||
{
|
{
|
||||||
AvatarScaleGesture.GestureEnabled = newValue;
|
AvatarScaleGesture.GestureEnabled = newValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue