30 lines
939 B
C#

using UnityEngine;
using BepInEx;
using BepInEx.Configuration;
namespace SamSWAT.TimeWeatherChanger
{
[BepInPlugin("com.samswat.timeweatherchanger", "SamSWAT.TimeWeatherChanger", "2.2.0")]
public class TimeWeatherPlugin : BaseUnityPlugin
{
public static GameObject Hook;
private const string SectionName = "Main";
internal static ConfigEntry<KeyboardShortcut> TogglePanel;
private void Awake()
{
Logger.LogInfo("Loading: SamSWAT-TimeWeatherChanger 2.2.0");
Hook = new GameObject("Time Weather Controller");
Hook.AddComponent<TimeWeatherController>();
DontDestroyOnLoad(Hook);
TogglePanel = Config.Bind(
SectionName,
"Time Weather Panel Toggle Key",
new KeyboardShortcut(KeyCode.Home),
"The keyboard shortcut that toggles control panel");
}
}
}