NAK_CVR_Mods/AvatarScale/Main.cs
NotAKidoS f92e842f41 [AvatarScaleMod] Add settings & cleanup.
why do i obsess with making my mods look pretty when staring them down in dnspy
2023-06-23 01:02:46 -05:00

39 lines
No EOL
1.2 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", false, description: "Use two fists to scale yourself easily.");
public override void OnInitializeMelon()
{
Logger = LoggerInstance;
ModSettings.InitializeModSettings();
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);
}
}
}