it is done
This commit is contained in:
26
Plugin.cs
26
Plugin.cs
@@ -11,7 +11,7 @@ namespace Radium.InputManagerPatch
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Patch for InputManager in Radium's 2021 build to set the input type to whatever you desire!
|
/// Patch for InputManager in Radium's 2021 build to set the input type to whatever you desire!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
|
[BepInPlugin("com.radium.inputmanager", "Radium.InputManagerPatch", "1.0.3")]
|
||||||
public class Plugin : BasePlugin
|
public class Plugin : BasePlugin
|
||||||
{
|
{
|
||||||
internal static new ManualLogSource Log;
|
internal static new ManualLogSource Log;
|
||||||
@@ -22,21 +22,32 @@ namespace Radium.InputManagerPatch
|
|||||||
/// The input type we wish to set. If no value is provided, it defaults to SteamVR_Vive.
|
/// The input type we wish to set. If no value is provided, it defaults to SteamVR_Vive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static ConfigEntry<InputManager.LNEHPBFDEGG> VRInputDeviceType;
|
internal static ConfigEntry<InputManager.LNEHPBFDEGG> VRInputDeviceType;
|
||||||
|
/// <summary>
|
||||||
|
/// If this plugin should be enabled or not or if we should break before anything gets patched
|
||||||
|
/// </summary>
|
||||||
|
internal static ConfigEntry<bool> Enabled;
|
||||||
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
{
|
{
|
||||||
Log = base.Log;
|
Log = base.Log;
|
||||||
|
|
||||||
|
Enabled = Config.Bind(
|
||||||
|
section: "General",
|
||||||
|
key: "Enabled",
|
||||||
|
defaultValue: true,
|
||||||
|
description: "Determines if the patch is enabled.");
|
||||||
|
|
||||||
|
if (!Enabled.Value)
|
||||||
|
return;
|
||||||
|
|
||||||
VRInputDeviceType = Config.Bind(
|
VRInputDeviceType = Config.Bind(
|
||||||
section: "Input",
|
section: "Input",
|
||||||
key: "VRInputDeviceType",
|
key: "VRInputDeviceType",
|
||||||
defaultValue: InputManager.LNEHPBFDEGG.SteamVR_Vive,
|
defaultValue: InputManager.LNEHPBFDEGG.SteamVR_Vive,
|
||||||
description: $"Fixed input mode. Set it to any of the acceptable values below");
|
description: "Fixed input mode. Set it to any of the acceptable values below.");
|
||||||
|
|
||||||
|
Log.LogInfo($"{MyPluginInfo.PLUGIN_GUID} loaded! (VRInputDeviceType: {VRInputDeviceType.Value})");
|
||||||
|
|
||||||
Log.LogInfo($"{MyPluginInfo.PLUGIN_GUID} loaded!");
|
|
||||||
#if DEBUG
|
|
||||||
Log.LogInfo($"We are set! {VRInputDeviceType.Value}");
|
|
||||||
#endif
|
|
||||||
_harmony.PatchAll();
|
_harmony.PatchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,6 +60,9 @@ namespace Radium.InputManagerPatch
|
|||||||
private static bool Prefix(ref InputManager.LNEHPBFDEGG __result)
|
private static bool Prefix(ref InputManager.LNEHPBFDEGG __result)
|
||||||
{
|
{
|
||||||
__result = Plugin.VRInputDeviceType.Value;
|
__result = Plugin.VRInputDeviceType.Value;
|
||||||
|
#if DEBUG
|
||||||
|
Log.LogInfo($"We are set! ({VRInputDeviceType.Value})");
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<AssemblyName>Radium.InputManagerPatch</AssemblyName>
|
<AssemblyName>Radium.InputManagerPatch</AssemblyName>
|
||||||
<Product>Awesome patch for InputManager in Radium's 2021 build to set the input type to whatever you desire!</Product>
|
<Product>Awesome patch for InputManager in Radium's 2021 build to set the input type to whatever you desire!</Product>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.3</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<RestoreAdditionalProjectSources>
|
<RestoreAdditionalProjectSources>
|
||||||
|
|||||||
Reference in New Issue
Block a user