-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPlugin.cs
44 lines (38 loc) · 1.29 KB
/
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
41
42
43
44
using IPA;
using IPA.Config.Stores;
using MultiplayerChat.Assets;
using MultiplayerChat.Config;
using MultiplayerChat.Installers;
using SiraUtil.Web.SiraSync;
using SiraUtil.Zenject;
using IPALogger = IPA.Logging.Logger;
namespace MultiplayerChat
{
[Plugin(RuntimeOptions.DynamicInit)]
// ReSharper disable once ClassNeverInstantiated.Global
public class Plugin
{
internal static PluginConfig Config { get; private set; } = null!;
[Init]
public void Init(IPALogger logger, Zenjector zenjector, IPA.Config.Config config)
{
Config = config.Generated<PluginConfig>();
zenjector.UseMetadataBinder<Plugin>();
zenjector.UseLogger(logger);
zenjector.UseSiraSync(SiraSyncServiceType.GitHub, "roydejong", "BeatSaberMultiplayerChat");
zenjector.Install<MpcAppInstaller>(Location.App);
zenjector.Install<MpcMenuInstaller>(Location.Menu);
zenjector.Install<MpcMultiplayerInstaller>(Location.AlwaysMultiPlayer);
}
[OnEnable]
public void OnEnable()
{
if (!Sprites.IsInitialized)
Sprites.Initialize();
}
[OnDisable]
public void OnDisable()
{
}
}
}