mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 18:32:56 +08:00
Fixed NVika code quality errors
This commit is contained in:
parent
9070e973d3
commit
a6b63efe7d
@ -163,6 +163,7 @@ namespace osu.Game.Overlays.Mods
|
||||
mod.ApplyToDifficulty(originalDifficulty);
|
||||
return originalDifficulty;
|
||||
}
|
||||
|
||||
private void updateValues() => Scheduler.AddOnce(() =>
|
||||
{
|
||||
if (BeatmapInfo.Value == null)
|
||||
|
@ -42,7 +42,6 @@ namespace osu.Game.Overlays.Mods
|
||||
[Cached]
|
||||
public Bindable<IReadOnlyList<Mod>> SelectedMods { get; private set; } = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Contains a dictionary with the current <see cref="ModState"/> of all mods applicable for the current ruleset.
|
||||
/// </summary>
|
||||
@ -128,6 +127,7 @@ namespace osu.Game.Overlays.Mods
|
||||
private Container aboveColumnsContent = null!;
|
||||
protected RankingInformationDisplay? RankingInformationDisplay;
|
||||
protected BeatmapAttributesDisplay? BeatmapAttributesDisplay;
|
||||
|
||||
protected virtual BeatmapAttributesDisplay GetBeatmapAttributesDisplay => new BeatmapAttributesDisplay
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
|
@ -86,12 +86,14 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
double rate = base.GetRate();
|
||||
Ruleset ruleset = GameRuleset.Value.CreateInstance();
|
||||
if (multiplayerRoomItem != null && multiplayerRoomItem.Value != null)
|
||||
|
||||
if (multiplayerRoomItem?.Value != null)
|
||||
{
|
||||
var multiplayerRoomMods = multiplayerRoomItem.Value.RequiredMods.Select(m => m.ToMod(ruleset));
|
||||
foreach (var mod in multiplayerRoomMods.OfType<IApplicableToRate>())
|
||||
rate = mod.ApplyToRate(0, rate);
|
||||
}
|
||||
|
||||
return rate;
|
||||
}
|
||||
|
||||
@ -99,12 +101,14 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
BeatmapDifficulty originalDifficulty = base.GetDifficulty();
|
||||
Ruleset ruleset = GameRuleset.Value.CreateInstance();
|
||||
if (multiplayerRoomItem != null && multiplayerRoomItem.Value != null)
|
||||
|
||||
if (multiplayerRoomItem?.Value != null)
|
||||
{
|
||||
var multiplayerRoomMods = multiplayerRoomItem.Value.RequiredMods.Select(m => m.ToMod(ruleset));
|
||||
foreach (var mod in multiplayerRoomMods.OfType<IApplicableToDifficulty>())
|
||||
mod.ApplyToDifficulty(originalDifficulty);
|
||||
}
|
||||
|
||||
return originalDifficulty;
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
}
|
||||
};
|
||||
|
||||
LoadComponent(UserModsSelectOverlay = new MultiplayerModSelectOverlay()
|
||||
LoadComponent(UserModsSelectOverlay = new MultiplayerModSelectOverlay
|
||||
{
|
||||
SelectedMods = { BindTarget = UserMods },
|
||||
IsValidMod = _ => false
|
||||
|
Loading…
Reference in New Issue
Block a user