Skip to content

Commit

Permalink
Setup patch method, and fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexevolution committed Jul 3, 2022
1 parent dbbe155 commit 987f204
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion NeosDisableGamepads.sln
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModNameGoesHere", "ModNameGoesHere\ModNameGoesHere.csproj", "{0322B2EF-7452-479D-BAE2-FCAB75033337}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NeosDisableGamepads", "NeosDisableGamepads\NeosDisableGamepads.csproj", "{0322B2EF-7452-479D-BAE2-FCAB75033337}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
12 changes: 6 additions & 6 deletions NeosDisableGamepads/NeosDisableGamepads.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
using HarmonyLib;
using NeosModLoader;

namespace ModNameGoesHere
namespace NeosDisableGamepads
{
public class ModNameGoesHere : NeosMod
public class NeosDisableGamepads : NeosMod
{
public override string Name => "NeosDisableGamepads";
public override string Author => "Lexevo";
public override string Version => "1.0.0";
public override string Link => "https://github.com/Lexevolution/NeosDisableGamepads/";
public override void OnEngineInit()
{
Harmony harmony = new Harmony("net.username.Template");
Harmony harmony = new Harmony("net.lexevo.NeosDisableGamepads");
harmony.PatchAll();
}

[HarmonyPatch(typeof(class you want to patch), "name of method you want to patch")]
class ModNameGoesHerePatch
[HarmonyPatch(typeof(FrooxEngine.StandardGamepad), "Bind")]
class NeosDisableGamepadsPatch
{
public static bool Prefix()
{
return false;//dont run rest of method
return false; //dont run rest of method
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions NeosDisableGamepads/NeosDisableGamepads.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
Expand Down Expand Up @@ -51,12 +51,7 @@
<HintPath Condition="Exists('D:\Games\NeosVR_Data\Saves\Plugins\NeosModLoader.dll')">D:\Games\NeosVR_Data\Saves\Plugins\NeosModLoader.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="NeosDisableGamepads.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
20 changes: 10 additions & 10 deletions NeosDisableGamepads/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("NeosDisableGamepads")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NeosDisableGamepads")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//[assembly: AssemblyTitle("NeosDisableGamepads")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("NeosDisableGamepads")]
//[assembly: AssemblyCopyright("Copyright © 2022")]
//[assembly: AssemblyTrademark("")]
//[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand All @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 987f204

Please sign in to comment.