-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMain.cs
59 lines (51 loc) · 1.73 KB
/
Main.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using CustomAlbums.Managers;
using CustomAlbums.Patches;
using CustomAlbums.Utilities;
using MelonLoader;
using static CustomAlbums.Patches.AnimatedCoverPatch;
namespace CustomAlbums
{
public class Main : MelonMod
{
private static readonly Logger Logger = new("CustomAlbums");
public override void OnInitializeMelon()
{
base.OnInitializeMelon();
if (!Directory.Exists(AlbumManager.SearchPath)) Directory.CreateDirectory(AlbumManager.SearchPath);
ModSettings.Register();
AssetPatch.AttachHook();
SavePatch.AttachHook();
AlbumManager.LoadAlbums();
SaveManager.LoadSaveFile();
Logger.Msg("Initialized CustomAlbums!", false);
}
public override void OnLateInitializeMelon()
{
base.OnLateInitializeMelon();
// TODO: Actually write HotReload
// HotReloadManager.OnLateInitializeMelon();
}
/// <summary>
/// This override adds support for animated covers.
/// </summary>
public override void OnUpdate()
{
base.OnUpdate();
MusicStageCellPatch.AnimateCoversUpdate();
}
/// <summary>
/// This override adds support for hot reloading.
/// </summary>
public override void OnFixedUpdate()
{
base.OnFixedUpdate();
// TODO: Actually write HotReload
// HotReloadManager.FixedUpdate();
}
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
base.OnSceneWasLoaded(buildIndex, sceneName);
MusicStageCellPatch.CurrentScene = sceneName;
}
}
}