mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 01:53:00 +08:00
Added mania-difficulty mod support
This commit is contained in:
parent
96f416fef3
commit
e187c6453d
@ -4,6 +4,7 @@
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.Objects;
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@ -31,8 +32,11 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
private readonly List<ManiaHitObjectDifficulty> difficultyHitObjects = new List<ManiaHitObjectDifficulty>();
|
private readonly List<ManiaHitObjectDifficulty> difficultyHitObjects = new List<ManiaHitObjectDifficulty>();
|
||||||
|
|
||||||
public ManiaDifficultyCalculator(Beatmap beatmap)
|
public ManiaDifficultyCalculator(Beatmap beatmap)
|
||||||
: base(beatmap)
|
: base(beatmap) {
|
||||||
{
|
}
|
||||||
|
|
||||||
|
public ManiaDifficultyCalculator(Beatmap beatmap, Mod[] mods)
|
||||||
|
: base(beatmap, mods) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override double Calculate(Dictionary<string, double> categoryDifficulty = null)
|
public override double Calculate(Dictionary<string, double> categoryDifficulty = null)
|
||||||
@ -53,11 +57,8 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
|
|
||||||
double starRating = calculateDifficulty() * star_scaling_factor;
|
double starRating = calculateDifficulty() * star_scaling_factor;
|
||||||
|
|
||||||
if (categoryDifficulty != null)
|
categoryDifficulty?.Add("Strain", starRating);
|
||||||
{
|
|
||||||
categoryDifficulty.Add("Strain", starRating);
|
|
||||||
// categoryDifficulty.Add("Hit window 300", 35 /*HitObjectManager.HitWindow300*/ / TimeRate);
|
// categoryDifficulty.Add("Hit window 300", 35 /*HitObjectManager.HitWindow300*/ / TimeRate);
|
||||||
}
|
|
||||||
|
|
||||||
return starRating;
|
return starRating;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
|
|
||||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_mania_o };
|
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_mania_o };
|
||||||
|
|
||||||
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap, Mod[] mods = null) => new ManiaDifficultyCalculator(beatmap);
|
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap, Mod[] mods = null) => new ManiaDifficultyCalculator(beatmap, mods);
|
||||||
|
|
||||||
public override int LegacyID => 3;
|
public override int LegacyID => 3;
|
||||||
|
|
||||||
|
@ -22,13 +22,13 @@ namespace osu.Game.Rulesets.Mania.Objects
|
|||||||
private readonly int beatmapColumnCount;
|
private readonly int beatmapColumnCount;
|
||||||
|
|
||||||
|
|
||||||
private double endTime;
|
private readonly double endTime;
|
||||||
private double[] heldUntil;
|
private readonly double[] heldUntil;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Measures jacks or more generally: repeated presses of the same button
|
/// Measures jacks or more generally: repeated presses of the same button
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private double[] individualStrains;
|
private readonly double[] individualStrains;
|
||||||
|
|
||||||
internal double IndividualStrain
|
internal double IndividualStrain
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user