Move many mods to Deprecated folder, fix spelling

This commit is contained in:
NotAKidoS 2025-04-03 02:57:35 -05:00
parent 5e822cec8d
commit 0042590aa6
539 changed files with 7475 additions and 3120 deletions

View file

@ -0,0 +1,37 @@
using ABI_RC.Core.Player;
using MelonLoader;
namespace NAK.HeadBobbingFix;
public class HeadBobbingFix : MelonMod
{
public static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(nameof(HeadBobbingFix));
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
Category.CreateEntry("Enabled", true, description: "Toggle HeadBobbingFix entirely. You need full headbobbing enabled for the mod to take effect.");
public override void OnInitializeMelon()
{
EntryEnabled.OnEntryValueChanged.Subscribe(OnEntryEnabledChanged);
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
}
void OnEntryEnabledChanged(bool newValue, bool oldValue)
{
if (newValue) PlayerSetup.Instance?.SetViewPointOffset();
}
void ApplyPatches(Type type)
{
try
{
HarmonyInstance.PatchAll(type);
}
catch (Exception e)
{
LoggerInstance.Msg($"Failed while patching {type.Name}!");
LoggerInstance.Error(e);
}
}
}