From dc899515ec7ffd460edd3a148a651c344daaf74f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 17 Apr 2021 00:56:53 +0900 Subject: [PATCH 1/7] Empty commit From d5a1e00feb34dbfe3ec6a67ba5a64d51df47c905 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 17 Apr 2021 03:32:47 +0300 Subject: [PATCH 2/7] Improve "barrel roll" mod settings description --- osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs index b6cfa514a1..edf846e6ec 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs @@ -1,7 +1,9 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System.Linq; using osu.Framework.Bindables; +using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Game.Configuration; using osu.Game.Rulesets.Mods; @@ -30,6 +32,8 @@ namespace osu.Game.Rulesets.Osu.Mods public override string Description => "The whole playfield is on a wheel!"; public override double ScoreMultiplier => 1; + public override string SettingDescription => $"{SpinSpeed.Value}rpm, {Direction.Value.GetDescription().ToLowerInvariant()}"; + public void Update(Playfield playfield) { playfield.Rotation = (Direction.Value == RotationDirection.CounterClockwise ? -1 : 1) * 360 * (float)(playfield.Time.Current / 60000 * SpinSpeed.Value); From 78c850878486280548694a5641b29bbf59e50a71 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 17 Apr 2021 03:52:07 +0300 Subject: [PATCH 3/7] Remove unused using directive gotta git gud --- osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs index edf846e6ec..af3986aceb 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs @@ -1,7 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System.Linq; using osu.Framework.Bindables; using osu.Framework.Extensions; using osu.Framework.Graphics; From 892a8a7cd2e2305dbfa159b0044333aa61e34507 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 17 Apr 2021 04:23:48 +0300 Subject: [PATCH 4/7] Remove unnecessary comma --- osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs index af3986aceb..00596e1486 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Mods public override string Description => "The whole playfield is on a wheel!"; public override double ScoreMultiplier => 1; - public override string SettingDescription => $"{SpinSpeed.Value}rpm, {Direction.Value.GetDescription().ToLowerInvariant()}"; + public override string SettingDescription => $"{SpinSpeed.Value}rpm {Direction.Value.GetDescription().ToLowerInvariant()}"; public void Update(Playfield playfield) { From c1082ddb9a7e03ac420a4cb7aa5e468dde614b22 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 17 Apr 2021 06:28:07 +0300 Subject: [PATCH 5/7] Add space before the unit Co-authored-by: Joseph Madamba --- osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs index 00596e1486..bcbb0f4366 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Mods public override string Description => "The whole playfield is on a wheel!"; public override double ScoreMultiplier => 1; - public override string SettingDescription => $"{SpinSpeed.Value}rpm {Direction.Value.GetDescription().ToLowerInvariant()}"; + public override string SettingDescription => $"{SpinSpeed.Value} rpm {Direction.Value.GetDescription().ToLowerInvariant()}"; public void Update(Playfield playfield) { From 250c7403e87f88c65139a55792902dc8d173a995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 17 Apr 2021 13:50:00 +0200 Subject: [PATCH 6/7] Fix idle tracker assuming time starts at 0 `IdleTracker` in its construction quietly assumed that the clock it receives from its parent starts ticking from 0 at the point at which it is passed down. This is not necessarily the case when headless executions are involved, which means that the initial state of the tracker could be computed as idle incorrectly. Resolve by explicitly reading the clock time at the point of `LoadComplete()`. --- osu.Game/Input/IdleTracker.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Input/IdleTracker.cs b/osu.Game/Input/IdleTracker.cs index 63a6348b57..2d6a21d1cf 100644 --- a/osu.Game/Input/IdleTracker.cs +++ b/osu.Game/Input/IdleTracker.cs @@ -42,6 +42,12 @@ namespace osu.Game.Input RelativeSizeAxes = Axes.Both; } + protected override void LoadComplete() + { + base.LoadComplete(); + updateLastInteractionTime(); + } + protected override void Update() { base.Update(); From f3ea51eeedc8113ac83c79e5f0daaa241e755f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 17 Apr 2021 14:23:32 +0200 Subject: [PATCH 7/7] Adjust tests to not rely on invalid assumption --- osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index 4d64c7d35d..fdee53f0be 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -81,6 +81,13 @@ namespace osu.Game.Tests.Visual.Components [Test] public void TestMovement() { + checkIdleStatus(1, false); + checkIdleStatus(2, false); + checkIdleStatus(3, false); + checkIdleStatus(4, false); + + waitForAllIdle(); + AddStep("move to top right", () => InputManager.MoveMouseTo(box2)); checkIdleStatus(1, true); @@ -102,6 +109,8 @@ namespace osu.Game.Tests.Visual.Components [Test] public void TestTimings() { + waitForAllIdle(); + AddStep("move to centre", () => InputManager.MoveMouseTo(Content)); checkIdleStatus(1, false);