mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Merge remote-tracking branch 'origin/master' into fix-checkbox-overlap
This commit is contained in:
commit
a9758ba813
@ -379,8 +379,8 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
X = (float)MathHelper.Clamp(X + direction * Clock.ElapsedFrameTime * speed, 0, 1);
|
||||
|
||||
// Correct overshooting.
|
||||
if (hyperDashDirection > 0 && hyperDashTargetPosition < X ||
|
||||
hyperDashDirection < 0 && hyperDashTargetPosition > X)
|
||||
if ((hyperDashDirection > 0 && hyperDashTargetPosition < X) ||
|
||||
(hyperDashDirection < 0 && hyperDashTargetPosition > X))
|
||||
{
|
||||
X = hyperDashTargetPosition;
|
||||
SetHyperDashState();
|
||||
|
@ -69,7 +69,7 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
||||
break;
|
||||
|
||||
if (Vector2Extensions.Distance(stackBaseObject.Position, objectN.Position) < stack_distance
|
||||
|| stackBaseObject is Slider && Vector2Extensions.Distance(stackBaseObject.EndPosition, objectN.Position) < stack_distance)
|
||||
|| (stackBaseObject is Slider && Vector2Extensions.Distance(stackBaseObject.EndPosition, objectN.Position) < stack_distance))
|
||||
{
|
||||
stackBaseIndex = n;
|
||||
|
||||
|
@ -37,11 +37,11 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
if (time < osuHit.HitObject.StartTime - relax_leniency) continue;
|
||||
|
||||
if (osuHit.HitObject is IHasEndTime hasEnd && time > hasEnd.EndTime || osuHit.IsHit)
|
||||
if ((osuHit.HitObject is IHasEndTime hasEnd && time > hasEnd.EndTime) || osuHit.IsHit)
|
||||
continue;
|
||||
|
||||
requiresHit |= osuHit is DrawableHitCircle && osuHit.IsHovered && osuHit.HitObject.HitWindows.CanBeHit(relativetime);
|
||||
requiresHold |= osuHit is DrawableSlider slider && (slider.Ball.IsHovered || osuHit.IsHovered) || osuHit is DrawableSpinner;
|
||||
requiresHold |= (osuHit is DrawableSlider slider && (slider.Ball.IsHovered || osuHit.IsHovered)) || osuHit is DrawableSpinner;
|
||||
}
|
||||
|
||||
if (requiresHit)
|
||||
|
@ -157,7 +157,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
FlagName = @"TH",
|
||||
},
|
||||
},
|
||||
Rank = ScoreRank.F,
|
||||
Rank = ScoreRank.D,
|
||||
PP = 160,
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 123456,
|
||||
|
@ -188,7 +188,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
},
|
||||
new ScoreInfo
|
||||
{
|
||||
Rank = ScoreRank.F,
|
||||
Rank = ScoreRank.D,
|
||||
Accuracy = 0.6025,
|
||||
MaxCombo = 244,
|
||||
TotalScore = 1707827,
|
||||
@ -206,7 +206,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
},
|
||||
new ScoreInfo
|
||||
{
|
||||
Rank = ScoreRank.F,
|
||||
Rank = ScoreRank.D,
|
||||
Accuracy = 0.5140,
|
||||
MaxCombo = 244,
|
||||
TotalScore = 1707827,
|
||||
@ -224,7 +224,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
},
|
||||
new ScoreInfo
|
||||
{
|
||||
Rank = ScoreRank.F,
|
||||
Rank = ScoreRank.D,
|
||||
Accuracy = 0.4222,
|
||||
MaxCombo = 244,
|
||||
TotalScore = 1707827,
|
||||
|
@ -192,7 +192,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
public CursorContainer Cursor { get; }
|
||||
public bool ProvidingUserCursor { get; }
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => base.ReceivePositionalInputAt(screenSpacePos) || SmoothTransition && !ProvidingUserCursor;
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => base.ReceivePositionalInputAt(screenSpacePos) || (SmoothTransition && !ProvidingUserCursor);
|
||||
|
||||
private readonly Box background;
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected void BeginConfirm()
|
||||
{
|
||||
if (confirming || !AllowMultipleFires && fired) return;
|
||||
if (confirming || (!AllowMultipleFires && fired)) return;
|
||||
|
||||
confirming = true;
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Online.API
|
||||
|
||||
public Bindable<User> LocalUser { get; } = new Bindable<User>(createGuestUser());
|
||||
|
||||
protected bool HasLogin => authentication.Token.Value != null || !string.IsNullOrEmpty(ProvidedUsername) && !string.IsNullOrEmpty(password);
|
||||
protected bool HasLogin => authentication.Token.Value != null || (!string.IsNullOrEmpty(ProvidedUsername) && !string.IsNullOrEmpty(password));
|
||||
|
||||
private readonly CancellationTokenSource cancellationToken = new CancellationTokenSource();
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace osu.Game.Online.Chat
|
||||
if (displayText.Length == 0 || linkText.Length == 0) continue;
|
||||
|
||||
// Check for encapsulated links
|
||||
if (result.Links.Find(l => l.Index <= index && l.Index + l.Length >= index + m.Length || index <= l.Index && index + m.Length >= l.Index + l.Length) == null)
|
||||
if (result.Links.Find(l => (l.Index <= index && l.Index + l.Length >= index + m.Length) || (index <= l.Index && index + m.Length >= l.Index + l.Length)) == null)
|
||||
{
|
||||
result.Text = result.Text.Remove(index, m.Length).Insert(index, displayText);
|
||||
|
||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
Text = "#1",
|
||||
Font = OsuFont.GetFont(size: 30, weight: FontWeight.Bold, italics: true)
|
||||
},
|
||||
rank = new DrawableRank(ScoreRank.F)
|
||||
rank = new DrawableRank(ScoreRank.D)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Overlays
|
||||
private readonly Container channelSelectionContainer;
|
||||
private readonly ChannelSelectionOverlay channelSelectionOverlay;
|
||||
|
||||
public override bool Contains(Vector2 screenSpacePos) => chatContainer.ReceivePositionalInputAt(screenSpacePos) || channelSelectionOverlay.State == Visibility.Visible && channelSelectionOverlay.ReceivePositionalInputAt(screenSpacePos);
|
||||
public override bool Contains(Vector2 screenSpacePos) => chatContainer.ReceivePositionalInputAt(screenSpacePos) || (channelSelectionOverlay.State == Visibility.Visible && channelSelectionOverlay.ReceivePositionalInputAt(screenSpacePos));
|
||||
|
||||
public ChatOverlay()
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
|
||||
private Bindable<ScalingMode> scalingMode;
|
||||
private Bindable<Size> sizeFullscreen;
|
||||
private readonly BindableList<WindowMode> windowModes = new BindableList<WindowMode>();
|
||||
private readonly IBindableList<WindowMode> windowModes = new BindableList<WindowMode>();
|
||||
|
||||
private OsuGameBase game;
|
||||
private SettingsDropdown<Size> resolutionDropdown;
|
||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// </summary>
|
||||
public readonly DrawableHitObject HitObject;
|
||||
|
||||
protected override bool ShouldBeAlive => HitObject.IsAlive && HitObject.IsPresent || State == SelectionState.Selected;
|
||||
protected override bool ShouldBeAlive => (HitObject.IsAlive && HitObject.IsPresent) || State == SelectionState.Selected;
|
||||
public override bool HandlePositionalInput => ShouldBeAlive;
|
||||
public override bool RemoveWhenNotAlive => false;
|
||||
|
||||
|
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
public override bool RemoveCompletedTransforms => false;
|
||||
protected override bool RequiresChildrenUpdate => true;
|
||||
|
||||
public override bool IsPresent => base.IsPresent || State.Value == ArmedState.Idle && Clock?.CurrentTime >= LifetimeStart;
|
||||
public override bool IsPresent => base.IsPresent || (State.Value == ArmedState.Idle && Clock?.CurrentTime >= LifetimeStart);
|
||||
|
||||
public readonly Bindable<ArmedState> State = new Bindable<ArmedState>();
|
||||
|
||||
|
@ -136,9 +136,9 @@ namespace osu.Game.Scoring.Legacy
|
||||
score.Rank = score.Mods.Any(m => m is ModHidden || m is ModFlashlight) ? ScoreRank.XH : ScoreRank.X;
|
||||
else if (ratio300 > 0.9 && ratio50 <= 0.01 && countMiss == 0)
|
||||
score.Rank = score.Mods.Any(m => m is ModHidden || m is ModFlashlight) ? ScoreRank.SH : ScoreRank.S;
|
||||
else if (ratio300 > 0.8 && countMiss == 0 || ratio300 > 0.9)
|
||||
else if ((ratio300 > 0.8 && countMiss == 0) || ratio300 > 0.9)
|
||||
score.Rank = ScoreRank.A;
|
||||
else if (ratio300 > 0.7 && countMiss == 0 || ratio300 > 0.8)
|
||||
else if ((ratio300 > 0.7 && countMiss == 0) || ratio300 > 0.8)
|
||||
score.Rank = ScoreRank.B;
|
||||
else if (ratio300 > 0.6)
|
||||
score.Rank = ScoreRank.C;
|
||||
@ -159,9 +159,9 @@ namespace osu.Game.Scoring.Legacy
|
||||
score.Rank = score.Mods.Any(m => m is ModHidden || m is ModFlashlight) ? ScoreRank.XH : ScoreRank.X;
|
||||
else if (ratio300 > 0.9 && ratio50 <= 0.01 && countMiss == 0)
|
||||
score.Rank = score.Mods.Any(m => m is ModHidden || m is ModFlashlight) ? ScoreRank.SH : ScoreRank.S;
|
||||
else if (ratio300 > 0.8 && countMiss == 0 || ratio300 > 0.9)
|
||||
else if ((ratio300 > 0.8 && countMiss == 0) || ratio300 > 0.9)
|
||||
score.Rank = ScoreRank.A;
|
||||
else if (ratio300 > 0.7 && countMiss == 0 || ratio300 > 0.8)
|
||||
else if ((ratio300 > 0.7 && countMiss == 0) || ratio300 > 0.8)
|
||||
score.Rank = ScoreRank.B;
|
||||
else if (ratio300 > 0.6)
|
||||
score.Rank = ScoreRank.C;
|
||||
|
@ -7,10 +7,7 @@ namespace osu.Game.Scoring
|
||||
{
|
||||
public enum ScoreRank
|
||||
{
|
||||
[Description(@"F")]
|
||||
F,
|
||||
|
||||
[Description(@"F")]
|
||||
[Description(@"D")]
|
||||
D,
|
||||
|
||||
[Description(@"C")]
|
||||
|
@ -14,7 +14,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.518.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.609.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.607.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.23.0" />
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user