示例#1
0
        public void Initialize()
        {
            HashDifMode levelInfo = Utilities.DifficultyBeatmapToHashDifMode(difficultyBeatmap);

            foreach (var pauseData in PluginConfig.Instance.PauseDataList)
            {
                if (pauseData.LevelInfo.Equals(levelInfo))
                {
                    currentPauseData = pauseData;
                    currentPauseData.PausePoints.Sort();
                    PausePoints = new List <float>(pauseData.PausePoints);
                    break;
                }
            }

            // If we are in practice or if there is no pausedata
            if ((gameplayCoreSceneSetupData != null && gameplayCoreSceneSetupData.practiceSettings != null) || currentPauseData == null)
            {
                GameObject.Destroy(this);
                return;
            }

            //if (PausePoints.Count > Utilities.GetMaxPausePoints(difficultyBeatmap.level.songDuration) || Utilities.FindInvalidConsecutivePoints(PausePoints).Count != 0)
            //{
            submission?.DisableScoreSubmission(Assembly.GetExecutingAssembly().GetName().Name, "Beta moment"); // #Cancel moment
            //}
        }
示例#2
0
        public static HashDifMode DifficultyBeatmapToHashDifMode(IDifficultyBeatmap difficultyBeatmap)
        {
            HashDifMode levelInfo = new HashDifMode();

            levelInfo.Difficulty = difficultyBeatmap.difficulty.ToString();
            levelInfo.Hash       = difficultyBeatmap.level.levelID;
            levelInfo.Mode       = difficultyBeatmap.parentDifficultyBeatmapSet.beatmapCharacteristic.serializedName;
            return(levelInfo);
        }
示例#3
0
 public bool Equals(HashDifMode hdm) => hdm.Hash == Hash && hdm.Difficulty == Difficulty && hdm.Mode == Mode;