File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using MelonLoader ;
2+ using MuseDashMirror ;
23using SelectiveEffects . Managers ;
34using SelectiveEffects . Properties ;
45
56namespace SelectiveEffects ;
67
78public sealed partial class Main : MelonMod
89{
9- internal static bool IsGameMain { get ; private set ; }
1010 private static event Action ReloadEvent ;
1111
1212 public override void OnInitializeMelon ( )
@@ -16,10 +16,8 @@ public override void OnInitializeMelon()
1616
1717 public override void OnSceneWasLoaded ( int buildIndex , string sceneName )
1818 {
19- IsGameMain = string . Equals ( sceneName , "GameMain" ) ;
20-
2119 // Reload if needed outside of GameMain
22- if ( IsGameMain ) return ;
20+ if ( SceneInfo . IsGameScene ) return ;
2321 ReloadEvent ? . Invoke ( ) ;
2422 ReloadEvent = null ;
2523 }
@@ -38,7 +36,7 @@ public override void OnLateInitializeMelon()
3836
3937 internal static void QueueReload ( object sender , FileSystemEventArgs e )
4038 {
41- if ( ! IsGameMain )
39+ if ( ! SceneInfo . IsGameScene )
4240 {
4341 Reload ( ) ;
4442 return ;
Original file line number Diff line number Diff line change 11using HarmonyLib ;
22using Il2CppAssets . Scripts . PeroTools . Managers ;
3+ using MuseDashMirror ;
34using SelectiveEffects . Managers ;
45using UnityEngine ;
56
@@ -12,7 +13,7 @@ internal static class MainEffectsPatch
1213 [ HarmonyPostfix ]
1314 internal static void InitPostfix ( Effect __instance )
1415 {
15- if ( ! Main . IsGameMain ) return ;
16+ if ( ! SceneInfo . IsGameScene ) return ;
1617
1718 if ( SettingsManager . DisableAllEffects ) return ;
1819
You can’t perform that action at this time.
0 commit comments