feat: Make the font config a configuration
This commit is contained in:
parent
6d6374eda3
commit
a215cce554
@ -1,9 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TaikoModStuff
|
||||
{
|
||||
@ -13,7 +8,8 @@ namespace TaikoModStuff
|
||||
[HarmonyPostfix]
|
||||
static void GetFontType_Patched(ref int __result)
|
||||
{
|
||||
__result = 0; // Force the font to the JP one.
|
||||
if (Plugin.configForceFontChange.Value)
|
||||
__result = 0; // Force the font to the JP one.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using BepInEx;
|
||||
using BepInEx.Configuration;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace TaikoModStuff
|
||||
@ -6,8 +7,15 @@ namespace TaikoModStuff
|
||||
[BepInPlugin("com.github.Repflez.TaikoModStuff", PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
|
||||
public class Plugin : BaseUnityPlugin
|
||||
{
|
||||
public static ConfigEntry<bool> configForceFontChange;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Add configurations
|
||||
configForceFontChange = Config.Bind("General.Toggles",
|
||||
"ForceFontChange",
|
||||
false,
|
||||
"Force the game font to the JP font");
|
||||
|
||||
var instance = new Harmony(PluginInfo.PLUGIN_NAME);
|
||||
instance.PatchAll(typeof(FontChanger));
|
||||
|
Loading…
Reference in New Issue
Block a user