RCCVirtualSteeringWheel: renamed mod, fixed things

This commit is contained in:
NotAKidoS 2025-01-07 02:36:44 -06:00
parent 3a00ff104a
commit 5c8c724b58
13 changed files with 445 additions and 314 deletions

View file

@ -0,0 +1,40 @@
using MelonLoader;
using NAK.RCCVirtualSteeringWheel.Patches;
namespace NAK.RCCVirtualSteeringWheel;
public class RCCVirtualSteeringWheelMod : MelonMod
{
private static MelonLogger.Instance Logger;
#region Melon Events
public override void OnInitializeMelon()
{
Logger = LoggerInstance;
ApplyPatches(typeof(RCCCarControllerV3_Patches));
ApplyPatches(typeof(CVRInputManager_Patches));
Logger.Msg(ModSettings.EntryCustomSteeringRange);
}
#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
}