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
44
PlayerColorsAPI/Main.cs
Normal file
44
PlayerColorsAPI/Main.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using MelonLoader;
|
||||
|
||||
namespace NAK.VisualCloneFix;
|
||||
|
||||
public class VisualCloneFixMod : MelonMod
|
||||
{
|
||||
#region Melon Preferences
|
||||
|
||||
private static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(VisualCloneFix));
|
||||
|
||||
internal static readonly MelonPreferences_Entry<bool> EntryUseVisualClone =
|
||||
Category.CreateEntry("use_visual_clone", true,
|
||||
"Use Visual Clone", description: "Uses the potentially faster Visual Clone setup for the local avatar.");
|
||||
|
||||
#endregion Melon Preferences
|
||||
|
||||
#region Melon Events
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
ApplyPatches(typeof(Patches)); // slapped together a fix cause HarmonyInstance.Patch was null ref for no reason?
|
||||
}
|
||||
|
||||
#endregion Melon Events
|
||||
|
||||
#region Melon Mod Utilities
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||
LoggerInstance.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Melon Mod Utilities
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue