Пример #1
0
 private static void LevelData_didFinishEvent(StandardLevelScenesTransitionSetupDataSO arg1, LevelCompletionResults arg2)
 {
     _wasDisabled   = disabled;
     _lastDisablers = ModList.ToArray();
     disabled       = false;
     ModList.Clear();
     Plugin.LevelDidFinishEvent -= LevelData_didFinishEvent;
     eventSubscribed             = false;
 }
Пример #2
0
 private static void LevelData_didFinishEvent(StandardLevelScenesTransitionSetupDataSO arg1, LevelCompletionResults arg2)
 {
     _wasDisabled   = disabled;
     _lastDisablers = ModList.ToArray();
     disabled       = false;
     ModList.Clear();
     Plugin.LevelDidFinishEvent -= LevelData_didFinishEvent;
     if (RemovedFive != null)
     {
         StandardLevelScenesTransitionSetupDataSO setupDataSO = Resources.FindObjectsOfTypeAll <StandardLevelScenesTransitionSetupDataSO>().FirstOrDefault();
         setupDataSO.didFinishEvent -= RemovedFive;
         setupDataSO.didFinishEvent += RemovedFive;
         RemovedFive = null;
     }
     eventSubscribed = false;
 }
        private static void LevelData_didFinishEvent(object sender, LevelFinishedEventArgs args)
        {
            _wasDisabled   = disabled;
            _lastDisablers = ModList.ToArray();
            disabled       = false;
            ModList.Clear();
            Plugin.LevelFinished -= LevelData_didFinishEvent;
            ScoreSaberSubmissionProperty?.SetValue(null, true);

            if (RemovedFive != null)
            {
                StandardLevelScenesTransitionSetupDataSO setupDataSO = Resources.FindObjectsOfTypeAll <StandardLevelScenesTransitionSetupDataSO>().FirstOrDefault();
                setupDataSO.didFinishEvent -= RemovedFive;
                setupDataSO.didFinishEvent += RemovedFive;
                RemovedFive = null;
            }
            eventSubscribed = false;
        }
Пример #4
0
        public static void DisableSubmission(string mod)
        {
            if (disabled == false)
            {
                Plugin.ApplyHarmonyPatches();
                disabled = true;
                ModList.Clear();
                if (!eventSubscribed)
                {
                    Plugin.LevelDidFinishEvent += LevelData_didFinishEvent;
                    eventSubscribed             = true;
                }
            }

            if (!ModList.Contains(mod))
            {
                ModList.Add(mod);
            }
        }
        private static void LevelData_didFinishEvent(StandardLevelSceneSetupDataSO arg1, LevelCompletionResults arg2)
        {
            switch (arg2.levelEndStateType)
            {
            case LevelCompletionResults.LevelEndStateType.Quit:
                disabled = false;
                ModList.Clear();
                break;

            case LevelCompletionResults.LevelEndStateType.Failed:
                disabled = false;
                ModList.Clear();
                break;

            case LevelCompletionResults.LevelEndStateType.None:
                disabled = false;
                ModList.Clear();
                break;
            }
        }
Пример #6
0
        public static void DisableSubmission(string mod)
        {
            if (disabled == false)
            {
                //Utilities.Logger.log.Warn($"First DisableSubmission by {mod}");
                Plugin.ApplyHarmonyPatches();

                disabled = true;
                ModList.Clear();

                if (!eventSubscribed)
                {
                    Plugin.LevelDidFinishEvent += LevelData_didFinishEvent;
                    eventSubscribed             = true;
                }
            }

            if (!ModList.Contains(mod))
            {
                ModList.Add(mod);
            }
        }
Пример #7
0
        private static void LevelData_didFinishEvent(StandardLevelScenesTransitionSetupDataSO arg1, LevelCompletionResults arg2)
        {
            switch (arg2.levelEndStateType)
            {
            case LevelCompletionResults.LevelEndStateType.Failed:
                disabled = false;
                ModList.Clear();
                break;

            case LevelCompletionResults.LevelEndStateType.None:
                disabled = false;
                ModList.Clear();
                break;
            }
            if (arg2.levelEndAction == LevelCompletionResults.LevelEndAction.Quit)
            {
                disabled = false;
                ModList.Clear();
            }
            Plugin.LevelDidFinishEvent -= LevelData_didFinishEvent;
            eventSubscribed             = false;
        }
        public static void DisableSubmission(string mod)
        {
            if (disabled == false)
            {
                Plugin.ApplyHarmonyPatches();
                disabled = true;
                ModList.Clear();

                if (Plugin.LevelData == null)
                {
                    Plugin.LevelData = Resources.FindObjectsOfTypeAll <StandardLevelSceneSetupDataSO>()?.FirstOrDefault();
                    if (Plugin.LevelData != null)
                    {
                        Plugin.LevelData.didFinishEvent += LevelData_didFinishEvent;
                    }
                }
            }

            if (!ModList.Contains(mod))
            {
                ModList.Add(mod);
            }
        }