-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathPlugin.cs
35 lines (32 loc) · 1.07 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
using IPA;
using IPA.Config;
using IPA.Config.Stores;
using IPA.Logging;
using SiraUtil.Zenject;
using SliceVisualizer.Configuration;
using SliceVisualizer.Installers;
namespace SliceVisualizer
{
[Plugin(RuntimeOptions.DynamicInit)]
public class Plugin
{
internal static Logger Log = null!;
/// <summary>
/// Called when the plugin is first loaded by IPA (either when the game starts or when the plugin is enabled if it starts disabled).
/// [Init] methods that use a Constructor or called before regular methods like InitWithConfig.
/// Only use [Init] with one Constructor.
/// </summary>
[Init]
public void Init(Logger logger, Config conf, Zenjector zenject)
{
Log = logger;
zenject.OnApp<NsvAppInstaller>().WithParameters(logger, conf.Generated<PluginConfig>());
zenject.OnGame<NsvGameInstaller>(false).ShortCircuitForTutorial();
}
[OnEnable, OnDisable]
public void OnStateChanged()
{
// Zenject is poggers
}
}
}