mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge branch 'master' into comment-deletion
This commit is contained in:
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Rulesets.Catch.Objects;
|
using osu.Game.Rulesets.Catch.Objects;
|
||||||
using osu.Game.Rulesets.Catch.UI;
|
using osu.Game.Rulesets.Catch.UI;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
@ -16,7 +15,6 @@ namespace osu.Game.Rulesets.Catch.Mods
|
|||||||
{
|
{
|
||||||
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
||||||
|
|
||||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
|
||||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||||
{
|
{
|
||||||
MinValue = 0.5f,
|
MinValue = 0.5f,
|
||||||
@ -24,7 +22,6 @@ namespace osu.Game.Rulesets.Catch.Mods
|
|||||||
Precision = 0.1f
|
Precision = 0.1f
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
|
||||||
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
||||||
|
|
||||||
public override float DefaultFlashlightSize => 350;
|
public override float DefaultFlashlightSize => 350;
|
||||||
|
@ -6,8 +6,6 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Overlays.Settings;
|
|
||||||
using osu.Game.Rulesets.Catch.UI;
|
using osu.Game.Rulesets.Catch.UI;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
@ -17,11 +15,6 @@ namespace osu.Game.Rulesets.Catch.Mods
|
|||||||
{
|
{
|
||||||
public override LocalisableString Description => "Where's the catcher?";
|
public override LocalisableString Description => "Where's the catcher?";
|
||||||
|
|
||||||
[SettingSource(
|
|
||||||
"Hidden at combo",
|
|
||||||
"The combo count at which the catcher becomes completely hidden",
|
|
||||||
SettingControlType = typeof(SettingsSlider<int, HiddenComboSlider>)
|
|
||||||
)]
|
|
||||||
public override BindableInt HiddenComboCount { get; } = new BindableInt(10)
|
public override BindableInt HiddenComboCount { get; } = new BindableInt(10)
|
||||||
{
|
{
|
||||||
MinValue = 0,
|
MinValue = 0,
|
||||||
|
@ -5,7 +5,6 @@ using System;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Layout;
|
using osu.Framework.Layout;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Rulesets.Mania.Objects;
|
using osu.Game.Rulesets.Mania.Objects;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -17,7 +16,6 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModHidden) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModHidden) };
|
||||||
|
|
||||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
|
||||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||||
{
|
{
|
||||||
MinValue = 0.5f,
|
MinValue = 0.5f,
|
||||||
@ -25,7 +23,6 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
Precision = 0.1f
|
Precision = 0.1f
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
|
||||||
public override BindableBool ComboBasedSize { get; } = new BindableBool();
|
public override BindableBool ComboBasedSize { get; } = new BindableBool();
|
||||||
|
|
||||||
public override float DefaultFlashlightSize => 50;
|
public override float DefaultFlashlightSize => 50;
|
||||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
|
|
||||||
public void UpdateResult() => base.UpdateResult(true);
|
public void UpdateResult() => base.UpdateResult(true);
|
||||||
|
|
||||||
protected override double MaximumJudgementOffset => base.MaximumJudgementOffset * release_window_lenience;
|
public override double MaximumJudgementOffset => base.MaximumJudgementOffset * release_window_lenience;
|
||||||
|
|
||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
|
|||||||
|
|
||||||
if (!(currentObj.BaseObject is Spinner))
|
if (!(currentObj.BaseObject is Spinner))
|
||||||
{
|
{
|
||||||
double jumpDistance = (osuHitObject.StackedPosition - currentHitObject.EndPosition).Length;
|
double jumpDistance = (osuHitObject.StackedPosition - currentHitObject.StackedEndPosition).Length;
|
||||||
|
|
||||||
cumulativeStrainTime += lastObj.StrainTime;
|
cumulativeStrainTime += lastObj.StrainTime;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
{
|
{
|
||||||
@ -18,7 +17,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public override LocalisableString Description => "Hit them at the right size!";
|
public override LocalisableString Description => "Hit them at the right size!";
|
||||||
|
|
||||||
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
|
||||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat(2)
|
public override BindableNumber<float> StartScale { get; } = new BindableFloat(2)
|
||||||
{
|
{
|
||||||
MinValue = 1f,
|
MinValue = 1f,
|
||||||
|
@ -32,7 +32,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
Precision = default_follow_delay,
|
Precision = default_follow_delay,
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
|
||||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||||
{
|
{
|
||||||
MinValue = 0.5f,
|
MinValue = 0.5f,
|
||||||
@ -40,7 +39,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
Precision = 0.1f
|
Precision = 0.1f
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
|
||||||
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
||||||
|
|
||||||
public override float DefaultFlashlightSize => 180;
|
public override float DefaultFlashlightSize => 180;
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
{
|
{
|
||||||
@ -18,7 +17,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public override LocalisableString Description => "Hit them at the right size!";
|
public override LocalisableString Description => "Hit them at the right size!";
|
||||||
|
|
||||||
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
|
||||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat(0.5f)
|
public override BindableNumber<float> StartScale { get; } = new BindableFloat(0.5f)
|
||||||
{
|
{
|
||||||
MinValue = 0f,
|
MinValue = 0f,
|
||||||
|
@ -7,8 +7,6 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Overlays.Settings;
|
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
@ -22,11 +20,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
private PeriodTracker spinnerPeriods = null!;
|
private PeriodTracker spinnerPeriods = null!;
|
||||||
|
|
||||||
[SettingSource(
|
|
||||||
"Hidden at combo",
|
|
||||||
"The combo count at which the cursor becomes completely hidden",
|
|
||||||
SettingControlType = typeof(SettingsSlider<int, HiddenComboSlider>)
|
|
||||||
)]
|
|
||||||
public override BindableInt HiddenComboCount { get; } = new BindableInt(10)
|
public override BindableInt HiddenComboCount { get; } = new BindableInt(10)
|
||||||
{
|
{
|
||||||
MinValue = 0,
|
MinValue = 0,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
@ -20,6 +21,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
|
|
||||||
|
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
||||||
public abstract BindableNumber<float> StartScale { get; }
|
public abstract BindableNumber<float> StartScale { get; }
|
||||||
|
|
||||||
protected virtual float EndScale => 1;
|
protected virtual float EndScale => 1;
|
||||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double MaximumJudgementOffset => DrawableSpinner.HitObject.Duration;
|
public override double MaximumJudgementOffset => DrawableSpinner.HitObject.Duration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Apply a judgement result.
|
/// Apply a judgement result.
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Rulesets.Replays;
|
using osu.Game.Rulesets.Replays;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.Taiko.Objects;
|
using osu.Game.Rulesets.Taiko.Objects;
|
||||||
@ -129,5 +130,32 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
|
|||||||
AssertResult<Hit>(0, HitResult.Miss);
|
AssertResult<Hit>(0, HitResult.Miss);
|
||||||
AssertResult<StrongNestedHitObject>(0, HitResult.IgnoreMiss);
|
AssertResult<StrongNestedHitObject>(0, HitResult.IgnoreMiss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestHighVelocityHit()
|
||||||
|
{
|
||||||
|
const double hit_time = 1000;
|
||||||
|
|
||||||
|
var beatmap = CreateBeatmap(new Hit
|
||||||
|
{
|
||||||
|
Type = HitType.Centre,
|
||||||
|
StartTime = hit_time,
|
||||||
|
});
|
||||||
|
|
||||||
|
beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = 6 });
|
||||||
|
beatmap.ControlPointInfo.Add(0, new EffectControlPoint { ScrollSpeed = 10 });
|
||||||
|
|
||||||
|
var hitWindows = new HitWindows();
|
||||||
|
hitWindows.SetDifficulty(beatmap.Difficulty.OverallDifficulty);
|
||||||
|
|
||||||
|
PerformTest(new List<ReplayFrame>
|
||||||
|
{
|
||||||
|
new TaikoReplayFrame(0),
|
||||||
|
new TaikoReplayFrame(hit_time - hitWindows.WindowFor(HitResult.Great), TaikoAction.LeftCentre),
|
||||||
|
}, beatmap);
|
||||||
|
|
||||||
|
AssertJudgementCount(1);
|
||||||
|
AssertResult<Hit>(0, HitResult.Ok);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Layout;
|
using osu.Framework.Layout;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Taiko.Objects;
|
using osu.Game.Rulesets.Taiko.Objects;
|
||||||
using osu.Game.Rulesets.Taiko.UI;
|
using osu.Game.Rulesets.Taiko.UI;
|
||||||
@ -17,7 +16,6 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
{
|
{
|
||||||
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
||||||
|
|
||||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
|
||||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||||
{
|
{
|
||||||
MinValue = 0.5f,
|
MinValue = 0.5f,
|
||||||
@ -25,7 +23,6 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
Precision = 0.1f
|
Precision = 0.1f
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
|
||||||
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
||||||
|
|
||||||
public override float DefaultFlashlightSize => 250;
|
public override float DefaultFlashlightSize => 250;
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
Filled = HitObject.FirstTick
|
Filled = HitObject.FirstTick
|
||||||
});
|
});
|
||||||
|
|
||||||
protected override double MaximumJudgementOffset => HitObject.HitWindow;
|
public override double MaximumJudgementOffset => HitObject.HitWindow;
|
||||||
|
|
||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
|
@ -58,6 +58,16 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
AddUntilStep("wait for some scores not masked away",
|
AddUntilStep("wait for some scores not masked away",
|
||||||
() => leaderboard.ChildrenOfType<GameplayLeaderboardScore>().Any(s => leaderboard.ScreenSpaceDrawQuad.Contains(s.ScreenSpaceDrawQuad.Centre)));
|
() => leaderboard.ChildrenOfType<GameplayLeaderboardScore>().Any(s => leaderboard.ScreenSpaceDrawQuad.Contains(s.ScreenSpaceDrawQuad.Centre)));
|
||||||
|
|
||||||
|
AddUntilStep("wait for tracked score fully visible", () => leaderboard.ScreenSpaceDrawQuad.Intersects(leaderboard.TrackedScore!.ScreenSpaceDrawQuad));
|
||||||
|
|
||||||
|
AddStep("change score to middle", () => playerScore.Value = 1000000);
|
||||||
|
AddWaitStep("wait for movement", 5);
|
||||||
|
AddUntilStep("wait for tracked score fully visible", () => leaderboard.ScreenSpaceDrawQuad.Intersects(leaderboard.TrackedScore!.ScreenSpaceDrawQuad));
|
||||||
|
|
||||||
|
AddStep("change score to first", () => playerScore.Value = 5000000);
|
||||||
|
AddWaitStep("wait for movement", 5);
|
||||||
|
AddUntilStep("wait for tracked score fully visible", () => leaderboard.ScreenSpaceDrawQuad.Intersects(leaderboard.TrackedScore!.ScreenSpaceDrawQuad));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestEditDefaultSkin()
|
public void TestEditDefaultSkin()
|
||||||
{
|
{
|
||||||
AddAssert("is default skin", () => skinManager.CurrentSkinInfo.Value.ID == SkinInfo.TRIANGLES_SKIN);
|
AddAssert("is default skin", () => skinManager.CurrentSkinInfo.Value.ID == SkinInfo.ARGON_SKIN);
|
||||||
|
|
||||||
AddStep("open settings", () => { Game.Settings.Show(); });
|
AddStep("open settings", () => { Game.Settings.Show(); });
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
AddStep("open skin editor", () => skinEditor.Show());
|
AddStep("open skin editor", () => skinEditor.Show());
|
||||||
|
|
||||||
// Until step required as the skin editor may take time to load (and an extra scheduled frame for the mutable part).
|
// Until step required as the skin editor may take time to load (and an extra scheduled frame for the mutable part).
|
||||||
AddUntilStep("is modified default skin", () => skinManager.CurrentSkinInfo.Value.ID != SkinInfo.TRIANGLES_SKIN);
|
AddUntilStep("is modified default skin", () => skinManager.CurrentSkinInfo.Value.ID != SkinInfo.ARGON_SKIN);
|
||||||
AddAssert("is not protected", () => skinManager.CurrentSkinInfo.Value.PerformRead(s => !s.Protected));
|
AddAssert("is not protected", () => skinManager.CurrentSkinInfo.Value.PerformRead(s => !s.Protected));
|
||||||
|
|
||||||
AddUntilStep("export button enabled", () => Game.Settings.ChildrenOfType<SkinSection.ExportSkinButton>().SingleOrDefault()?.Enabled.Value == true);
|
AddUntilStep("export button enabled", () => Game.Settings.ChildrenOfType<SkinSection.ExportSkinButton>().SingleOrDefault()?.Enabled.Value == true);
|
||||||
|
@ -504,7 +504,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
progressingNotifications.RemoveAll(n => n.State == ProgressNotificationState.Completed);
|
progressingNotifications.RemoveAll(n => n.State == ProgressNotificationState.Completed && n.WasClosed);
|
||||||
|
|
||||||
if (progressingNotifications.Count(n => n.State == ProgressNotificationState.Active) < 3)
|
if (progressingNotifications.Count(n => n.State == ProgressNotificationState.Active) < 3)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
// UI/selection defaults
|
// UI/selection defaults
|
||||||
SetDefault(OsuSetting.Ruleset, string.Empty);
|
SetDefault(OsuSetting.Ruleset, string.Empty);
|
||||||
SetDefault(OsuSetting.Skin, SkinInfo.TRIANGLES_SKIN.ToString());
|
SetDefault(OsuSetting.Skin, SkinInfo.ARGON_SKIN.ToString());
|
||||||
|
|
||||||
SetDefault(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
SetDefault(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
||||||
SetDefault(OsuSetting.BeatmapDetailModsFilter, false);
|
SetDefault(OsuSetting.BeatmapDetailModsFilter, false);
|
||||||
|
@ -9,27 +9,25 @@ namespace osu.Game.Online.API.Requests
|
|||||||
{
|
{
|
||||||
public class GetBeatmapRequest : APIRequest<APIBeatmap>
|
public class GetBeatmapRequest : APIRequest<APIBeatmap>
|
||||||
{
|
{
|
||||||
private readonly IBeatmapInfo beatmapInfo;
|
public readonly IBeatmapInfo BeatmapInfo;
|
||||||
|
public readonly string Filename;
|
||||||
private readonly string filename;
|
|
||||||
|
|
||||||
public GetBeatmapRequest(IBeatmapInfo beatmapInfo)
|
public GetBeatmapRequest(IBeatmapInfo beatmapInfo)
|
||||||
{
|
{
|
||||||
this.beatmapInfo = beatmapInfo;
|
BeatmapInfo = beatmapInfo;
|
||||||
|
Filename = (beatmapInfo as BeatmapInfo)?.Path ?? string.Empty;
|
||||||
filename = (beatmapInfo as BeatmapInfo)?.Path ?? string.Empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override WebRequest CreateWebRequest()
|
protected override WebRequest CreateWebRequest()
|
||||||
{
|
{
|
||||||
var request = base.CreateWebRequest();
|
var request = base.CreateWebRequest();
|
||||||
|
|
||||||
if (beatmapInfo.OnlineID > 0)
|
if (BeatmapInfo.OnlineID > 0)
|
||||||
request.AddParameter(@"id", beatmapInfo.OnlineID.ToString());
|
request.AddParameter(@"id", BeatmapInfo.OnlineID.ToString());
|
||||||
if (!string.IsNullOrEmpty(beatmapInfo.MD5Hash))
|
if (!string.IsNullOrEmpty(BeatmapInfo.MD5Hash))
|
||||||
request.AddParameter(@"checksum", beatmapInfo.MD5Hash);
|
request.AddParameter(@"checksum", BeatmapInfo.MD5Hash);
|
||||||
if (!string.IsNullOrEmpty(filename))
|
if (!string.IsNullOrEmpty(Filename))
|
||||||
request.AddParameter(@"filename", filename);
|
request.AddParameter(@"filename", Filename);
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
@ -34,6 +36,11 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
|
|
||||||
protected float ComboBasedAlpha;
|
protected float ComboBasedAlpha;
|
||||||
|
|
||||||
|
[SettingSource(
|
||||||
|
"Hidden at combo",
|
||||||
|
"The combo count at which the cursor becomes completely hidden",
|
||||||
|
SettingControlType = typeof(SettingsSlider<int, HiddenComboSlider>)
|
||||||
|
)]
|
||||||
public abstract BindableInt HiddenComboCount { get; }
|
public abstract BindableInt HiddenComboCount { get; }
|
||||||
|
|
||||||
public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank;
|
public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank;
|
||||||
|
@ -6,7 +6,6 @@ using System.Linq;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
@ -17,7 +16,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override LocalisableString Description => "Sloooow doooown...";
|
public override LocalisableString Description => "Sloooow doooown...";
|
||||||
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleDown;
|
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleDown;
|
||||||
|
|
||||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
|
||||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
||||||
{
|
{
|
||||||
MinValue = 0.51,
|
MinValue = 0.51,
|
||||||
@ -25,7 +23,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Precision = 0.01,
|
Precision = 0.01,
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
|
||||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.75)
|
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.75)
|
||||||
{
|
{
|
||||||
MinValue = 0.5,
|
MinValue = 0.5,
|
||||||
@ -33,7 +30,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Precision = 0.01,
|
Precision = 0.01,
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
|
||||||
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||||
|
|
||||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModWindUp)).ToArray();
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModWindUp)).ToArray();
|
||||||
|
@ -6,7 +6,6 @@ using System.Linq;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Configuration;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
@ -17,7 +16,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override LocalisableString Description => "Can you keep up?";
|
public override LocalisableString Description => "Can you keep up?";
|
||||||
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleUp;
|
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleUp;
|
||||||
|
|
||||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
|
||||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
||||||
{
|
{
|
||||||
MinValue = 0.5,
|
MinValue = 0.5,
|
||||||
@ -25,7 +23,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Precision = 0.01,
|
Precision = 0.01,
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
|
||||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(1.5)
|
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(1.5)
|
||||||
{
|
{
|
||||||
MinValue = 0.51,
|
MinValue = 0.51,
|
||||||
@ -33,7 +30,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Precision = 0.01,
|
Precision = 0.01,
|
||||||
};
|
};
|
||||||
|
|
||||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
|
||||||
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||||
|
|
||||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModWindDown)).ToArray();
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModWindDown)).ToArray();
|
||||||
|
@ -651,7 +651,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This does not affect the time offset provided to invocations of <see cref="CheckForResult"/>.
|
/// This does not affect the time offset provided to invocations of <see cref="CheckForResult"/>.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected virtual double MaximumJudgementOffset => HitObject.HitWindows?.WindowFor(HitResult.Miss) ?? 0;
|
public virtual double MaximumJudgementOffset => HitObject.HitWindows?.WindowFor(HitResult.Miss) ?? 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies the <see cref="Result"/> of this <see cref="DrawableHitObject"/>, notifying responders such as
|
/// Applies the <see cref="Result"/> of this <see cref="DrawableHitObject"/>, notifying responders such as
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -214,7 +215,10 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return scrollingInfo.Algorithm.GetDisplayStartTime(hitObject.HitObject.StartTime, originAdjustment, timeRange.Value, scrollLength);
|
double computedStartTime = scrollingInfo.Algorithm.GetDisplayStartTime(hitObject.HitObject.StartTime, originAdjustment, timeRange.Value, scrollLength);
|
||||||
|
|
||||||
|
// always load the hitobject before its first judgement offset
|
||||||
|
return Math.Min(hitObject.HitObject.StartTime - hitObject.MaximumJudgementOffset, computedStartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateLayoutRecursive(DrawableHitObject hitObject)
|
private void updateLayoutRecursive(DrawableHitObject hitObject)
|
||||||
|
@ -4,11 +4,12 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Diagnostics;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Caching;
|
using osu.Framework.Caching;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Screens.Edit.Components.Timelines.Summary.Parts;
|
using osu.Game.Screens.Edit.Components.Timelines.Summary.Parts;
|
||||||
@ -34,8 +35,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; }
|
private OsuColour colours { get; set; }
|
||||||
|
|
||||||
private static readonly int highest_divisor = BindableBeatDivisor.PREDEFINED_DIVISORS.Last();
|
|
||||||
|
|
||||||
public TimelineTickDisplay()
|
public TimelineTickDisplay()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@ -80,20 +79,19 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (timeline != null)
|
if (timeline == null || DrawWidth <= 0) return;
|
||||||
|
|
||||||
|
(float, float) newRange = (
|
||||||
|
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X,
|
||||||
|
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopRight).X + PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X);
|
||||||
|
|
||||||
|
if (visibleRange != newRange)
|
||||||
{
|
{
|
||||||
var newRange = (
|
visibleRange = newRange;
|
||||||
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X,
|
|
||||||
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopRight).X + PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X);
|
|
||||||
|
|
||||||
if (visibleRange != newRange)
|
// actual regeneration only needs to occur if we've passed one of the known next min/max tick boundaries.
|
||||||
{
|
if (nextMinTick == null || nextMaxTick == null || (visibleRange.min < nextMinTick || visibleRange.max > nextMaxTick))
|
||||||
visibleRange = newRange;
|
tickCache.Invalidate();
|
||||||
|
|
||||||
// actual regeneration only needs to occur if we've passed one of the known next min/max tick boundaries.
|
|
||||||
if (nextMinTick == null || nextMaxTick == null || (visibleRange.min < nextMinTick || visibleRange.max > nextMaxTick))
|
|
||||||
tickCache.Invalidate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tickCache.IsValid)
|
if (!tickCache.IsValid)
|
||||||
@ -151,6 +149,20 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Children.Count > 512)
|
||||||
|
{
|
||||||
|
// There should always be a sanely small number of ticks rendered.
|
||||||
|
// If this assertion triggers, either the zoom logic is broken or a beatmap is
|
||||||
|
// probably doing weird things...
|
||||||
|
//
|
||||||
|
// Let's hope the latter never happens.
|
||||||
|
// If it does, we can choose to either fix it or ignore it as an outlier.
|
||||||
|
string message = $"Timeline is rendering many ticks ({Children.Count})";
|
||||||
|
|
||||||
|
Logger.Log(message);
|
||||||
|
Debug.Fail(message);
|
||||||
|
}
|
||||||
|
|
||||||
int usedDrawables = drawableIndex;
|
int usedDrawables = drawableIndex;
|
||||||
|
|
||||||
// save a few drawables beyond the currently used for edge cases.
|
// save a few drawables beyond the currently used for edge cases.
|
||||||
|
@ -56,7 +56,14 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
protected ZoomableScrollContainer()
|
protected ZoomableScrollContainer()
|
||||||
: base(Direction.Horizontal)
|
: base(Direction.Horizontal)
|
||||||
{
|
{
|
||||||
base.Content.Add(zoomedContent = new Container { RelativeSizeAxes = Axes.Y });
|
base.Content.Add(zoomedContent = new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
// We must hide content until SetupZoom is called.
|
||||||
|
// If not, a child component that relies on its DrawWidth (via RelativeSizeAxes) may see a very incorrect value
|
||||||
|
// momentarily, as noticed in the TimelineTickDisplay, which would render thousands of ticks incorrectly.
|
||||||
|
Alpha = 0,
|
||||||
|
});
|
||||||
|
|
||||||
AddLayout(zoomedContentWidthCache);
|
AddLayout(zoomedContentWidthCache);
|
||||||
}
|
}
|
||||||
@ -94,6 +101,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
maxZoom = maximum;
|
maxZoom = maximum;
|
||||||
CurrentZoom = zoomTarget = initial;
|
CurrentZoom = zoomTarget = initial;
|
||||||
isZoomSetUp = true;
|
isZoomSetUp = true;
|
||||||
|
|
||||||
|
zoomedContent.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -118,9 +127,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
CurrentZoom = zoomTarget = newZoom;
|
CurrentZoom = zoomTarget = newZoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void UpdateAfterChildren()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.UpdateAfterChildren();
|
||||||
|
|
||||||
if (!zoomedContentWidthCache.IsValid)
|
if (!zoomedContentWidthCache.IsValid)
|
||||||
updateZoomedContentWidth();
|
updateZoomedContentWidth();
|
||||||
|
@ -54,6 +54,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
{
|
{
|
||||||
private const float disabled_alpha = 0.2f;
|
private const float disabled_alpha = 0.2f;
|
||||||
|
|
||||||
|
public override bool IsPresent => base.IsPresent || Scheduler.HasPendingTasks;
|
||||||
|
|
||||||
public Action? SettingsApplied;
|
public Action? SettingsApplied;
|
||||||
|
|
||||||
public OsuTextBox NameField = null!;
|
public OsuTextBox NameField = null!;
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
private bool requiresScroll;
|
private bool requiresScroll;
|
||||||
private readonly OsuScrollContainer scroll;
|
private readonly OsuScrollContainer scroll;
|
||||||
|
|
||||||
private GameplayLeaderboardScore? trackedScore;
|
public GameplayLeaderboardScore? TrackedScore { get; private set; }
|
||||||
|
|
||||||
private const int max_panels = 8;
|
private const int max_panels = 8;
|
||||||
|
|
||||||
@ -42,6 +42,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
{
|
{
|
||||||
scroll = new InputDisabledScrollContainer
|
scroll = new InputDisabledScrollContainer
|
||||||
{
|
{
|
||||||
|
ClampExtension = 0,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = Flow = new FillFlowContainer<GameplayLeaderboardScore>
|
Child = Flow = new FillFlowContainer<GameplayLeaderboardScore>
|
||||||
{
|
{
|
||||||
@ -78,10 +79,10 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
if (isTracked)
|
if (isTracked)
|
||||||
{
|
{
|
||||||
if (trackedScore != null)
|
if (TrackedScore != null)
|
||||||
throw new InvalidOperationException("Cannot track more than one score.");
|
throw new InvalidOperationException("Cannot track more than one score.");
|
||||||
|
|
||||||
trackedScore = drawable;
|
TrackedScore = drawable;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawable.Expanded.BindTo(Expanded);
|
drawable.Expanded.BindTo(Expanded);
|
||||||
@ -92,14 +93,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
int displayCount = Math.Min(Flow.Count, max_panels);
|
int displayCount = Math.Min(Flow.Count, max_panels);
|
||||||
Height = displayCount * (GameplayLeaderboardScore.PANEL_HEIGHT + Flow.Spacing.Y);
|
Height = displayCount * (GameplayLeaderboardScore.PANEL_HEIGHT + Flow.Spacing.Y);
|
||||||
// Add extra margin space to flow equal to height of leaderboard.
|
|
||||||
// This ensures the content is always on screen, but also accounts for the fact that scroll operations
|
|
||||||
// without animation were actually forcing the local score to a location it can't usually reside at.
|
|
||||||
//
|
|
||||||
// Basically, the local score was in the scroll extension region (due to always trying to scroll the
|
|
||||||
// local player to the middle of the display, but there being no other content below the local player
|
|
||||||
// to scroll up by).
|
|
||||||
Flow.Margin = new MarginPadding { Bottom = Height };
|
|
||||||
requiresScroll = displayCount != Flow.Count;
|
requiresScroll = displayCount != Flow.Count;
|
||||||
|
|
||||||
return drawable;
|
return drawable;
|
||||||
@ -108,7 +101,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
Flow.Clear();
|
Flow.Clear();
|
||||||
trackedScore = null;
|
TrackedScore = null;
|
||||||
scroll.ScrollToStart(false);
|
scroll.ScrollToStart(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,9 +112,10 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (requiresScroll && trackedScore != null)
|
if (requiresScroll && TrackedScore != null)
|
||||||
{
|
{
|
||||||
float scrollTarget = scroll.GetChildPosInContent(trackedScore) + trackedScore.DrawHeight / 2 - scroll.DrawHeight / 2;
|
float scrollTarget = scroll.GetChildPosInContent(TrackedScore) + TrackedScore.DrawHeight / 2 - scroll.DrawHeight / 2;
|
||||||
|
|
||||||
scroll.ScrollTo(scrollTarget);
|
scroll.ScrollTo(scrollTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,25 +135,15 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case GetBeatmapRequest getBeatmapRequest:
|
||||||
|
{
|
||||||
|
getBeatmapRequest.TriggerSuccess(createResponseBeatmaps(getBeatmapRequest.BeatmapInfo.OnlineID).Single());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
case GetBeatmapsRequest getBeatmapsRequest:
|
case GetBeatmapsRequest getBeatmapsRequest:
|
||||||
{
|
{
|
||||||
var result = new List<APIBeatmap>();
|
getBeatmapsRequest.TriggerSuccess(new GetBeatmapsResponse { Beatmaps = createResponseBeatmaps(getBeatmapsRequest.BeatmapIds.ToArray()) });
|
||||||
|
|
||||||
foreach (int id in getBeatmapsRequest.BeatmapIds)
|
|
||||||
{
|
|
||||||
var baseBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineID == id);
|
|
||||||
|
|
||||||
if (baseBeatmap == null)
|
|
||||||
{
|
|
||||||
baseBeatmap = new TestBeatmap(new RulesetInfo { OnlineID = 0 }).BeatmapInfo;
|
|
||||||
baseBeatmap.OnlineID = id;
|
|
||||||
baseBeatmap.BeatmapSet!.OnlineID = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
result.Add(OsuTestScene.CreateAPIBeatmap(baseBeatmap));
|
|
||||||
}
|
|
||||||
|
|
||||||
getBeatmapsRequest.TriggerSuccess(new GetBeatmapsResponse { Beatmaps = result });
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,6 +165,27 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<APIBeatmap> createResponseBeatmaps(params int[] beatmapIds)
|
||||||
|
{
|
||||||
|
var result = new List<APIBeatmap>();
|
||||||
|
|
||||||
|
foreach (int id in beatmapIds)
|
||||||
|
{
|
||||||
|
var baseBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineID == id);
|
||||||
|
|
||||||
|
if (baseBeatmap == null)
|
||||||
|
{
|
||||||
|
baseBeatmap = new TestBeatmap(new RulesetInfo { OnlineID = 0 }).BeatmapInfo;
|
||||||
|
baseBeatmap.OnlineID = id;
|
||||||
|
baseBeatmap.BeatmapSet!.OnlineID = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
result.Add(OsuTestScene.CreateAPIBeatmap(baseBeatmap));
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +156,7 @@ namespace osu.Game.Updater
|
|||||||
switch (State)
|
switch (State)
|
||||||
{
|
{
|
||||||
case ProgressNotificationState.Cancelled:
|
case ProgressNotificationState.Cancelled:
|
||||||
|
case ProgressNotificationState.Completed:
|
||||||
base.Close(runFlingAnimation);
|
base.Close(runFlingAnimation);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user