mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Revert "Fix bug causing the star rating to change when Random is enabled"
This reverts commit 1dfe028c02
.
This commit is contained in:
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mod that randomises the positions of the <see cref="HitObject"/>s
|
/// Mod that randomises the positions of the <see cref="HitObject"/>s
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OsuModRandom : ModRandom, IApplicableToBeatmapKeepStarRating
|
public class OsuModRandom : ModRandom, IApplicableToBeatmap
|
||||||
{
|
{
|
||||||
public override string Description => "It never gets boring!";
|
public override string Description => "It never gets boring!";
|
||||||
public override bool Ranked => false;
|
public override bool Ranked => false;
|
||||||
|
@ -32,11 +32,6 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
public readonly BeatmapMetadata Metadata;
|
public readonly BeatmapMetadata Metadata;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Only if this is set to true, changes made by mods that implement <see cref="IApplicableToBeatmapKeepStarRating"/> will be applied.
|
|
||||||
/// </summary>
|
|
||||||
public bool ApplyChangesToBeatmap;
|
|
||||||
|
|
||||||
protected AudioManager AudioManager { get; }
|
protected AudioManager AudioManager { get; }
|
||||||
|
|
||||||
protected WorkingBeatmap(BeatmapInfo beatmapInfo, AudioManager audioManager)
|
protected WorkingBeatmap(BeatmapInfo beatmapInfo, AudioManager audioManager)
|
||||||
@ -171,15 +166,10 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
foreach (var mod in mods.OfType<IApplicableToBeatmap>())
|
foreach (var mod in mods.OfType<IApplicableToBeatmap>())
|
||||||
{
|
{
|
||||||
if (mod is IApplicableToBeatmapKeepStarRating && !ApplyChangesToBeatmap)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
cancellationSource.Token.ThrowIfCancellationRequested();
|
cancellationSource.Token.ThrowIfCancellationRequested();
|
||||||
mod.ApplyToBeatmap(converted);
|
mod.ApplyToBeatmap(converted);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyChangesToBeatmap = false;
|
|
||||||
|
|
||||||
return converted;
|
return converted;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for a <see cref="Mod"/> that applies changes to a <see cref="Beatmap"/> after conversion and post-processing has completed without changing its difficulty
|
|
||||||
/// </summary>
|
|
||||||
public interface IApplicableToBeatmapKeepStarRating : IApplicableToBeatmap
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
@ -455,8 +455,6 @@ namespace osu.Game.Screens.Play
|
|||||||
rulesetInfo = Ruleset.Value ?? Beatmap.Value.BeatmapInfo.Ruleset;
|
rulesetInfo = Ruleset.Value ?? Beatmap.Value.BeatmapInfo.Ruleset;
|
||||||
ruleset = rulesetInfo.CreateInstance();
|
ruleset = rulesetInfo.CreateInstance();
|
||||||
|
|
||||||
Beatmap.Value.ApplyChangesToBeatmap = true;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
playable = Beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo, Mods.Value);
|
playable = Beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo, Mods.Value);
|
||||||
|
Reference in New Issue
Block a user