NAK_CVR_Mods/AvatarScale/Main.cs
NotAKidoS e8d3183bc3 [AvatarScaleMod] Implement scaled components.
implemented scaling for specific components that Avatar Scale Tool would

they conflict, if you ran your avatar through Avatar Scale Tool then the animations will add on top
2023-06-22 23:56:01 -05:00

37 lines
No EOL
1.1 KiB
C#

using MelonLoader;
namespace NAK.AvatarScaleMod;
public class AvatarScaleMod : MelonMod
{
internal static MelonLogger.Instance Logger;
public static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(nameof(AvatarScaleMod));
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
Category.CreateEntry("Enabled", true, description: "Toggle AvatarScaleMod entirely.");
public static readonly MelonPreferences_Entry<bool> EntryUseScaleGesture =
Category.CreateEntry("Scale Gesture", true, description: "Use two fists to scale yourself easily.");
public override void OnInitializeMelon()
{
Logger = LoggerInstance;
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
ApplyPatches(typeof(HarmonyPatches.GesturePlaneTestPatches));
}
void ApplyPatches(Type type)
{
try
{
HarmonyInstance.PatchAll(type);
}
catch (Exception e)
{
LoggerInstance.Msg($"Failed while patching {type.Name}!");
LoggerInstance.Error(e);
}
}
}