mirror of
https://github.com/ppy/osu-tools.git
synced 2025-06-09 09:35:15 +09:00
Merge pull request #225 from minisbett/large-tick-misses-parameter
Add `--large-tick-misses` and `--slider-tail-misses` parameters to simulate command
This commit is contained in:
commit
73ea94ea56
1 changed files with 12 additions and 0 deletions
|
@ -3,11 +3,13 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using McMaster.Extensions.CommandLineUtils;
|
using McMaster.Extensions.CommandLineUtils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
|
||||||
namespace PerformanceCalculator.Simulate
|
namespace PerformanceCalculator.Simulate
|
||||||
|
@ -31,6 +33,14 @@ namespace PerformanceCalculator.Simulate
|
||||||
[Option(Template = "-C|--percent-combo <combo>", Description = "Percentage of beatmap maximum combo achieved. Alternative to combo option. Enter as decimal 0-100.")]
|
[Option(Template = "-C|--percent-combo <combo>", Description = "Percentage of beatmap maximum combo achieved. Alternative to combo option. Enter as decimal 0-100.")]
|
||||||
public override double PercentCombo { get; } = 100;
|
public override double PercentCombo { get; } = 100;
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
|
[Option(Template = "-L|--large-tick-misses <misses>", Description = "Number of large tick misses. Defaults to 0.")]
|
||||||
|
private int largeTickMisses { get; }
|
||||||
|
|
||||||
|
[UsedImplicitly]
|
||||||
|
[Option(Template = "-S|--slider-tail-misses <misses>", Description = "Number of slider tail misses. Defaults to 0.")]
|
||||||
|
private int sliderTailMisses { get; }
|
||||||
|
|
||||||
public override Ruleset Ruleset => new OsuRuleset();
|
public override Ruleset Ruleset => new OsuRuleset();
|
||||||
|
|
||||||
protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.GetMaxCombo();
|
protected override int GetMaxCombo(IBeatmap beatmap) => beatmap.GetMaxCombo();
|
||||||
|
@ -116,6 +126,8 @@ namespace PerformanceCalculator.Simulate
|
||||||
{ HitResult.Great, countGreat },
|
{ HitResult.Great, countGreat },
|
||||||
{ HitResult.Ok, countGood ?? 0 },
|
{ HitResult.Ok, countGood ?? 0 },
|
||||||
{ HitResult.Meh, countMeh ?? 0 },
|
{ HitResult.Meh, countMeh ?? 0 },
|
||||||
|
{ HitResult.LargeTickMiss, largeTickMisses },
|
||||||
|
{ HitResult.SliderTailHit, beatmap.HitObjects.Count(x => x is Slider) - sliderTailMisses },
|
||||||
{ HitResult.Miss, countMiss }
|
{ HitResult.Miss, countMiss }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue