1
0
mirror of synced 2024-11-14 10:07:34 +01:00
TaikoModStuff/Plugin.cs
2022-01-27 16:39:40 -07:00

58 lines
2.3 KiB
C#

using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
namespace TaikoModStuff
{
[BepInPlugin("TaikoModStuff", PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
{
public static ConfigEntry<bool> configForceFontChange;
public static ConfigEntry<int> configCustomWindowedWidth;
public static ConfigEntry<int> configCustomWindowedHeight;
public static ConfigEntry<int> configCustomFramerate;
public static ConfigEntry<bool> configToggleVSync;
private void Awake()
{
// Add configurations
configForceFontChange = Config.Bind("General.Toggles",
"ForceFontChange",
false,
"Force the game font to the JP font");
configCustomWindowedWidth = Config.Bind("General.Resolution",
"CustomWidth",
1920,
"Custom width to use. Set to 0 to disable setting the custom resolution");
configCustomWindowedHeight = Config.Bind("General.Resolution",
"CustomHeight",
1080,
"Custom height to use");
configCustomFramerate = Config.Bind("General.Framerate",
"CustomFramerate",
60,
"Custom framerate. Use with caution");
configToggleVSync = Config.Bind("General.Graphics",
"EnableVSync",
true,
"Enable VSync.");
var instance = new Harmony(PluginInfo.PLUGIN_NAME);
instance.PatchAll(typeof(FontChanger));
instance.PatchAll(typeof(CustomResolution));
instance.PatchAll(typeof(ForceFramerate));
// Plugin startup logic
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
}
}
}