1
0
mirror of synced 2024-12-18 01:05:55 +01:00

feat: Add the actual code of the mod

This commit is contained in:
Repflez 2022-01-27 10:36:07 -07:00
parent 1a8bfa5669
commit 6d6374eda3
5 changed files with 36 additions and 2 deletions

5
.gitignore vendored
View File

@ -360,4 +360,7 @@ MigrationBackup/
.ionide/ .ionide/
# Fody - auto-generated XML schema # Fody - auto-generated XML schema
FodyWeavers.xsd FodyWeavers.xsd
# Ignore game data
lib/Assembly-CSharp.dll

19
FontChanger.cs Normal file
View File

@ -0,0 +1,19 @@
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TaikoModStuff
{
internal class FontChanger
{
[HarmonyPatch(typeof(WordDataManager), "GetFontType")]
[HarmonyPostfix]
static void GetFontType_Patched(ref int __result)
{
__result = 0; // Force the font to the JP one.
}
}
}

View File

@ -1,12 +1,17 @@
using BepInEx; using BepInEx;
using HarmonyLib;
namespace TaikoModStuff namespace TaikoModStuff
{ {
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] [BepInPlugin("com.github.Repflez.TaikoModStuff", PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin public class Plugin : BaseUnityPlugin
{ {
private void Awake() private void Awake()
{ {
var instance = new Harmony(PluginInfo.PLUGIN_NAME);
instance.PatchAll(typeof(FontChanger));
// Plugin startup logic // Plugin startup logic
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!"); Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
} }

View File

@ -19,4 +19,11 @@
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> <ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" /> <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>lib\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</Project> </Project>

0
lib/.gitkeep Normal file
View File