forked from kinsi55/BeatSaber_BetterSongList
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
40 lines (33 loc) · 911 Bytes
/
Plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using BetterSongList.UI;
using BetterSongList.Util;
using HarmonyLib;
using IPA;
using IPA.Config.Stores;
using System.Reflection;
using IPALogger = IPA.Logging.Logger;
namespace BetterSongList {
[Plugin(RuntimeOptions.SingleStartInit)]
public class Plugin {
internal static Plugin Instance { get; private set; }
internal static IPALogger Log { get; private set; }
internal static Harmony harmony { get; private set; }
[Init]
public void Init(IPALogger logger, IPA.Config.Config conf) {
Instance = this;
Log = logger;
Config.Instance = conf.Generated<Config>();
}
[OnStart]
public void OnApplicationStart() {
harmony = new Harmony("Kinsi55.BeatSaber.BetterSongList");
harmony.PatchAll(Assembly.GetExecutingAssembly());
FilterUI.Init();
PlaylistsUtil.Init();
PPUtil.Init();
}
[OnExit]
public void OnApplicationQuit() {
harmony.UnpatchSelf();
}
}
}