示例#1
0
        protected override void RunAllRules(HitObjectManagerBase hitObjectManager)
        {
            Beatmap map = BeatmapManager.Current;

            //Notice: Don't use group title, it fails to get right mapset in some rare cases.
            maps = BeatmapManager.Beatmaps.FindAll(m => m.ContainingFolder == map.ContainingFolder);

            resetDataCounts();

            for (int i = 0; i < maps.Count; i++)
            {
                Beatmap diff = maps[i];

                updateDataCounts(diff);

                if (diff.BeatmapChecksum == map.BeatmapChecksum)
                {
                    continue;
                }

                diff.ProcessHeaders();

                runMetaRules(map, diff);

                checkTimingPoints(map, diff);
            }

            runDifficultyRules();
            checkFiles();
        }
示例#2
0
        protected override void RunAllRules(HitObjectManagerBase hitObjectManager)
        {
            this.hitObjectManager = hitObjectManager;

            Difficulty = BeatmapManager.Current.Difficulty;

            calcSpacingFactor();
            runComposeRules();
        }
示例#3
0
        private static float getSpacingFactor(HitObjectBase h1, HitObjectBase h2, HitObjectManagerBase hitObjectManager)
        {
            int   lastSelectedTime = h1.EndTime;
            int   nextSelectedTime = h2.StartTime;
            int   time             = nextSelectedTime - lastSelectedTime;
            float mul = (float)hitObjectManager.SliderVelocityAt(nextSelectedTime);

            return(1000.0f * (h2.Position - h1.EndPosition).Length() / (mul * time));
        }
示例#4
0
 protected override void RunAllRules(HitObjectManagerBase hitObjectManager)
 {
     runDesignRules();
 }
示例#5
0
 /// <summary>
 /// Runs all rules for this ruleset and fills Reports.
 /// </summary>
 protected abstract void RunAllRules(HitObjectManagerBase hitObjectManager);
示例#6
0
 public List <AiReport> Run(HitObjectManagerBase hitObjectManager)
 {
     Reports.Clear();
     RunAllRules(hitObjectManager);
     return(Reports);
 }
示例#7
0
        protected virtual void checkDistanceSpacing(HitObjectBase h, HitObjectBase h2, HitObjectManagerBase hitObjectManager)
        {
            //check combo distance
            if (!CheckDistanceSnap)
            {
                return;
            }

            if (h2 == null || h2.NewCombo || h2 is Spinner)
            {
                return;
            }

            float thisSpacingFactor = getSpacingFactor(h, h2, hitObjectManager);

            //If the current hitobject is a new combo, get a new distance factor from the current and next object.
            if (h.NewCombo || comboSpacingFactor < MIN_SPACING_FACTOR)
            {
                comboSpacingFactor  = thisSpacingFactor;
                comboSpacingObject1 = h;
                comboSpacingObject2 = h2;

                return;
            }

            if (comboSpacingFactor > MIN_SPACING_FACTOR &&
                thisSpacingFactor > MIN_SPACING_FACTOR &&
                (thisSpacingFactor - comboSpacingFactor > comboSpacingFactor * 0.1 * spacingFactor ||
                 comboSpacingFactor - thisSpacingFactor > comboSpacingFactor * 0.2 * spacingFactor))
            {
                HitObjectBase object1 = comboSpacingObject1;
                HitObjectBase object2 = comboSpacingObject2;

                AiReportTwoObjects report = new AiReportTwoObjects(
                    h,
                    h2,
                    delegate { return(Math.Abs(getSpacingFactor(h, h2, hitObjectManager) - getSpacingFactor(object1, object2, hitObjectManager)) < ERROR_FACTOR); },
                    Severity.Warning,
                    thisSpacingFactor < comboSpacingFactor ? LocalisationManager.GetString(OsuString.AICompose_ObjectTooClose) : LocalisationManager.GetString(OsuString.AICompose_ObjectTooFar), 82809);
                Reports.Add(report);
            }
        }
示例#8
0
 protected override void RunAllRules(HitObjectManagerBase hitObjectManager)
 {
     this.hitObjectManager = hitObjectManager;
     runTimingRules();
 }