mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
i dont know what im doing
implement shit fix for shit problem
This commit is contained in:
parent
41f8db5dcf
commit
83c101f5ee
7 changed files with 330 additions and 0 deletions
47
BadAnimatorFix/Main.cs
Normal file
47
BadAnimatorFix/Main.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using MelonLoader;
|
||||
|
||||
namespace NAK.Melons.BadAnimatorFix;
|
||||
|
||||
public class BadAnimatorFixMod : MelonMod
|
||||
{
|
||||
internal static MelonLogger.Instance Logger;
|
||||
public const string SettingsCategory = "BadAnimatorFix";
|
||||
public static readonly MelonPreferences_Category CategoryBadAnimatorFix = MelonPreferences.CreateCategory(SettingsCategory);
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
CategoryBadAnimatorFix.CreateEntry("Enabled", true, description: "Toggle BadAnimatorFix entirely. Requires avatar/spawnable/world reload.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryCVRAvatar =
|
||||
CategoryBadAnimatorFix.CreateEntry("Add to CVRAvatar", true, description: "Should BadAnimatorFix run for CVRAvatar? Requires avatar reload.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryCVRSpawnable =
|
||||
CategoryBadAnimatorFix.CreateEntry("Add to CVRSpawnable", false, description: "Should BadAnimatorFix run for CVRSpawnable? Requires spawnable reload.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryCVRWorld =
|
||||
CategoryBadAnimatorFix.CreateEntry("Add to CVRWorld", false, description: "Should BadAnimatorFix run for CVRWorld? Requires world reload.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryMenus =
|
||||
CategoryBadAnimatorFix.CreateEntry("Add to Menus", false, description: "Should BadAnimatorFix run for QM & MM? Requires game restart.");
|
||||
|
||||
public static readonly MelonPreferences_Entry<float> EntryPlayableTimeLimit =
|
||||
CategoryBadAnimatorFix.CreateEntry("Playable Time Limit", 600f, description: "How long in seconds can a Playable play for before rewinding its states.");
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Logger = LoggerInstance;
|
||||
ApplyPatches(typeof(HarmonyPatches.AnimatorPatches));
|
||||
}
|
||||
|
||||
private void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Msg($"Failed while patching {type.Name}!");
|
||||
Logger.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue