File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- using StricterJudge . Properties ;
1
+ using MuseDashMirror ;
2
+ using StricterJudge . Properties ;
2
3
3
4
namespace StricterJudge ;
4
5
5
6
public sealed partial class Main : MelonMod
6
7
{
7
- private static bool IsGameMain { get ; set ; }
8
-
9
8
private static event Action ReloadEvent ;
10
9
11
10
public override void OnInitializeMelon ( )
@@ -16,10 +15,8 @@ public override void OnInitializeMelon()
16
15
17
16
public override void OnSceneWasLoaded ( int buildIndex , string sceneName )
18
17
{
19
- IsGameMain = string . Equals ( sceneName , "GameMain" ) ;
20
-
21
18
// Reload if needed outside of GameMain
22
- if ( IsGameMain ) return ;
19
+ if ( SceneInfo . IsGameScene ) return ;
23
20
ReloadEvent ? . Invoke ( ) ;
24
21
ReloadEvent = null ;
25
22
}
@@ -31,7 +28,7 @@ public override void OnLateInitializeMelon()
31
28
32
29
internal static void QueueReload ( object sender , FileSystemEventArgs e )
33
30
{
34
- if ( ! IsGameMain )
31
+ if ( ! SceneInfo . IsGameScene )
35
32
{
36
33
Reload ( ) ;
37
34
return ;
You can’t perform that action at this time.
0 commit comments