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(); }
protected override void RunAllRules(HitObjectManagerBase hitObjectManager) { this.hitObjectManager = hitObjectManager; Difficulty = BeatmapManager.Current.Difficulty; calcSpacingFactor(); runComposeRules(); }
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)); }
protected override void RunAllRules(HitObjectManagerBase hitObjectManager) { runDesignRules(); }
/// <summary> /// Runs all rules for this ruleset and fills Reports. /// </summary> protected abstract void RunAllRules(HitObjectManagerBase hitObjectManager);
public List <AiReport> Run(HitObjectManagerBase hitObjectManager) { Reports.Clear(); RunAllRules(hitObjectManager); return(Reports); }
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); } }
protected override void RunAllRules(HitObjectManagerBase hitObjectManager) { this.hitObjectManager = hitObjectManager; runTimingRules(); }