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