-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDashCountModModule.cs
executable file
·55 lines (46 loc) · 2.14 KB
/
DashCountModModule.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
using Celeste.Mod.DashCountMod.Features;
using System;
using static Celeste.Mod.DashCountMod.DashCountModSettings;
namespace Celeste.Mod.DashCountMod {
public class DashCountModModule : EverestModule {
public static DashCountModModule Instance;
public override Type SettingsType => typeof(DashCountModSettings);
public override Type SaveDataType => typeof(DashCountModSaveData);
public override Type SessionType => typeof(DashCountModSession);
public DashCountModModule() {
Instance = this;
Logger.SetLogLevel("DashCountMod", LogLevel.Info);
}
public override void Load() {
CustomDashCounting.Load();
CustomJumpCounting.Load();
DashCountJournalPage.Load();
JumpCountJournalPage.Load();
DashCountInChapterPanel.Instance.Load();
JumpCountInChapterPanel.Instance.Load();
}
public override void Unload() {
CustomDashCounting.Unload();
CustomJumpCounting.Unload();
DashCountJournalPage.Unload();
JumpCountJournalPage.Unload();
DashCountInChapterPanel.Instance.Unload();
JumpCountInChapterPanel.Instance.Unload();
// "disable" all options in order to unhook associated stuff
CountDreamDashRedirectsAsDashes.SetEnabled(false);
DashCountInChapterPanel.Instance.SetValue(CountOptionsInChapterPanel.None);
JumpCountInChapterPanel.Instance.SetValue(CountOptionsInChapterPanel.None);
DashCountOnProgressPage.SetValue(CountOptionsInChapterPanel.None);
DisplayDashCountInLevel.SetValue(ShowCountInGameOptions.None);
DisplayJumpCountInLevel.SetValue(ShowCountInGameOptions.None);
DoNotResetDashCountOnDeath.SetEnabled(false);
}
public override void Initialize() {
base.Initialize();
CountDreamDashRedirectsAsDashes.Initialize();
DashCountOnProgressPage.Initialize();
DashCountInChapterPanel.Instance.Initialize();
JumpCountInChapterPanel.Instance.Initialize();
}
}
}