mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
RCCVirtualSteeringWheel: renamed mod, fixed things
This commit is contained in:
parent
3a00ff104a
commit
5c8c724b58
13 changed files with 445 additions and 314 deletions
40
RCCVirtualSteeringWheel/Main.cs
Normal file
40
RCCVirtualSteeringWheel/Main.cs
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue