Beispiel #1
0
        /// <summary>
        /// Runs all current rulesets and stores them in AiReports.
        /// </summary>
        internal void RunAllRules(HitObjectManager hitObjectManager)
        {
            if (Rulesets.Count == 0)
            {
                initializeRulesets();
            }
            Reports.Clear();

            //hitobjects could have stacking effects that might change their position
            hitObjectManager.ClearPositionOffsets();

            List <AiReport> reportsAll = Reports[AiModType.All] = new List <AiReport>();

            foreach (AiModRuleset r in Rulesets)
            {
                List <AiReport> reports = r.Run(hitObjectManager);

                Report(r.Type, reports);
            }

            if (reportsAll.Count == 0)
            {
                reportsAll.Add(new AiReport(-1, Severity.Info, LocalisationManager.GetString(OsuString.AIModWindow_NoProblemsFound), 0, null));
            }
        }
        /// <summary>
        /// Loads objects from a given hitobjectmanager.
        /// </summary>
        private void loadHitObjects(HitObjectManager hitObjectManager)
        {
            this.Beatmap = hitObjectManager.Beatmap;

            if (HitObjectManager != null && HitObjectManager != hitObjectManager)
            {
                HitObjectManager.Dispose();
            }

            hitObjectManager.ClearPositionOffsets();

            HitObjectManager = NewHitObjectManager();
            HitObjectManager.SetBeatmap(Beatmap, hitObjectManager.ActiveMods);
            loadTiming();
            HitObjectManager.UpdateVariables(false, false);
            HitObjectManager.AddHitObjectsConverted(hitObjectManager.hitObjects);

            HitObjects = HitObjectManager.hitObjects;

            PreprocessHitObjects();
        }