mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Merge branch 'master' into fix-initial-volume-display-when-zero
This commit is contained in:
commit
5e148b273e
@ -5,8 +5,8 @@
|
|||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<Description>A free-to-win rhythm game. Rhythm is just a *click* away!</Description>
|
<Description>A free-to-win rhythm game. Rhythm is just a *click* away!</Description>
|
||||||
<AssemblyName>osu!</AssemblyName>
|
<AssemblyName>osu!</AssemblyName>
|
||||||
<Title>osu!lazer</Title>
|
<Title>osu!</Title>
|
||||||
<Product>osu!lazer</Product>
|
<Product>osu!</Product>
|
||||||
<ApplicationIcon>lazer.ico</ApplicationIcon>
|
<ApplicationIcon>lazer.ico</ApplicationIcon>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<Version>0.0.0</Version>
|
<Version>0.0.0</Version>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<metadata>
|
<metadata>
|
||||||
<id>osulazer</id>
|
<id>osulazer</id>
|
||||||
<version>0.0.0</version>
|
<version>0.0.0</version>
|
||||||
<title>osu!lazer</title>
|
<title>osu!</title>
|
||||||
<authors>ppy Pty Ltd</authors>
|
<authors>ppy Pty Ltd</authors>
|
||||||
<owners>Dean Herbert</owners>
|
<owners>Dean Herbert</owners>
|
||||||
<projectUrl>https://osu.ppy.sh/</projectUrl>
|
<projectUrl>https://osu.ppy.sh/</projectUrl>
|
||||||
@ -20,4 +20,3 @@
|
|||||||
<file src="**.config" target="lib\net45\"/>
|
<file src="**.config" target="lib\net45\"/>
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
|||||||
|
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// All constants are in osu!stable's gamefield space, which is shifted 16px downwards.
|
/// All constants are in osu!stable's gamefield space, which is shifted 16px downwards.
|
||||||
/// This offset is negated in both osu!stable and osu!lazer to bring all constants into window-space.
|
/// This offset is negated to bring all constants into window-space.
|
||||||
/// Note: SPINNER_Y_CENTRE + SPINNER_TOP_OFFSET - Position.Y = 240 (=480/2, or half the window-space in osu!stable)
|
/// Note: SPINNER_Y_CENTRE + SPINNER_TOP_OFFSET - Position.Y = 240 (=480/2, or half the window-space in osu!stable)
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected const float SPINNER_TOP_OFFSET = 45f - 16f;
|
protected const float SPINNER_TOP_OFFSET = 45f - 16f;
|
||||||
|
@ -9,6 +9,8 @@ using osu.Game.Online.Rooms;
|
|||||||
using osu.Game.Online.Solo;
|
using osu.Game.Online.Solo;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
using osu.Game.Rulesets.Osu.Judgements;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Gameplay
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
@ -35,6 +37,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
AddUntilStep("wait for track to start running", () => Beatmap.Value.Track.IsRunning);
|
AddUntilStep("wait for track to start running", () => Beatmap.Value.Track.IsRunning);
|
||||||
|
|
||||||
|
addFakeHit();
|
||||||
|
|
||||||
AddStep("seek to completion", () => Player.GameplayClockContainer.Seek(Player.DrawableRuleset.Objects.Last().GetEndTime()));
|
AddStep("seek to completion", () => Player.GameplayClockContainer.Seek(Player.DrawableRuleset.Objects.Last().GetEndTime()));
|
||||||
|
|
||||||
AddUntilStep("results displayed", () => Player.GetChildScreen() is ResultsScreen);
|
AddUntilStep("results displayed", () => Player.GetChildScreen() is ResultsScreen);
|
||||||
@ -52,6 +57,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
AddUntilStep("wait for track to start running", () => Beatmap.Value.Track.IsRunning);
|
AddUntilStep("wait for track to start running", () => Beatmap.Value.Track.IsRunning);
|
||||||
|
|
||||||
|
addFakeHit();
|
||||||
|
|
||||||
AddStep("seek to completion", () => Player.GameplayClockContainer.Seek(Player.DrawableRuleset.Objects.Last().GetEndTime()));
|
AddStep("seek to completion", () => Player.GameplayClockContainer.Seek(Player.DrawableRuleset.Objects.Last().GetEndTime()));
|
||||||
|
|
||||||
AddUntilStep("results displayed", () => Player.GetChildScreen() is ResultsScreen);
|
AddUntilStep("results displayed", () => Player.GetChildScreen() is ResultsScreen);
|
||||||
@ -67,10 +75,29 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
|
AddUntilStep("wait for track to start running", () => Beatmap.Value.Track.IsRunning);
|
||||||
|
|
||||||
|
addFakeHit();
|
||||||
|
|
||||||
AddStep("exit", () => Player.Exit());
|
AddStep("exit", () => Player.Exit());
|
||||||
AddAssert("ensure no submission", () => Player.SubmittedScore == null);
|
AddAssert("ensure no submission", () => Player.SubmittedScore == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestNoSubmissionOnEmptyFail()
|
||||||
|
{
|
||||||
|
prepareTokenResponse(true);
|
||||||
|
|
||||||
|
CreateTest(() => allowFail = true);
|
||||||
|
|
||||||
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
|
AddUntilStep("wait for fail", () => Player.HasFailed);
|
||||||
|
AddStep("exit", () => Player.Exit());
|
||||||
|
|
||||||
|
AddAssert("ensure no submission", () => Player.SubmittedScore == null);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestSubmissionOnFail()
|
public void TestSubmissionOnFail()
|
||||||
{
|
{
|
||||||
@ -79,12 +106,28 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
CreateTest(() => allowFail = true);
|
CreateTest(() => allowFail = true);
|
||||||
|
|
||||||
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
|
addFakeHit();
|
||||||
|
|
||||||
AddUntilStep("wait for fail", () => Player.HasFailed);
|
AddUntilStep("wait for fail", () => Player.HasFailed);
|
||||||
AddStep("exit", () => Player.Exit());
|
AddStep("exit", () => Player.Exit());
|
||||||
|
|
||||||
AddAssert("ensure failing submission", () => Player.SubmittedScore?.ScoreInfo.Passed == false);
|
AddAssert("ensure failing submission", () => Player.SubmittedScore?.ScoreInfo.Passed == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestNoSubmissionOnEmptyExit()
|
||||||
|
{
|
||||||
|
prepareTokenResponse(true);
|
||||||
|
|
||||||
|
CreateTest(() => allowFail = false);
|
||||||
|
|
||||||
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
|
AddStep("exit", () => Player.Exit());
|
||||||
|
AddAssert("ensure no submission", () => Player.SubmittedScore == null);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestSubmissionOnExit()
|
public void TestSubmissionOnExit()
|
||||||
{
|
{
|
||||||
@ -93,10 +136,27 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
CreateTest(() => allowFail = false);
|
CreateTest(() => allowFail = false);
|
||||||
|
|
||||||
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
AddUntilStep("wait for token request", () => Player.TokenCreationRequested);
|
||||||
|
|
||||||
|
addFakeHit();
|
||||||
|
|
||||||
AddStep("exit", () => Player.Exit());
|
AddStep("exit", () => Player.Exit());
|
||||||
AddAssert("ensure failing submission", () => Player.SubmittedScore?.ScoreInfo.Passed == false);
|
AddAssert("ensure failing submission", () => Player.SubmittedScore?.ScoreInfo.Passed == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addFakeHit()
|
||||||
|
{
|
||||||
|
AddUntilStep("wait for first result", () => Player.Results.Count > 0);
|
||||||
|
|
||||||
|
AddStep("force successfuly hit", () =>
|
||||||
|
{
|
||||||
|
Player.ScoreProcessor.RevertResult(Player.Results.First());
|
||||||
|
Player.ScoreProcessor.ApplyResult(new OsuJudgementResult(Beatmap.Value.Beatmap.HitObjects.First(), new OsuJudgement())
|
||||||
|
{
|
||||||
|
Type = HitResult.Great,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void prepareTokenResponse(bool validToken)
|
private void prepareTokenResponse(bool validToken)
|
||||||
{
|
{
|
||||||
AddStep("Prepare test API", () =>
|
AddStep("Prepare test API", () =>
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Version = "All Metrics",
|
Version = "All Metrics",
|
||||||
Metadata = new BeatmapMetadata
|
Metadata = new BeatmapMetadata
|
||||||
{
|
{
|
||||||
Source = "osu!lazer",
|
Source = "osu!",
|
||||||
Tags = "this beatmap has all the metrics",
|
Tags = "this beatmap has all the metrics",
|
||||||
},
|
},
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
@ -100,7 +100,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Version = "Only Ratings",
|
Version = "Only Ratings",
|
||||||
Metadata = new BeatmapMetadata
|
Metadata = new BeatmapMetadata
|
||||||
{
|
{
|
||||||
Source = "osu!lazer",
|
Source = "osu!",
|
||||||
Tags = "this beatmap has ratings metrics but not retries or fails",
|
Tags = "this beatmap has ratings metrics but not retries or fails",
|
||||||
},
|
},
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
@ -122,7 +122,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Version = "Only Retries and Fails",
|
Version = "Only Retries and Fails",
|
||||||
Metadata = new BeatmapMetadata
|
Metadata = new BeatmapMetadata
|
||||||
{
|
{
|
||||||
Source = "osu!lazer",
|
Source = "osu!",
|
||||||
Tags = "this beatmap has retries and fails but no ratings",
|
Tags = "this beatmap has retries and fails but no ratings",
|
||||||
},
|
},
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
@ -149,7 +149,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Version = "No Metrics",
|
Version = "No Metrics",
|
||||||
Metadata = new BeatmapMetadata
|
Metadata = new BeatmapMetadata
|
||||||
{
|
{
|
||||||
Source = "osu!lazer",
|
Source = "osu!",
|
||||||
Tags = "this beatmap has no metrics",
|
Tags = "this beatmap has no metrics",
|
||||||
},
|
},
|
||||||
BaseDifficulty = new BeatmapDifficulty
|
BaseDifficulty = new BeatmapDifficulty
|
||||||
|
@ -80,7 +80,7 @@ namespace osu.Game
|
|||||||
return @"local " + (DebugUtils.IsDebugBuild ? @"debug" : @"release");
|
return @"local " + (DebugUtils.IsDebugBuild ? @"debug" : @"release");
|
||||||
|
|
||||||
var version = AssemblyVersion;
|
var version = AssemblyVersion;
|
||||||
return $@"{version.Major}.{version.Minor}.{version.Build}";
|
return $@"{version.Major}.{version.Minor}.{version.Build}-lazer";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ namespace osu.Game
|
|||||||
public OsuGameBase()
|
public OsuGameBase()
|
||||||
{
|
{
|
||||||
UseDevelopmentServer = DebugUtils.IsDebugBuild;
|
UseDevelopmentServer = DebugUtils.IsDebugBuild;
|
||||||
Name = @"osu!lazer";
|
Name = @"osu!";
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
@ -208,7 +208,7 @@ namespace osu.Game.Scoring
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// This score is guaranteed to be an osu!lazer score.
|
// This is guaranteed to be a non-legacy score.
|
||||||
// The combo must be determined through the score's statistics, as both the beatmap's max combo and the difficulty calculator will provide osu!stable combo values.
|
// The combo must be determined through the score's statistics, as both the beatmap's max combo and the difficulty calculator will provide osu!stable combo values.
|
||||||
beatmapMaxCombo = Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r.AffectsCombo()).Select(r => score.Statistics.GetOrDefault(r)).Sum();
|
beatmapMaxCombo = Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Where(r => r.AffectsCombo()).Select(r => score.Statistics.GetOrDefault(r)).Sum();
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
"New features are coming online every update. Make sure to stay up-to-date!",
|
"New features are coming online every update. Make sure to stay up-to-date!",
|
||||||
"If you find the UI too large or small, try adjusting UI scale in settings!",
|
"If you find the UI too large or small, try adjusting UI scale in settings!",
|
||||||
"Try adjusting the \"Screen Scaling\" mode to change your gameplay or UI area, even in fullscreen!",
|
"Try adjusting the \"Screen Scaling\" mode to change your gameplay or UI area, even in fullscreen!",
|
||||||
"For now, what used to be \"osu!direct\" is available to all users on lazer. You can access it anywhere using Ctrl-D!",
|
"What used to be \"osu!direct\" is available to all users just like on the website. You can access it anywhere using Ctrl-D!",
|
||||||
"Seeking in replays is available by dragging on the difficulty bar at the bottom of the screen!",
|
"Seeking in replays is available by dragging on the difficulty bar at the bottom of the screen!",
|
||||||
"Multithreading support means that even with low \"FPS\" your input and judgements will be accurate!",
|
"Multithreading support means that even with low \"FPS\" your input and judgements will be accurate!",
|
||||||
"Try scrolling down in the mod select panel to find a bunch of new fun mods!",
|
"Try scrolling down in the mod select panel to find a bunch of new fun mods!",
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Logging;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
@ -144,6 +145,10 @@ namespace osu.Game.Screens.Play
|
|||||||
if (scoreSubmissionSource != null)
|
if (scoreSubmissionSource != null)
|
||||||
return scoreSubmissionSource.Task;
|
return scoreSubmissionSource.Task;
|
||||||
|
|
||||||
|
// if the user never hit anything, this score should not be counted in any way.
|
||||||
|
if (!score.ScoreInfo.Statistics.Any(s => s.Key.IsHit() && s.Value > 0))
|
||||||
|
return Task.CompletedTask;
|
||||||
|
|
||||||
scoreSubmissionSource = new TaskCompletionSource<bool>();
|
scoreSubmissionSource = new TaskCompletionSource<bool>();
|
||||||
var request = CreateSubmissionRequest(score, token.Value);
|
var request = CreateSubmissionRequest(score, token.Value);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ using osuTK.Graphics;
|
|||||||
namespace osu.Game.Skinning
|
namespace osu.Game.Skinning
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compatibility methods to convert osu!stable colours to osu!lazer-compatible ones. Should be used for legacy skins only.
|
/// Compatibility methods to apply osu!stable quirks to colours. Should be used for legacy skins only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class LegacyColourCompatibility
|
public static class LegacyColourCompatibility
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ namespace osu.Game.Skinning
|
|||||||
public static SkinInfo Default { get; } = new SkinInfo
|
public static SkinInfo Default { get; } = new SkinInfo
|
||||||
{
|
{
|
||||||
ID = DEFAULT_SKIN,
|
ID = DEFAULT_SKIN,
|
||||||
Name = "osu!lazer",
|
Name = "osu! (triangles)",
|
||||||
Creator = "team osu!",
|
Creator = "team osu!",
|
||||||
InstantiationInfo = typeof(DefaultSkin).GetInvariantInstantiationInfo()
|
InstantiationInfo = typeof(DefaultSkin).GetInvariantInstantiationInfo()
|
||||||
};
|
};
|
||||||
|
@ -90,7 +90,7 @@ namespace osu.Game.Updater
|
|||||||
public UpdateCompleteNotification(string version)
|
public UpdateCompleteNotification(string version)
|
||||||
{
|
{
|
||||||
this.version = version;
|
this.version = version;
|
||||||
Text = $"You are now running osu!lazer {version}.\nClick to see what's new!";
|
Text = $"You are now running osu! {version}.\nClick to see what's new!";
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
Loading…
Reference in New Issue
Block a user