mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
SearchWithSpacesFix: initial release
This commit is contained in:
parent
379be57b84
commit
d0c8298074
5 changed files with 97 additions and 0 deletions
26
SearchWithSpacesFix/Main.cs
Normal file
26
SearchWithSpacesFix/Main.cs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using ABI_RC.Core.InteractionSystem;
|
||||||
|
using HarmonyLib;
|
||||||
|
using MelonLoader;
|
||||||
|
|
||||||
|
namespace NAK.SearchWithSpacesFix;
|
||||||
|
|
||||||
|
public class SearchWithSpacesFixMod : MelonMod
|
||||||
|
{
|
||||||
|
public override void OnInitializeMelon()
|
||||||
|
{
|
||||||
|
HarmonyInstance.Patch(
|
||||||
|
typeof(ViewManager).GetMethod(nameof(ViewManager.GetSearchResults),
|
||||||
|
BindingFlags.Public | BindingFlags.Instance),
|
||||||
|
prefix: new HarmonyMethod(typeof(SearchWithSpacesFixMod).GetMethod(nameof(OnPreGetSearchResults),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Static))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// this is so crazy
|
||||||
|
|
||||||
|
private static void OnPreGetSearchResults(ref string searchTerm)
|
||||||
|
=> searchTerm = searchTerm.Replace(" ", "_");
|
||||||
|
|
||||||
|
// this is so crazy
|
||||||
|
}
|
32
SearchWithSpacesFix/Properties/AssemblyInfo.cs
Normal file
32
SearchWithSpacesFix/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
using MelonLoader;
|
||||||
|
using NAK.SearchWithSpacesFix.Properties;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
[assembly: AssemblyTitle(nameof(NAK.SearchWithSpacesFix))]
|
||||||
|
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||||
|
[assembly: AssemblyProduct(nameof(NAK.SearchWithSpacesFix))]
|
||||||
|
|
||||||
|
[assembly: MelonInfo(
|
||||||
|
typeof(NAK.SearchWithSpacesFix.SearchWithSpacesFixMod),
|
||||||
|
nameof(NAK.SearchWithSpacesFix),
|
||||||
|
AssemblyInfoParams.Version,
|
||||||
|
AssemblyInfoParams.Author,
|
||||||
|
downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SearchWithSpacesFix"
|
||||||
|
)]
|
||||||
|
|
||||||
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||||
|
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||||
|
[assembly: MelonColor(255, 246, 25, 99)] // red-pink
|
||||||
|
[assembly: MelonAuthorColor(255, 158, 21, 32)] // red
|
||||||
|
[assembly: HarmonyDontPatchAll]
|
||||||
|
|
||||||
|
namespace NAK.SearchWithSpacesFix.Properties;
|
||||||
|
internal static class AssemblyInfoParams
|
||||||
|
{
|
||||||
|
public const string Version = "1.0.0";
|
||||||
|
public const string Author = "NotAKidoS";
|
||||||
|
}
|
14
SearchWithSpacesFix/README.md
Normal file
14
SearchWithSpacesFix/README.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# SearchWithSpacesFix
|
||||||
|
|
||||||
|
Fixes search terms that use spaces.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI.
|
||||||
|
https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
|
||||||
|
|
||||||
|
> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive.
|
||||||
|
|
||||||
|
> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use.
|
||||||
|
|
||||||
|
> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive.
|
2
SearchWithSpacesFix/SearchWithSpacesFix.csproj
Normal file
2
SearchWithSpacesFix/SearchWithSpacesFix.csproj
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk" />
|
23
SearchWithSpacesFix/format.json
Normal file
23
SearchWithSpacesFix/format.json
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"_id": -1,
|
||||||
|
"name": "SearchWithSpacesFix",
|
||||||
|
"modversion": "1.0.0",
|
||||||
|
"gameversion": "2024r177",
|
||||||
|
"loaderversion": "0.6.1",
|
||||||
|
"modtype": "Mod",
|
||||||
|
"author": "NotAKidoS",
|
||||||
|
"description": "Fixes search terms that include spaces.",
|
||||||
|
"searchtags": [
|
||||||
|
"search",
|
||||||
|
"spaces",
|
||||||
|
"fix",
|
||||||
|
"meow"
|
||||||
|
],
|
||||||
|
"requirements": [
|
||||||
|
"None"
|
||||||
|
],
|
||||||
|
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r42/SearchWithSpacesFix.dll",
|
||||||
|
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/SearchWithSpacesFix/",
|
||||||
|
"changelog": "- Initial release",
|
||||||
|
"embedcolor": "#f61963"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue