mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +08:00
Merge branch 'master' into copy-existing-difficulty
This commit is contained in:
commit
954ae60b81
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@ -20,10 +20,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install .NET 5.0.x
|
- name: Install .NET 6.0.x
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "5.0.x"
|
dotnet-version: "6.0.x"
|
||||||
|
|
||||||
# FIXME: libavformat is not included in Ubuntu. Let's fix that.
|
# FIXME: libavformat is not included in Ubuntu. Let's fix that.
|
||||||
# https://github.com/ppy/osu-framework/issues/4349
|
# https://github.com/ppy/osu-framework/issues/4349
|
||||||
@ -65,10 +65,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --android=11.2
|
$VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --android=11.2
|
||||||
|
|
||||||
- name: Install .NET 5.0.x
|
- name: Install .NET 6.0.x
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "5.0.x"
|
dotnet-version: "6.0.x"
|
||||||
|
|
||||||
# Contrary to seemingly any other msbuild, msbuild running on macOS/Mono
|
# Contrary to seemingly any other msbuild, msbuild running on macOS/Mono
|
||||||
# cannot accept .sln(f) files as arguments.
|
# cannot accept .sln(f) files as arguments.
|
||||||
@ -84,10 +84,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install .NET 5.0.x
|
- name: Install .NET 6.0.x
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "5.0.x"
|
dotnet-version: "6.0.x"
|
||||||
|
|
||||||
# Contrary to seemingly any other msbuild, msbuild running on macOS/Mono
|
# Contrary to seemingly any other msbuild, msbuild running on macOS/Mono
|
||||||
# cannot accept .sln(f) files as arguments.
|
# cannot accept .sln(f) files as arguments.
|
||||||
@ -102,17 +102,17 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# FIXME: Tools won't run in .NET 5.0 unless you install 3.1.x LTS side by side.
|
# FIXME: Tools won't run in .NET 6.0 unless you install 3.1.x LTS side by side.
|
||||||
# https://itnext.io/how-to-support-multiple-net-sdks-in-github-actions-workflows-b988daa884e
|
# https://itnext.io/how-to-support-multiple-net-sdks-in-github-actions-workflows-b988daa884e
|
||||||
- name: Install .NET 3.1.x LTS
|
- name: Install .NET 3.1.x LTS
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "3.1.x"
|
dotnet-version: "3.1.x"
|
||||||
|
|
||||||
- name: Install .NET 5.0.x
|
- name: Install .NET 6.0.x
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "5.0.x"
|
dotnet-version: "6.0.x"
|
||||||
|
|
||||||
- name: Restore Tools
|
- name: Restore Tools
|
||||||
run: dotnet tool restore
|
run: dotnet tool restore
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="osu! (Second Client)" type="DotNetProject" factoryName=".NET Project" folderName="osu!" activateToolWindowBeforeRun="false">
|
<configuration default="false" name="osu! (Second Client)" type="DotNetProject" factoryName=".NET Project" folderName="osu!" activateToolWindowBeforeRun="false">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Desktop/bin/Debug/net5.0/osu!.dll" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/osu.Desktop/bin/Debug/net6.0/osu!.dll" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="--debug-client-id=1" />
|
<option name="PROGRAM_PARAMETERS" value="--debug-client-id=1" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Desktop/bin/Debug/net5.0" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/osu.Desktop/bin/Debug/net6.0" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="USE_MONO" value="0" />
|
<option name="USE_MONO" value="0" />
|
||||||
@ -12,9 +12,9 @@
|
|||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
||||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||||
<option name="PROJECT_TFM" value="net5.0" />
|
<option name="PROJECT_TFM" value="net6.0" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Build" />
|
<option name="Build" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<ItemGroup Label="Code Analysis">
|
<ItemGroup Label="Code Analysis">
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3" PrivateAssets="All" />
|
||||||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CodeAnalysis\BannedSymbols.txt" />
|
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CodeAnalysis\BannedSymbols.txt" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3" PrivateAssets="All" />
|
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Code Analysis">
|
<PropertyGroup Label="Code Analysis">
|
||||||
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodeAnalysis\osu.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodeAnalysis\osu.ruleset</CodeAnalysisRuleSet>
|
||||||
@ -32,13 +32,8 @@
|
|||||||
NU1701:
|
NU1701:
|
||||||
DeepEqual is not netstandard-compatible. This is fine since we run tests with .NET Framework anyway.
|
DeepEqual is not netstandard-compatible. This is fine since we run tests with .NET Framework anyway.
|
||||||
This is required due to https://github.com/NuGet/Home/issues/5740
|
This is required due to https://github.com/NuGet/Home/issues/5740
|
||||||
|
|
||||||
CA9998:
|
|
||||||
Microsoft.CodeAnalysis.FxCopAnalyzers has been deprecated.
|
|
||||||
The entire package will be able to be removed after migrating to .NET 5,
|
|
||||||
as analysers are shipped as part of the .NET 5 SDK anyway.
|
|
||||||
-->
|
-->
|
||||||
<NoWarn>$(NoWarn);NU1701;CA9998</NoWarn>
|
<NoWarn>$(NoWarn);NU1701</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Nuget">
|
<PropertyGroup Label="Nuget">
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
@ -48,7 +48,7 @@ You can see some examples of custom rulesets by visiting the [custom ruleset dir
|
|||||||
|
|
||||||
Please make sure you have the following prerequisites:
|
Please make sure you have the following prerequisites:
|
||||||
|
|
||||||
- A desktop platform with the [.NET 5.0 SDK](https://dotnet.microsoft.com/download) installed.
|
- A desktop platform with the [.NET 6.0 SDK](https://dotnet.microsoft.com/download) installed.
|
||||||
- When developing with mobile, [Xamarin](https://docs.microsoft.com/en-us/xamarin/) is required, which is shipped together with Visual Studio or [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/).
|
- When developing with mobile, [Xamarin](https://docs.microsoft.com/en-us/xamarin/) is required, which is shipped together with Visual Studio or [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/).
|
||||||
- When working with the codebase, we recommend using an IDE with intelligent code completion and syntax highlighting, such as [Visual Studio 2019+](https://visualstudio.microsoft.com/vs/), [JetBrains Rider](https://www.jetbrains.com/rider/) or [Visual Studio Code](https://code.visualstudio.com/).
|
- When working with the codebase, we recommend using an IDE with intelligent code completion and syntax highlighting, such as [Visual Studio 2019+](https://visualstudio.microsoft.com/vs/), [JetBrains Rider](https://www.jetbrains.com/rider/) or [Visual Studio Code](https://code.visualstudio.com/).
|
||||||
- When running on Linux, please have a system-wide FFmpeg installation available to support video decoding.
|
- When running on Linux, please have a system-wide FFmpeg installation available to support video decoding.
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>osu.Game.Rulesets.EmptyFreeform.Tests</RootNamespace>
|
<RootNamespace>osu.Game.Rulesets.EmptyFreeform.Tests</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>osu.Game.Rulesets.Pippidon.Tests</RootNamespace>
|
<RootNamespace>osu.Game.Rulesets.Pippidon.Tests</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>osu.Game.Rulesets.EmptyScrolling.Tests</RootNamespace>
|
<RootNamespace>osu.Game.Rulesets.EmptyScrolling.Tests</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RootNamespace>osu.Game.Rulesets.Pippidon.Tests</RootNamespace>
|
<RootNamespace>osu.Game.Rulesets.Pippidon.Tests</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -52,10 +52,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.204.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.214.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Transitive Dependencies">
|
<ItemGroup Label="Transitive Dependencies">
|
||||||
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
||||||
<PackageReference Include="Realm" Version="10.8.0" />
|
<PackageReference Include="Realm" Version="10.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<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>
|
||||||
@ -26,10 +26,13 @@
|
|||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="Microsoft.NETCore.Targets" Version="5.0.0" />
|
<PackageReference Include="Microsoft.NETCore.Targets" Version="5.0.0" />
|
||||||
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
|
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
|
||||||
<PackageReference Include="System.IO.Packaging" Version="5.0.0" />
|
<PackageReference Include="System.IO.Packaging" Version="6.0.0" />
|
||||||
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.5" />
|
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.5" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.14" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.14">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||||
<PackageReference Include="DiscordRichPresence" Version="1.0.175" />
|
<PackageReference Include="DiscordRichPresence" Version="1.0.175" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -87,8 +87,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
requiresHold |= slider.Ball.IsHovered || h.IsHovered;
|
requiresHold |= slider.Ball.IsHovered || h.IsHovered;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSpinner _:
|
case DrawableSpinner spinner:
|
||||||
requiresHold = true;
|
requiresHold |= spinner.HitObject.SpinsRequired > 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Tests.Online
|
|||||||
selectedItem.Value = new PlaylistItem
|
selectedItem.Value = new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = testBeatmapInfo },
|
Beatmap = { Value = testBeatmapInfo },
|
||||||
Ruleset = { Value = testBeatmapInfo.Ruleset },
|
RulesetID = testBeatmapInfo.Ruleset.OnlineID,
|
||||||
};
|
};
|
||||||
|
|
||||||
Child = availabilityTracker = new OnlinePlayBeatmapAvailabilityTracker
|
Child = availabilityTracker = new OnlinePlayBeatmapAvailabilityTracker
|
||||||
|
BIN
osu.Game.Tests/Resources/client.db
Normal file
BIN
osu.Game.Tests/Resources/client.db
Normal file
Binary file not shown.
@ -19,6 +19,10 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
base.SetUpSteps();
|
base.SetUpSteps();
|
||||||
|
|
||||||
AddAssert("no screen offset applied", () => Game.ScreenOffsetContainer.X == 0f);
|
AddAssert("no screen offset applied", () => Game.ScreenOffsetContainer.X == 0f);
|
||||||
|
|
||||||
|
// avoids mouse interacting with settings overlay.
|
||||||
|
AddStep("move mouse to centre", () => InputManager.MoveMouseTo(Game.ScreenSpaceDrawQuad.Centre));
|
||||||
|
|
||||||
AddUntilStep("wait for overlays", () => Game.Settings.IsLoaded && Game.Notifications.IsLoaded);
|
AddUntilStep("wait for overlays", () => Game.Settings.IsLoaded && Game.Notifications.IsLoaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = InitialBeatmap },
|
Beatmap = { Value = InitialBeatmap },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
@ -17,6 +17,7 @@ using osu.Game.Beatmaps.Drawables;
|
|||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Models;
|
using osu.Game.Models;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
@ -215,25 +216,25 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
ID = 0,
|
ID = 0,
|
||||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
Expired = true,
|
Expired = true,
|
||||||
RequiredMods =
|
RequiredMods = new[]
|
||||||
{
|
{
|
||||||
new OsuModHardRock(),
|
new APIMod(new OsuModHardRock()),
|
||||||
new OsuModDoubleTime(),
|
new APIMod(new OsuModDoubleTime()),
|
||||||
new OsuModAutoplay()
|
new APIMod(new OsuModAutoplay())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
ID = 1,
|
ID = 1,
|
||||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
RequiredMods =
|
RequiredMods = new[]
|
||||||
{
|
{
|
||||||
new OsuModHardRock(),
|
new APIMod(new OsuModHardRock()),
|
||||||
new OsuModDoubleTime(),
|
new APIMod(new OsuModDoubleTime()),
|
||||||
new OsuModAutoplay()
|
new APIMod(new OsuModAutoplay())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -314,12 +315,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
BeatmapSet = new BeatmapSetInfo()
|
BeatmapSet = new BeatmapSetInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
RequiredMods =
|
RequiredMods = new[]
|
||||||
{
|
{
|
||||||
new OsuModHardRock(),
|
new APIMod(new OsuModHardRock()),
|
||||||
new OsuModDoubleTime(),
|
new APIMod(new OsuModDoubleTime()),
|
||||||
new OsuModAutoplay()
|
new APIMod(new OsuModAutoplay())
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -348,12 +349,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
ID = index++,
|
ID = index++,
|
||||||
OwnerID = 2,
|
OwnerID = 2,
|
||||||
Beatmap = { Value = b },
|
Beatmap = { Value = b },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
RequiredMods =
|
RequiredMods = new[]
|
||||||
{
|
{
|
||||||
new OsuModHardRock(),
|
new APIMod(new OsuModHardRock()),
|
||||||
new OsuModDoubleTime(),
|
new APIMod(new OsuModDoubleTime()),
|
||||||
new OsuModAutoplay()
|
new APIMod(new OsuModAutoplay())
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
@ -71,7 +72,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("change queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings
|
AddStep("change queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings
|
||||||
{
|
{
|
||||||
QueueMode = QueueMode.AllPlayers
|
QueueMode = QueueMode.AllPlayers
|
||||||
}));
|
}).WaitSafely());
|
||||||
|
|
||||||
AddUntilStep("api room updated", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
AddUntilStep("api room updated", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
@ -35,12 +36,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
ID = SelectedRoom.Value.Playlist.Count,
|
ID = SelectedRoom.Value.Playlist.Count,
|
||||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
RequiredMods =
|
RequiredMods = new[]
|
||||||
{
|
{
|
||||||
new OsuModHardRock(),
|
new APIMod(new OsuModHardRock()),
|
||||||
new OsuModDoubleTime(),
|
new APIMod(new OsuModDoubleTime()),
|
||||||
new OsuModAutoplay()
|
new APIMod(new OsuModAutoplay())
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ using osu.Framework.Utils;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
@ -99,7 +100,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -235,7 +236,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -257,7 +258,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, API.LocalUser.Value);
|
}, API.LocalUser.Value);
|
||||||
@ -287,7 +288,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, API.LocalUser.Value);
|
}, API.LocalUser.Value);
|
||||||
@ -318,7 +319,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -340,7 +341,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, API.LocalUser.Value);
|
}, API.LocalUser.Value);
|
||||||
@ -373,7 +374,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -393,7 +394,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -415,7 +416,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -454,7 +455,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -493,7 +494,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -532,7 +533,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -566,7 +567,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -606,7 +607,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -626,8 +627,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
AllowedMods = { new OsuModHidden() }
|
AllowedMods = new[] { new APIMod(new OsuModHidden()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -666,7 +667,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -697,7 +698,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, API.LocalUser.Value);
|
}, API.LocalUser.Value);
|
||||||
@ -715,7 +716,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
ID = 2,
|
ID = 2,
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -743,7 +744,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -779,7 +780,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -818,7 +819,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -829,7 +830,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem
|
AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem
|
||||||
{
|
{
|
||||||
BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID
|
BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID
|
||||||
})));
|
})).WaitSafely());
|
||||||
|
|
||||||
AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2);
|
AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2);
|
||||||
|
|
||||||
@ -849,7 +850,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -860,11 +861,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem
|
AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem
|
||||||
{
|
{
|
||||||
BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID
|
BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID
|
||||||
})));
|
})).WaitSafely());
|
||||||
|
|
||||||
AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2);
|
AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2);
|
||||||
|
|
||||||
AddStep("delete item as other user", () => client.RemoveUserPlaylistItem(1234, 2));
|
AddStep("delete item as other user", () => client.RemoveUserPlaylistItem(1234, 2).WaitSafely());
|
||||||
AddUntilStep("item removed from playlist", () => client.Room?.Playlist.Count == 1);
|
AddUntilStep("item removed from playlist", () => client.Room?.Playlist.Count == 1);
|
||||||
|
|
||||||
AddStep("exit gameplay as initial user", () => multiplayerComponents.MultiplayerScreen.MakeCurrent());
|
AddStep("exit gameplay as initial user", () => multiplayerComponents.MultiplayerScreen.MakeCurrent());
|
||||||
@ -882,7 +883,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -10,14 +10,18 @@ using osu.Framework.Platform;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
|
using osu.Game.Overlays.Mods;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
using osu.Game.Rulesets.Taiko;
|
using osu.Game.Rulesets.Taiko;
|
||||||
using osu.Game.Rulesets.Taiko.Mods;
|
using osu.Game.Rulesets.Taiko.Mods;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
using osu.Game.Screens.OnlinePlay.Match;
|
||||||
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
||||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
||||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Participants;
|
using osu.Game.Screens.OnlinePlay.Multiplayer.Participants;
|
||||||
@ -72,7 +76,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -89,8 +93,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(new TaikoRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new TaikoRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new TaikoRuleset().RulesetInfo },
|
RulesetID = new TaikoRuleset().RulesetInfo.OnlineID,
|
||||||
AllowedMods = { new TaikoModSwap() }
|
AllowedMods = new[] { new APIMod(new TaikoModSwap()) }
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -112,7 +116,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -127,7 +131,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First()).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First()).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -149,5 +153,28 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
AddUntilStep("match started", () => Client.Room?.State == MultiplayerRoomState.WaitingForLoad);
|
AddUntilStep("match started", () => Client.Room?.State == MultiplayerRoomState.WaitingForLoad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestFreeModSelectionHasAllowedMods()
|
||||||
|
{
|
||||||
|
AddStep("add playlist item with allowed mod", () =>
|
||||||
|
{
|
||||||
|
SelectedRoom.Value.Playlist.Add(new PlaylistItem
|
||||||
|
{
|
||||||
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
|
AllowedMods = new[] { new APIMod(new OsuModDoubleTime()) }
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
ClickButtonWhenEnabled<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>();
|
||||||
|
|
||||||
|
AddUntilStep("wait for join", () => RoomJoined);
|
||||||
|
|
||||||
|
ClickButtonWhenEnabled<RoomSubScreen.UserModSelectButton>();
|
||||||
|
|
||||||
|
AddUntilStep("mod select contains only double time mod",
|
||||||
|
() => this.ChildrenOfType<UserModSelectOverlay>().SingleOrDefault()?.ChildrenOfType<ModButton>().SingleOrDefault()?.Mod is OsuModDoubleTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
Stack.Push(player = new MultiplayerPlayer(Client.APIRoom, new PlaylistItem
|
Stack.Push(player = new MultiplayerPlayer(Client.APIRoom, new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
||||||
Ruleset = { Value = Beatmap.Value.BeatmapInfo.Ruleset }
|
RulesetID = Beatmap.Value.BeatmapInfo.Ruleset.OnlineID,
|
||||||
}, Client.Room?.Users.ToArray()));
|
}, Client.Room?.Users.ToArray()));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
importedBeatmap = importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0);
|
importedBeatmap = importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("change to all players mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }));
|
AddStep("change to all players mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }).WaitSafely());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -97,19 +97,19 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
addItemStep();
|
addItemStep();
|
||||||
addItemStep();
|
addItemStep();
|
||||||
|
|
||||||
AddStep("finish current item", () => Client.FinishCurrentItem());
|
AddStep("finish current item", () => Client.FinishCurrentItem().WaitSafely());
|
||||||
|
|
||||||
assertItemInHistoryListStep(1, 0);
|
assertItemInHistoryListStep(1, 0);
|
||||||
assertItemInQueueListStep(2, 0);
|
assertItemInQueueListStep(2, 0);
|
||||||
assertItemInQueueListStep(3, 1);
|
assertItemInQueueListStep(3, 1);
|
||||||
|
|
||||||
AddStep("finish current item", () => Client.FinishCurrentItem());
|
AddStep("finish current item", () => Client.FinishCurrentItem().WaitSafely());
|
||||||
|
|
||||||
assertItemInHistoryListStep(2, 0);
|
assertItemInHistoryListStep(2, 0);
|
||||||
assertItemInHistoryListStep(1, 1);
|
assertItemInHistoryListStep(1, 1);
|
||||||
assertItemInQueueListStep(3, 0);
|
assertItemInQueueListStep(3, 0);
|
||||||
|
|
||||||
AddStep("finish current item", () => Client.FinishCurrentItem());
|
AddStep("finish current item", () => Client.FinishCurrentItem().WaitSafely());
|
||||||
|
|
||||||
assertItemInHistoryListStep(3, 0);
|
assertItemInHistoryListStep(3, 0);
|
||||||
assertItemInHistoryListStep(2, 1);
|
assertItemInHistoryListStep(2, 1);
|
||||||
@ -120,7 +120,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
public void TestListsClearedWhenRoomLeft()
|
public void TestListsClearedWhenRoomLeft()
|
||||||
{
|
{
|
||||||
addItemStep();
|
addItemStep();
|
||||||
AddStep("finish current item", () => Client.FinishCurrentItem());
|
AddStep("finish current item", () => Client.FinishCurrentItem().WaitSafely());
|
||||||
|
|
||||||
AddStep("leave room", () => RoomManager.PartRoom());
|
AddStep("leave room", () => RoomManager.PartRoom());
|
||||||
AddUntilStep("wait for room part", () => !RoomJoined);
|
AddUntilStep("wait for room part", () => !RoomJoined);
|
||||||
@ -146,12 +146,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(Ruleset.Value).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(Ruleset.Value).BeatmapInfo },
|
||||||
Ruleset = { Value = Ruleset.Value }
|
RulesetID = Ruleset.Value.OnlineID,
|
||||||
},
|
},
|
||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(Ruleset.Value).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(Ruleset.Value).BeatmapInfo },
|
||||||
Ruleset = { Value = Ruleset.Value },
|
RulesetID = Ruleset.Value.OnlineID,
|
||||||
Expired = true
|
Expired = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,13 +65,13 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
importedBeatmap = importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0);
|
importedBeatmap = importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("change to all players mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }));
|
AddStep("change to all players mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }).WaitSafely());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDeleteButtonAlwaysVisibleForHost()
|
public void TestDeleteButtonAlwaysVisibleForHost()
|
||||||
{
|
{
|
||||||
AddStep("set all players queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }));
|
AddStep("set all players queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }).WaitSafely());
|
||||||
AddUntilStep("wait for queue mode change", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
AddUntilStep("wait for queue mode change", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
||||||
|
|
||||||
addPlaylistItem(() => API.LocalUser.Value.OnlineID);
|
addPlaylistItem(() => API.LocalUser.Value.OnlineID);
|
||||||
@ -83,7 +83,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestDeleteButtonOnlyVisibleForItemOwnerIfNotHost()
|
public void TestDeleteButtonOnlyVisibleForItemOwnerIfNotHost()
|
||||||
{
|
{
|
||||||
AddStep("set all players queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }));
|
AddStep("set all players queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }).WaitSafely());
|
||||||
AddUntilStep("wait for queue mode change", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
AddUntilStep("wait for queue mode change", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
||||||
|
|
||||||
AddStep("join other user", () => Client.AddUser(new APIUser { Id = 1234 }));
|
AddStep("join other user", () => Client.AddUser(new APIUser { Id = 1234 }));
|
||||||
@ -102,7 +102,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestCurrentItemDoesNotHaveDeleteButton()
|
public void TestCurrentItemDoesNotHaveDeleteButton()
|
||||||
{
|
{
|
||||||
AddStep("set all players queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }));
|
AddStep("set all players queue mode", () => Client.ChangeSettings(new MultiplayerRoomSettings { QueueMode = QueueMode.AllPlayers }).WaitSafely());
|
||||||
AddUntilStep("wait for queue mode change", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
AddUntilStep("wait for queue mode change", () => Client.APIRoom?.QueueMode.Value == QueueMode.AllPlayers);
|
||||||
|
|
||||||
addPlaylistItem(() => API.LocalUser.Value.OnlineID);
|
addPlaylistItem(() => API.LocalUser.Value.OnlineID);
|
||||||
@ -110,7 +110,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
assertDeleteButtonVisibility(0, false);
|
assertDeleteButtonVisibility(0, false);
|
||||||
assertDeleteButtonVisibility(1, true);
|
assertDeleteButtonVisibility(1, true);
|
||||||
|
|
||||||
AddStep("finish current item", () => Client.FinishCurrentItem());
|
AddStep("finish current item", () => Client.FinishCurrentItem().WaitSafely());
|
||||||
AddUntilStep("wait for next item to be selected", () => Client.Room?.Settings.PlaylistItemId == 2);
|
AddUntilStep("wait for next item to be selected", () => Client.Room?.Settings.PlaylistItemId == 2);
|
||||||
AddUntilStep("wait for two items in playlist", () => playlist.ChildrenOfType<DrawableRoomPlaylistItem>().Count() == 2);
|
AddUntilStep("wait for two items in playlist", () => playlist.ChildrenOfType<DrawableRoomPlaylistItem>().Count() == 2);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
BeatmapID = importedBeatmap.OnlineID,
|
BeatmapID = importedBeatmap.OnlineID,
|
||||||
});
|
});
|
||||||
|
|
||||||
Client.AddUserPlaylistItem(userId(), item);
|
Client.AddUserPlaylistItem(userId(), item).WaitSafely();
|
||||||
|
|
||||||
itemId = item.ID;
|
itemId = item.ID;
|
||||||
});
|
});
|
||||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
selectedItem.Value = new PlaylistItem
|
selectedItem.Value = new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
||||||
Ruleset = { Value = Beatmap.Value.BeatmapInfo.Ruleset },
|
RulesetID = Beatmap.Value.BeatmapInfo.Ruleset.OnlineID
|
||||||
};
|
};
|
||||||
|
|
||||||
if (button != null)
|
if (button != null)
|
||||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
selectedItem.Value = new PlaylistItem
|
selectedItem.Value = new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
||||||
Ruleset = { Value = Beatmap.Value.BeatmapInfo.Ruleset },
|
RulesetID = Beatmap.Value.BeatmapInfo.Ruleset.OnlineID,
|
||||||
};
|
};
|
||||||
|
|
||||||
Child = new FillFlowContainer
|
Child = new FillFlowContainer
|
||||||
|
@ -13,6 +13,7 @@ using osu.Game.Beatmaps.Drawables;
|
|||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Models;
|
using osu.Game.Models;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
@ -161,12 +162,12 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
BeatmapSet = new BeatmapSetInfo()
|
BeatmapSet = new BeatmapSetInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID,
|
||||||
RequiredMods =
|
RequiredMods = new[]
|
||||||
{
|
{
|
||||||
new OsuModHardRock(),
|
new APIMod(new OsuModHardRock()),
|
||||||
new OsuModDoubleTime(),
|
new APIMod(new OsuModDoubleTime()),
|
||||||
new OsuModAutoplay()
|
new APIMod(new OsuModAutoplay())
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -115,8 +115,17 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("change mod rate", () => ((OsuModDoubleTime)SelectedMods.Value[0]).SpeedChange.Value = 2);
|
AddStep("change mod rate", () => ((OsuModDoubleTime)SelectedMods.Value[0]).SpeedChange.Value = 2);
|
||||||
AddStep("create item", () => songSelect.BeatmapDetails.CreateNewItem());
|
AddStep("create item", () => songSelect.BeatmapDetails.CreateNewItem());
|
||||||
|
|
||||||
AddAssert("item 1 has rate 1.5", () => Precision.AlmostEquals(1.5, ((OsuModDoubleTime)SelectedRoom.Value.Playlist.First().RequiredMods[0]).SpeedChange.Value));
|
AddAssert("item 1 has rate 1.5", () =>
|
||||||
AddAssert("item 2 has rate 2", () => Precision.AlmostEquals(2, ((OsuModDoubleTime)SelectedRoom.Value.Playlist.Last().RequiredMods[0]).SpeedChange.Value));
|
{
|
||||||
|
var mod = (OsuModDoubleTime)SelectedRoom.Value.Playlist.First().RequiredMods[0].ToMod(new OsuRuleset());
|
||||||
|
return Precision.AlmostEquals(1.5, mod.SpeedChange.Value);
|
||||||
|
});
|
||||||
|
|
||||||
|
AddAssert("item 2 has rate 2", () =>
|
||||||
|
{
|
||||||
|
var mod = (OsuModDoubleTime)SelectedRoom.Value.Playlist.Last().RequiredMods[0].ToMod(new OsuRuleset());
|
||||||
|
return Precision.AlmostEquals(2, mod.SpeedChange.Value);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -138,7 +147,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("create item", () => songSelect.BeatmapDetails.CreateNewItem());
|
AddStep("create item", () => songSelect.BeatmapDetails.CreateNewItem());
|
||||||
|
|
||||||
AddStep("change stored mod rate", () => mod.SpeedChange.Value = 2);
|
AddStep("change stored mod rate", () => mod.SpeedChange.Value = 2);
|
||||||
AddAssert("item has rate 1.5", () => Precision.AlmostEquals(1.5, ((OsuModDoubleTime)SelectedRoom.Value.Playlist.First().RequiredMods[0]).SpeedChange.Value));
|
AddAssert("item has rate 1.5", () =>
|
||||||
|
{
|
||||||
|
var m = (OsuModDoubleTime)SelectedRoom.Value.Playlist.First().RequiredMods[0].ToMod(new OsuRuleset());
|
||||||
|
return Precision.AlmostEquals(1.5, m.SpeedChange.Value);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestPlaylistsSongSelect : PlaylistsSongSelect
|
private class TestPlaylistsSongSelect : PlaylistsSongSelect
|
||||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -95,7 +95,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -133,7 +133,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -143,7 +143,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("change match type", () => client.ChangeSettings(new MultiplayerRoomSettings
|
AddStep("change match type", () => client.ChangeSettings(new MultiplayerRoomSettings
|
||||||
{
|
{
|
||||||
MatchType = MatchType.TeamVersus
|
MatchType = MatchType.TeamVersus
|
||||||
}));
|
}).WaitSafely());
|
||||||
|
|
||||||
AddUntilStep("api room updated to team versus", () => client.APIRoom?.Type.Value == MatchType.TeamVersus);
|
AddUntilStep("api room updated to team versus", () => client.APIRoom?.Type.Value == MatchType.TeamVersus);
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
Beatmap = { Value = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo },
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
43
osu.Game.Tests/Visual/Navigation/TestEFToRealmMigration.cs
Normal file
43
osu.Game.Tests/Visual/Navigation/TestEFToRealmMigration.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Database;
|
||||||
|
using osu.Game.Models;
|
||||||
|
using osu.Game.Scoring;
|
||||||
|
using osu.Game.Skinning;
|
||||||
|
using osu.Game.Tests.Resources;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.Navigation
|
||||||
|
{
|
||||||
|
public class TestEFToRealmMigration : OsuGameTestScene
|
||||||
|
{
|
||||||
|
public override void RecycleLocalStorage(bool isDisposing)
|
||||||
|
{
|
||||||
|
base.RecycleLocalStorage(isDisposing);
|
||||||
|
|
||||||
|
if (isDisposing)
|
||||||
|
return;
|
||||||
|
|
||||||
|
using (var outStream = LocalStorage.GetStream(DatabaseContextFactory.DATABASE_NAME, FileAccess.Write, FileMode.Create))
|
||||||
|
using (var stream = TestResources.OpenResource(DatabaseContextFactory.DATABASE_NAME))
|
||||||
|
stream.CopyTo(outStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestMigration()
|
||||||
|
{
|
||||||
|
// Numbers are taken from the test database (see commit f03de16ee5a46deac3b5f2ca1edfba5c4c5dca7d).
|
||||||
|
AddAssert("Check beatmaps", () => Game.Dependencies.Get<RealmAccess>().Run(r => r.All<BeatmapSetInfo>().Count(s => !s.Protected) == 1));
|
||||||
|
AddAssert("Check skins", () => Game.Dependencies.Get<RealmAccess>().Run(r => r.All<SkinInfo>().Count(s => !s.Protected) == 1));
|
||||||
|
AddAssert("Check scores", () => Game.Dependencies.Get<RealmAccess>().Run(r => r.All<ScoreInfo>().Count() == 1));
|
||||||
|
|
||||||
|
// One extra file is created during realm migration / startup due to the circles intro import.
|
||||||
|
AddAssert("Check files", () => Game.Dependencies.Get<RealmAccess>().Run(r => r.All<RealmFile>().Count() == 271));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -168,7 +168,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
LoadScreen(resultsScreen = new TestResultsScreen(getScore?.Invoke(), 1, new PlaylistItem
|
LoadScreen(resultsScreen = new TestResultsScreen(getScore?.Invoke(), 1, new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(new OsuRuleset().RulesetInfo).BeatmapInfo },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
Beatmap = { Value = importedBeatmap.Beatmaps.First() },
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
RulesetID = new OsuRuleset().RulesetInfo.OnlineID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -0,0 +1,158 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Overlays.Settings.Sections;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
|
{
|
||||||
|
public class TestSceneExpandingContainer : OsuManualInputManagerTestScene
|
||||||
|
{
|
||||||
|
private TestExpandingContainer container;
|
||||||
|
private SettingsToolboxGroup toolboxGroup;
|
||||||
|
|
||||||
|
private ExpandableSlider<float, SizeSlider> slider1;
|
||||||
|
private ExpandableSlider<double> slider2;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void SetUp() => Schedule(() =>
|
||||||
|
{
|
||||||
|
Child = container = new TestExpandingContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Height = 0.33f,
|
||||||
|
Child = toolboxGroup = new SettingsToolboxGroup("sliders")
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Width = 1,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
slider1 = new ExpandableSlider<float, SizeSlider>
|
||||||
|
{
|
||||||
|
Current = new BindableFloat
|
||||||
|
{
|
||||||
|
Default = 1.0f,
|
||||||
|
MinValue = 1.0f,
|
||||||
|
MaxValue = 10.0f,
|
||||||
|
Precision = 0.01f,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
slider2 = new ExpandableSlider<double>
|
||||||
|
{
|
||||||
|
Current = new BindableDouble
|
||||||
|
{
|
||||||
|
Default = 1.0,
|
||||||
|
MinValue = 1.0,
|
||||||
|
MaxValue = 10.0,
|
||||||
|
Precision = 0.01,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
slider1.Current.BindValueChanged(v =>
|
||||||
|
{
|
||||||
|
slider1.ExpandedLabelText = $"Slider One ({v.NewValue:0.##x})";
|
||||||
|
slider1.ContractedLabelText = $"S. 1. ({v.NewValue:0.##x})";
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
slider2.Current.BindValueChanged(v =>
|
||||||
|
{
|
||||||
|
slider2.ExpandedLabelText = $"Slider Two ({v.NewValue:N2})";
|
||||||
|
slider2.ContractedLabelText = $"S. 2. ({v.NewValue:N2})";
|
||||||
|
}, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestDisplay()
|
||||||
|
{
|
||||||
|
AddStep("switch to contracted", () => container.Expanded.Value = false);
|
||||||
|
AddStep("switch to expanded", () => container.Expanded.Value = true);
|
||||||
|
AddStep("set left origin", () => container.Origin = Anchor.CentreLeft);
|
||||||
|
AddStep("set centre origin", () => container.Origin = Anchor.Centre);
|
||||||
|
AddStep("set right origin", () => container.Origin = Anchor.CentreRight);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tests hovering expands the container and does not contract until hover is lost.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestHoveringExpandsContainer()
|
||||||
|
{
|
||||||
|
AddAssert("ensure container contracted", () => !container.Expanded.Value);
|
||||||
|
|
||||||
|
AddStep("hover container", () => InputManager.MoveMouseTo(container));
|
||||||
|
AddAssert("container expanded", () => container.Expanded.Value);
|
||||||
|
AddAssert("controls expanded", () => slider1.Expanded.Value && slider2.Expanded.Value);
|
||||||
|
|
||||||
|
AddStep("hover away", () => InputManager.MoveMouseTo(Vector2.Zero));
|
||||||
|
AddAssert("container contracted", () => !container.Expanded.Value);
|
||||||
|
AddAssert("controls contracted", () => !slider1.Expanded.Value && !slider2.Expanded.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tests expanding a container will expand underlying groups if contracted.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestExpandingContainerExpandsContractedGroup()
|
||||||
|
{
|
||||||
|
AddStep("contract group", () => toolboxGroup.Expanded.Value = false);
|
||||||
|
|
||||||
|
AddStep("expand container", () => container.Expanded.Value = true);
|
||||||
|
AddAssert("group expanded", () => toolboxGroup.Expanded.Value);
|
||||||
|
AddAssert("controls expanded", () => slider1.Expanded.Value && slider2.Expanded.Value);
|
||||||
|
|
||||||
|
AddStep("contract container", () => container.Expanded.Value = false);
|
||||||
|
AddAssert("group contracted", () => !toolboxGroup.Expanded.Value);
|
||||||
|
AddAssert("controls contracted", () => !slider1.Expanded.Value && !slider2.Expanded.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tests contracting a container does not contract underlying groups if expanded by user (i.e. by setting <see cref="SettingsToolboxGroup.Expanded"/> directly).
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestContractingContainerDoesntContractUserExpandedGroup()
|
||||||
|
{
|
||||||
|
AddAssert("ensure group expanded", () => toolboxGroup.Expanded.Value);
|
||||||
|
|
||||||
|
AddStep("expand container", () => container.Expanded.Value = true);
|
||||||
|
AddAssert("group still expanded", () => toolboxGroup.Expanded.Value);
|
||||||
|
AddAssert("controls expanded", () => slider1.Expanded.Value && slider2.Expanded.Value);
|
||||||
|
|
||||||
|
AddStep("contract container", () => container.Expanded.Value = false);
|
||||||
|
AddAssert("group still expanded", () => toolboxGroup.Expanded.Value);
|
||||||
|
AddAssert("controls contracted", () => !slider1.Expanded.Value && !slider2.Expanded.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tests expanding a container via <see cref="ExpandingContainer.Expanded"/> does not get contracted by losing hover.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestExpandingContainerDoesntGetContractedByHover()
|
||||||
|
{
|
||||||
|
AddStep("expand container", () => container.Expanded.Value = true);
|
||||||
|
|
||||||
|
AddStep("hover container", () => InputManager.MoveMouseTo(container));
|
||||||
|
AddAssert("container still expanded", () => container.Expanded.Value);
|
||||||
|
|
||||||
|
AddStep("hover away", () => InputManager.MoveMouseTo(Vector2.Zero));
|
||||||
|
AddAssert("container still expanded", () => container.Expanded.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TestExpandingContainer : ExpandingContainer
|
||||||
|
{
|
||||||
|
public TestExpandingContainer()
|
||||||
|
: base(120, 250)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Code Analysis">
|
<PropertyGroup Label="Code Analysis">
|
||||||
<CodeAnalysisRuleSet>tests.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>tests.ruleset</CodeAnalysisRuleSet>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
||||||
@ -20,4 +20,4 @@
|
|||||||
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
||||||
<ProjectReference Include="..\osu.Game.Tournament\osu.Game.Tournament.csproj" />
|
<ProjectReference Include="..\osu.Game.Tournament\osu.Game.Tournament.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -215,7 +215,8 @@ namespace osu.Game.Database
|
|||||||
.Include(s => s.Beatmaps).ThenInclude(b => b.Metadata)
|
.Include(s => s.Beatmaps).ThenInclude(b => b.Metadata)
|
||||||
.Include(s => s.Beatmaps).ThenInclude(b => b.BaseDifficulty)
|
.Include(s => s.Beatmaps).ThenInclude(b => b.BaseDifficulty)
|
||||||
.Include(s => s.Files).ThenInclude(f => f.FileInfo)
|
.Include(s => s.Files).ThenInclude(f => f.FileInfo)
|
||||||
.Include(s => s.Metadata);
|
.Include(s => s.Metadata)
|
||||||
|
.AsSplitQuery();
|
||||||
|
|
||||||
log("Beginning beatmaps migration to realm");
|
log("Beginning beatmaps migration to realm");
|
||||||
|
|
||||||
@ -344,7 +345,8 @@ namespace osu.Game.Database
|
|||||||
.Include(s => s.Ruleset)
|
.Include(s => s.Ruleset)
|
||||||
.Include(s => s.BeatmapInfo)
|
.Include(s => s.BeatmapInfo)
|
||||||
.Include(s => s.Files)
|
.Include(s => s.Files)
|
||||||
.ThenInclude(f => f.FileInfo);
|
.ThenInclude(f => f.FileInfo)
|
||||||
|
.AsSplitQuery();
|
||||||
|
|
||||||
log("Beginning scores migration to realm");
|
log("Beginning scores migration to realm");
|
||||||
|
|
||||||
@ -434,6 +436,7 @@ namespace osu.Game.Database
|
|||||||
var existingSkins = db.SkinInfo
|
var existingSkins = db.SkinInfo
|
||||||
.Include(s => s.Files)
|
.Include(s => s.Files)
|
||||||
.ThenInclude(f => f.FileInfo)
|
.ThenInclude(f => f.FileInfo)
|
||||||
|
.AsSplitQuery()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
// previous entries in EF are removed post migration.
|
// previous entries in EF are removed post migration.
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
using osu.Game.IO.Archives;
|
using osu.Game.IO.Archives;
|
||||||
using osu.Game.Stores;
|
using osu.Game.Stores;
|
||||||
using osu.Game.Utils;
|
using osu.Game.Utils;
|
||||||
@ -63,9 +64,7 @@ namespace osu.Game.Database
|
|||||||
if (!(stream is MemoryStream memoryStream))
|
if (!(stream is MemoryStream memoryStream))
|
||||||
{
|
{
|
||||||
// This isn't used in any current path. May need to reconsider for performance reasons (ie. if we don't expect the incoming stream to be copied out).
|
// This isn't used in any current path. May need to reconsider for performance reasons (ie. if we don't expect the incoming stream to be copied out).
|
||||||
byte[] buffer = new byte[stream.Length];
|
memoryStream = new MemoryStream(stream.ReadAllBytesToArray());
|
||||||
stream.Read(buffer, 0, (int)stream.Length);
|
|
||||||
memoryStream = new MemoryStream(buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ZipUtils.IsZipArchive(memoryStream))
|
if (ZipUtils.IsZipArchive(memoryStream))
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Statistics;
|
using osu.Framework.Statistics;
|
||||||
@ -12,8 +11,9 @@ using osu.Game.Configuration;
|
|||||||
using osu.Game.IO;
|
using osu.Game.IO;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
using SQLitePCL;
|
||||||
|
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
@ -40,10 +40,10 @@ namespace osu.Game.Database
|
|||||||
static OsuDbContext()
|
static OsuDbContext()
|
||||||
{
|
{
|
||||||
// required to initialise native SQLite libraries on some platforms.
|
// required to initialise native SQLite libraries on some platforms.
|
||||||
SQLitePCL.Batteries_V2.Init();
|
Batteries_V2.Init();
|
||||||
|
|
||||||
// https://github.com/aspnet/EntityFrameworkCore/issues/9994#issuecomment-508588678
|
// https://github.com/aspnet/EntityFrameworkCore/issues/9994#issuecomment-508588678
|
||||||
SQLitePCL.raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/);
|
raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -116,7 +116,6 @@ namespace osu.Game.Database
|
|||||||
optionsBuilder
|
optionsBuilder
|
||||||
// this is required for the time being due to the way we are querying in places like BeatmapStore.
|
// this is required for the time being due to the way we are querying in places like BeatmapStore.
|
||||||
// if we ever move to having consumers file their own .Includes, or get eager loading support, this could be re-enabled.
|
// if we ever move to having consumers file their own .Includes, or get eager loading support, this could be re-enabled.
|
||||||
.ConfigureWarnings(warnings => warnings.Ignore(CoreEventId.IncludeIgnoredWarning))
|
|
||||||
.UseSqlite(connectionString, sqliteOptions => sqliteOptions.CommandTimeout(10))
|
.UseSqlite(connectionString, sqliteOptions => sqliteOptions.CommandTimeout(10))
|
||||||
.UseLoggerFactory(logger.Value);
|
.UseLoggerFactory(logger.Value);
|
||||||
}
|
}
|
||||||
|
21
osu.Game/Graphics/Containers/ExpandingButtonContainer.cs
Normal file
21
osu.Game/Graphics/Containers/ExpandingButtonContainer.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.Containers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An <see cref="ExpandingContainer"/> with a long hover expansion delay.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Mostly used for buttons with explanatory labels, in which the label would display after a "long hover".
|
||||||
|
/// </remarks>
|
||||||
|
public class ExpandingButtonContainer : ExpandingContainer
|
||||||
|
{
|
||||||
|
protected ExpandingButtonContainer(float contractedWidth, float expandedWidth)
|
||||||
|
: base(contractedWidth, expandedWidth)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double HoverExpansionDelay => 400;
|
||||||
|
}
|
||||||
|
}
|
100
osu.Game/Graphics/Containers/ExpandingContainer.cs
Normal file
100
osu.Game/Graphics/Containers/ExpandingContainer.cs
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Framework.Threading;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.Containers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a <see cref="Container"/> with the ability to expand/contract on hover.
|
||||||
|
/// </summary>
|
||||||
|
public class ExpandingContainer : Container, IExpandingContainer
|
||||||
|
{
|
||||||
|
private readonly float contractedWidth;
|
||||||
|
private readonly float expandedWidth;
|
||||||
|
|
||||||
|
public BindableBool Expanded { get; } = new BindableBool();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delay before the container switches to expanded state from hover.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual double HoverExpansionDelay => 0;
|
||||||
|
|
||||||
|
protected override Container<Drawable> Content => FillFlow;
|
||||||
|
|
||||||
|
protected FillFlowContainer FillFlow { get; }
|
||||||
|
|
||||||
|
protected ExpandingContainer(float contractedWidth, float expandedWidth)
|
||||||
|
{
|
||||||
|
this.contractedWidth = contractedWidth;
|
||||||
|
this.expandedWidth = expandedWidth;
|
||||||
|
|
||||||
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
Width = contractedWidth;
|
||||||
|
|
||||||
|
InternalChild = new OsuScrollContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
ScrollbarVisible = false,
|
||||||
|
Child = FillFlow = new FillFlowContainer
|
||||||
|
{
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private ScheduledDelegate hoverExpandEvent;
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
Expanded.BindValueChanged(v =>
|
||||||
|
{
|
||||||
|
this.ResizeWidthTo(v.NewValue ? expandedWidth : contractedWidth, 500, Easing.OutQuint);
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnHover(HoverEvent e)
|
||||||
|
{
|
||||||
|
updateHoverExpansion();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
|
{
|
||||||
|
updateHoverExpansion();
|
||||||
|
return base.OnMouseMove(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
|
{
|
||||||
|
if (hoverExpandEvent != null)
|
||||||
|
{
|
||||||
|
hoverExpandEvent?.Cancel();
|
||||||
|
hoverExpandEvent = null;
|
||||||
|
|
||||||
|
Expanded.Value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnHoverLost(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateHoverExpansion()
|
||||||
|
{
|
||||||
|
hoverExpandEvent?.Cancel();
|
||||||
|
|
||||||
|
if (IsHovered && !Expanded.Value)
|
||||||
|
hoverExpandEvent = Scheduler.AddDelayed(() => Expanded.Value = true, HoverExpansionDelay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
osu.Game/Graphics/Containers/IExpandable.cs
Normal file
19
osu.Game/Graphics/Containers/IExpandable.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.Containers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An interface for drawables with ability to expand/contract.
|
||||||
|
/// </summary>
|
||||||
|
public interface IExpandable : IDrawable
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this drawable is in an expanded state.
|
||||||
|
/// </summary>
|
||||||
|
BindableBool Expanded { get; }
|
||||||
|
}
|
||||||
|
}
|
16
osu.Game/Graphics/Containers/IExpandingContainer.cs
Normal file
16
osu.Game/Graphics/Containers/IExpandingContainer.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.Containers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A target expanding container that should be resolved by children <see cref="IExpandable"/>s to propagate state changes.
|
||||||
|
/// </summary>
|
||||||
|
[Cached(typeof(IExpandingContainer))]
|
||||||
|
public interface IExpandingContainer : IContainer, IExpandable
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
126
osu.Game/Graphics/UserInterface/ExpandableSlider.cs
Normal file
126
osu.Game/Graphics/UserInterface/ExpandableSlider.cs
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Graphics.UserInterface
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An <see cref="IExpandable"/> implementation for the UI slider bar control.
|
||||||
|
/// </summary>
|
||||||
|
public class ExpandableSlider<T, TSlider> : CompositeDrawable, IExpandable, IHasCurrentValue<T>
|
||||||
|
where T : struct, IEquatable<T>, IComparable<T>, IConvertible
|
||||||
|
where TSlider : OsuSliderBar<T>, new()
|
||||||
|
{
|
||||||
|
private readonly OsuSpriteText label;
|
||||||
|
private readonly TSlider slider;
|
||||||
|
|
||||||
|
private LocalisableString contractedLabelText;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The label text to display when this slider is in a contracted state.
|
||||||
|
/// </summary>
|
||||||
|
public LocalisableString ContractedLabelText
|
||||||
|
{
|
||||||
|
get => contractedLabelText;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == contractedLabelText)
|
||||||
|
return;
|
||||||
|
|
||||||
|
contractedLabelText = value;
|
||||||
|
|
||||||
|
if (!Expanded.Value)
|
||||||
|
label.Text = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private LocalisableString expandedLabelText;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The label text to display when this slider is in an expanded state.
|
||||||
|
/// </summary>
|
||||||
|
public LocalisableString ExpandedLabelText
|
||||||
|
{
|
||||||
|
get => expandedLabelText;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == expandedLabelText)
|
||||||
|
return;
|
||||||
|
|
||||||
|
expandedLabelText = value;
|
||||||
|
|
||||||
|
if (Expanded.Value)
|
||||||
|
label.Text = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bindable<T> Current
|
||||||
|
{
|
||||||
|
get => slider.Current;
|
||||||
|
set => slider.Current = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBool Expanded { get; } = new BindableBool();
|
||||||
|
|
||||||
|
public override bool HandlePositionalInput => true;
|
||||||
|
|
||||||
|
public ExpandableSlider()
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
|
InternalChild = new FillFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Spacing = new Vector2(0f, 10f),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
label = new OsuSpriteText(),
|
||||||
|
slider = new TSlider
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
[Resolved(canBeNull: true)]
|
||||||
|
private IExpandingContainer expandingContainer { get; set; }
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
expandingContainer?.Expanded.BindValueChanged(containerExpanded =>
|
||||||
|
{
|
||||||
|
Expanded.Value = containerExpanded.NewValue;
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
Expanded.BindValueChanged(v =>
|
||||||
|
{
|
||||||
|
label.Text = v.NewValue ? expandedLabelText : contractedLabelText;
|
||||||
|
slider.FadeTo(v.NewValue ? 1f : 0f, 500, Easing.OutQuint);
|
||||||
|
slider.BypassAutoSizeAxes = !v.NewValue ? Axes.Y : Axes.None;
|
||||||
|
}, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An <see cref="IExpandable"/> implementation for the UI slider bar control.
|
||||||
|
/// </summary>
|
||||||
|
public class ExpandableSlider<T> : ExpandableSlider<T, OsuSliderBar<T>>
|
||||||
|
where T : struct, IEquatable<T>, IComparable<T>, IConvertible
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -114,7 +114,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
|
|
||||||
private class CircularBorderContainer : CircularContainer
|
private class CircularBorderContainer : CircularContainer
|
||||||
{
|
{
|
||||||
public void TransformBorderTo(SRGBColour colour)
|
public void TransformBorderTo(ColourInfo colour)
|
||||||
=> this.TransformTo(nameof(BorderColour), colour, 250, Easing.OutQuint);
|
=> this.TransformTo(nameof(BorderColour), colour, 250, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.IO.Stores;
|
using osu.Framework.IO.Stores;
|
||||||
|
|
||||||
namespace osu.Game.IO.Archives
|
namespace osu.Game.IO.Archives
|
||||||
@ -35,14 +36,7 @@ namespace osu.Game.IO.Archives
|
|||||||
public virtual byte[] Get(string name)
|
public virtual byte[] Get(string name)
|
||||||
{
|
{
|
||||||
using (Stream input = GetStream(name))
|
using (Stream input = GetStream(name))
|
||||||
{
|
return input?.ReadAllBytesToArray();
|
||||||
if (input == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
byte[] buffer = new byte[input.Length];
|
|
||||||
input.Read(buffer);
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<byte[]> GetAsync(string name, CancellationToken cancellationToken = default)
|
public async Task<byte[]> GetAsync(string name, CancellationToken cancellationToken = default)
|
||||||
@ -52,9 +46,7 @@ namespace osu.Game.IO.Archives
|
|||||||
if (input == null)
|
if (input == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
byte[] buffer = new byte[input.Length];
|
return await input.ReadAllBytesToArrayAsync(cancellationToken).ConfigureAwait(false);
|
||||||
await input.ReadAsync(buffer, cancellationToken).ConfigureAwait(false);
|
|
||||||
return buffer;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -727,30 +727,18 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
RoomUpdated?.Invoke();
|
RoomUpdated?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlaylistItem createPlaylistItem(MultiplayerPlaylistItem item)
|
private PlaylistItem createPlaylistItem(MultiplayerPlaylistItem item) => new PlaylistItem
|
||||||
{
|
{
|
||||||
var ruleset = Rulesets.GetRuleset(item.RulesetID);
|
ID = item.ID,
|
||||||
|
BeatmapID = item.BeatmapID,
|
||||||
Debug.Assert(ruleset != null);
|
OwnerID = item.OwnerID,
|
||||||
|
RulesetID = item.RulesetID,
|
||||||
var rulesetInstance = ruleset.CreateInstance();
|
Expired = item.Expired,
|
||||||
|
PlaylistOrder = item.PlaylistOrder,
|
||||||
var playlistItem = new PlaylistItem
|
PlayedAt = item.PlayedAt,
|
||||||
{
|
RequiredMods = item.RequiredMods.ToArray(),
|
||||||
ID = item.ID,
|
AllowedMods = item.AllowedMods.ToArray()
|
||||||
BeatmapID = item.BeatmapID,
|
};
|
||||||
OwnerID = item.OwnerID,
|
|
||||||
Ruleset = { Value = ruleset },
|
|
||||||
Expired = item.Expired,
|
|
||||||
PlaylistOrder = item.PlaylistOrder,
|
|
||||||
PlayedAt = item.PlayedAt
|
|
||||||
};
|
|
||||||
|
|
||||||
playlistItem.RequiredMods.AddRange(item.RequiredMods.Select(m => m.ToMod(rulesetInstance)));
|
|
||||||
playlistItem.AllowedMods.AddRange(item.AllowedMods.Select(m => m.ToMod(rulesetInstance)));
|
|
||||||
|
|
||||||
return playlistItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves a <see cref="APIBeatmap"/> from an online source.
|
/// Retrieves a <see cref="APIBeatmap"/> from an online source.
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.SignalR.Client;
|
using Microsoft.AspNetCore.SignalR.Client;
|
||||||
@ -79,6 +80,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.FromCanceled<MultiplayerRoom>(new CancellationToken(true));
|
return Task.FromCanceled<MultiplayerRoom>(new CancellationToken(true));
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync<MultiplayerRoom>(nameof(IMultiplayerServer.JoinRoomWithPassword), roomId, password ?? string.Empty);
|
return connection.InvokeAsync<MultiplayerRoom>(nameof(IMultiplayerServer.JoinRoomWithPassword), roomId, password ?? string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +90,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.FromCanceled(new CancellationToken(true));
|
return Task.FromCanceled(new CancellationToken(true));
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.LeaveRoom));
|
return connection.InvokeAsync(nameof(IMultiplayerServer.LeaveRoom));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +100,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.TransferHost), userId);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.TransferHost), userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +110,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.KickUser), userId);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.KickUser), userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,6 +120,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeSettings), settings);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeSettings), settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,6 +130,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeState), newState);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeState), newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,6 +140,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeBeatmapAvailability), newBeatmapAvailability);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeBeatmapAvailability), newBeatmapAvailability);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,6 +150,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeUserMods), newMods);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeUserMods), newMods);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +160,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.SendMatchRequest), request);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.SendMatchRequest), request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +170,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.StartMatch));
|
return connection.InvokeAsync(nameof(IMultiplayerServer.StartMatch));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,6 +180,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.AbortGameplay));
|
return connection.InvokeAsync(nameof(IMultiplayerServer.AbortGameplay));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,6 +190,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.AddPlaylistItem), item);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.AddPlaylistItem), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,6 +200,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.EditPlaylistItem), item);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.EditPlaylistItem), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +210,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.InvokeAsync(nameof(IMultiplayerServer.RemovePlaylistItem), playlistItemId);
|
return connection.InvokeAsync(nameof(IMultiplayerServer.RemovePlaylistItem), playlistItemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@ namespace osu.Game.Online.Rooms
|
|||||||
BeatmapID = item.BeatmapID;
|
BeatmapID = item.BeatmapID;
|
||||||
BeatmapChecksum = item.Beatmap.Value?.MD5Hash ?? string.Empty;
|
BeatmapChecksum = item.Beatmap.Value?.MD5Hash ?? string.Empty;
|
||||||
RulesetID = item.RulesetID;
|
RulesetID = item.RulesetID;
|
||||||
RequiredMods = item.RequiredMods.Select(m => new APIMod(m)).ToArray();
|
RequiredMods = item.RequiredMods.ToArray();
|
||||||
AllowedMods = item.AllowedMods.Select(m => new APIMod(m)).ToArray();
|
AllowedMods = item.AllowedMods.ToArray();
|
||||||
Expired = item.Expired;
|
Expired = item.Expired;
|
||||||
PlaylistOrder = item.PlaylistOrder ?? 0;
|
PlaylistOrder = item.PlaylistOrder ?? 0;
|
||||||
PlayedAt = item.PlayedAt;
|
PlayedAt = item.PlayedAt;
|
||||||
|
@ -65,7 +65,11 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
public ScoreInfo CreateScoreInfo(RulesetStore rulesets, PlaylistItem playlistItem, [NotNull] BeatmapInfo beatmap)
|
public ScoreInfo CreateScoreInfo(RulesetStore rulesets, PlaylistItem playlistItem, [NotNull] BeatmapInfo beatmap)
|
||||||
{
|
{
|
||||||
var rulesetInstance = playlistItem.Ruleset.Value.CreateInstance();
|
var ruleset = rulesets.GetRuleset(playlistItem.RulesetID);
|
||||||
|
if (ruleset == null)
|
||||||
|
throw new InvalidOperationException($"Couldn't create score with unknown ruleset: {playlistItem.RulesetID}");
|
||||||
|
|
||||||
|
var rulesetInstance = ruleset.CreateInstance();
|
||||||
|
|
||||||
var scoreInfo = new ScoreInfo
|
var scoreInfo = new ScoreInfo
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@ -10,8 +9,6 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Rulesets;
|
|
||||||
using osu.Game.Rulesets.Mods;
|
|
||||||
|
|
||||||
namespace osu.Game.Online.Rooms
|
namespace osu.Game.Online.Rooms
|
||||||
{
|
{
|
||||||
@ -49,68 +46,25 @@ namespace osu.Game.Online.Rooms
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public readonly Bindable<IBeatmapInfo> Beatmap = new Bindable<IBeatmapInfo>();
|
public readonly Bindable<IBeatmapInfo> Beatmap = new Bindable<IBeatmapInfo>();
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<IRulesetInfo> Ruleset = new Bindable<IRulesetInfo>();
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public readonly BindableList<Mod> AllowedMods = new BindableList<Mod>();
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
|
|
||||||
|
|
||||||
[JsonProperty("beatmap")]
|
[JsonProperty("beatmap")]
|
||||||
private APIBeatmap apiBeatmap { get; set; }
|
private APIBeatmap apiBeatmap { get; set; }
|
||||||
|
|
||||||
private APIMod[] allowedModsBacking;
|
|
||||||
|
|
||||||
[JsonProperty("allowed_mods")]
|
[JsonProperty("allowed_mods")]
|
||||||
private APIMod[] allowedMods
|
public APIMod[] AllowedMods { get; set; } = Array.Empty<APIMod>();
|
||||||
{
|
|
||||||
get => AllowedMods.Select(m => new APIMod(m)).ToArray();
|
|
||||||
set => allowedModsBacking = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private APIMod[] requiredModsBacking;
|
|
||||||
|
|
||||||
[JsonProperty("required_mods")]
|
[JsonProperty("required_mods")]
|
||||||
private APIMod[] requiredMods
|
public APIMod[] RequiredMods { get; set; } = Array.Empty<APIMod>();
|
||||||
{
|
|
||||||
get => RequiredMods.Select(m => new APIMod(m)).ToArray();
|
|
||||||
set => requiredModsBacking = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public PlaylistItem()
|
public PlaylistItem()
|
||||||
{
|
{
|
||||||
Beatmap.BindValueChanged(beatmap => BeatmapID = beatmap.NewValue?.OnlineID ?? -1);
|
Beatmap.BindValueChanged(beatmap => BeatmapID = beatmap.NewValue?.OnlineID ?? -1);
|
||||||
Ruleset.BindValueChanged(ruleset => RulesetID = ruleset.NewValue?.OnlineID ?? 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MarkInvalid() => valid.Value = false;
|
public void MarkInvalid() => valid.Value = false;
|
||||||
|
|
||||||
public void MapObjects(IRulesetStore rulesets)
|
public void MapObjects()
|
||||||
{
|
{
|
||||||
Beatmap.Value ??= apiBeatmap;
|
Beatmap.Value ??= apiBeatmap;
|
||||||
Ruleset.Value ??= rulesets.GetRuleset(RulesetID);
|
|
||||||
|
|
||||||
Debug.Assert(Ruleset.Value != null);
|
|
||||||
|
|
||||||
Ruleset rulesetInstance = Ruleset.Value.CreateInstance();
|
|
||||||
|
|
||||||
if (allowedModsBacking != null)
|
|
||||||
{
|
|
||||||
AllowedMods.Clear();
|
|
||||||
AllowedMods.AddRange(allowedModsBacking.Select(m => m.ToMod(rulesetInstance)));
|
|
||||||
|
|
||||||
allowedModsBacking = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (requiredModsBacking != null)
|
|
||||||
{
|
|
||||||
RequiredMods.Clear();
|
|
||||||
RequiredMods.AddRange(requiredModsBacking.Select(m => m.ToMod(rulesetInstance)));
|
|
||||||
|
|
||||||
requiredModsBacking = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Newtonsoft.Json implicit ShouldSerialize() methods
|
#region Newtonsoft.Json implicit ShouldSerialize() methods
|
||||||
@ -133,7 +87,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
&& BeatmapID == other.BeatmapID
|
&& BeatmapID == other.BeatmapID
|
||||||
&& RulesetID == other.RulesetID
|
&& RulesetID == other.RulesetID
|
||||||
&& Expired == other.Expired
|
&& Expired == other.Expired
|
||||||
&& allowedMods.SequenceEqual(other.allowedMods)
|
&& AllowedMods.SequenceEqual(other.AllowedMods)
|
||||||
&& requiredMods.SequenceEqual(other.requiredMods);
|
&& RequiredMods.SequenceEqual(other.RequiredMods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.SignalR.Client;
|
using Microsoft.AspNetCore.SignalR.Client;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -51,6 +52,8 @@ namespace osu.Game.Online.Spectator
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.SendAsync(nameof(ISpectatorServer.BeginPlaySession), state);
|
return connection.SendAsync(nameof(ISpectatorServer.BeginPlaySession), state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +62,8 @@ namespace osu.Game.Online.Spectator
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.SendAsync(nameof(ISpectatorServer.SendFrameData), data);
|
return connection.SendAsync(nameof(ISpectatorServer.SendFrameData), data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,6 +72,8 @@ namespace osu.Game.Online.Spectator
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.SendAsync(nameof(ISpectatorServer.EndPlaySession), state);
|
return connection.SendAsync(nameof(ISpectatorServer.EndPlaySession), state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,6 +82,8 @@ namespace osu.Game.Online.Spectator
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.SendAsync(nameof(ISpectatorServer.StartWatchingUser), userId);
|
return connection.SendAsync(nameof(ISpectatorServer.StartWatchingUser), userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,6 +92,8 @@ namespace osu.Game.Online.Spectator
|
|||||||
if (!IsConnected.Value)
|
if (!IsConnected.Value)
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
|
Debug.Assert(connection != null);
|
||||||
|
|
||||||
return connection.SendAsync(nameof(ISpectatorServer.EndWatchingUser), userId);
|
return connection.SendAsync(nameof(ISpectatorServer.EndWatchingUser), userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,141 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using osu.Framework;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Input.Events;
|
|
||||||
using osu.Framework.Testing;
|
|
||||||
using osu.Framework.Threading;
|
|
||||||
using osu.Game.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
|
||||||
{
|
|
||||||
public abstract class ExpandingButtonContainer : Container, IStateful<ExpandedState>
|
|
||||||
{
|
|
||||||
private readonly float contractedWidth;
|
|
||||||
private readonly float expandedWidth;
|
|
||||||
|
|
||||||
public event Action<ExpandedState> StateChanged;
|
|
||||||
|
|
||||||
protected override Container<Drawable> Content => FillFlow;
|
|
||||||
|
|
||||||
protected FillFlowContainer FillFlow { get; }
|
|
||||||
|
|
||||||
protected ExpandingButtonContainer(float contractedWidth, float expandedWidth)
|
|
||||||
{
|
|
||||||
this.contractedWidth = contractedWidth;
|
|
||||||
this.expandedWidth = expandedWidth;
|
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Y;
|
|
||||||
Width = contractedWidth;
|
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
|
||||||
{
|
|
||||||
new SidebarScrollContainer
|
|
||||||
{
|
|
||||||
Children = new[]
|
|
||||||
{
|
|
||||||
FillFlow = new FillFlowContainer
|
|
||||||
{
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Direction = FillDirection.Vertical,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private ScheduledDelegate expandEvent;
|
|
||||||
private ExpandedState state;
|
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
|
||||||
{
|
|
||||||
queueExpandIfHovering();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
|
||||||
{
|
|
||||||
expandEvent?.Cancel();
|
|
||||||
hoveredButton = null;
|
|
||||||
State = ExpandedState.Contracted;
|
|
||||||
|
|
||||||
base.OnHoverLost(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
|
||||||
{
|
|
||||||
queueExpandIfHovering();
|
|
||||||
return base.OnMouseMove(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class SidebarScrollContainer : OsuScrollContainer
|
|
||||||
{
|
|
||||||
public SidebarScrollContainer()
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
|
||||||
ScrollbarVisible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExpandedState State
|
|
||||||
{
|
|
||||||
get => state;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
expandEvent?.Cancel();
|
|
||||||
|
|
||||||
if (state == value) return;
|
|
||||||
|
|
||||||
state = value;
|
|
||||||
|
|
||||||
switch (state)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
this.ResizeTo(new Vector2(contractedWidth, Height), 500, Easing.OutQuint);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ExpandedState.Expanded:
|
|
||||||
this.ResizeTo(new Vector2(expandedWidth, Height), 500, Easing.OutQuint);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
StateChanged?.Invoke(State);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Drawable hoveredButton;
|
|
||||||
|
|
||||||
private void queueExpandIfHovering()
|
|
||||||
{
|
|
||||||
// if the same button is hovered, let the scheduled expand play out..
|
|
||||||
if (hoveredButton?.IsHovered == true)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// ..otherwise check whether a new button is hovered, and if so, queue a new hover operation.
|
|
||||||
|
|
||||||
// usually we wouldn't use ChildrenOfType in implementations, but this is the simplest way
|
|
||||||
// to handle cases like the editor where the buttons may be nested within a child hierarchy.
|
|
||||||
hoveredButton = FillFlow.ChildrenOfType<OsuButton>().FirstOrDefault(c => c.IsHovered);
|
|
||||||
|
|
||||||
expandEvent?.Cancel();
|
|
||||||
|
|
||||||
if (hoveredButton?.IsHovered == true && State != ExpandedState.Expanded)
|
|
||||||
expandEvent = Scheduler.AddDelayed(() => State = ExpandedState.Expanded, 750);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ExpandedState
|
|
||||||
{
|
|
||||||
Contracted,
|
|
||||||
Expanded,
|
|
||||||
}
|
|
||||||
}
|
|
@ -183,7 +183,8 @@ namespace osu.Game.Overlays.Login
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (form != null) GetContainingInputManager()?.ChangeFocus(form);
|
if (form != null)
|
||||||
|
ScheduleAfterChildren(() => GetContainingInputManager()?.ChangeFocus(form));
|
||||||
});
|
});
|
||||||
|
|
||||||
public override bool AcceptsFocus => true;
|
public override bool AcceptsFocus => true;
|
||||||
|
@ -78,7 +78,7 @@ namespace osu.Game.Overlays
|
|||||||
panel.Bounding = true;
|
panel.Bounding = true;
|
||||||
this.FadeIn(transition_time, Easing.OutQuint);
|
this.FadeIn(transition_time, Easing.OutQuint);
|
||||||
|
|
||||||
GetContainingInputManager().ChangeFocus(panel);
|
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(panel));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
{
|
{
|
||||||
|
@ -265,7 +265,7 @@ namespace osu.Game.Overlays
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SectionsContainer.ScrollTo(section);
|
SectionsContainer.ScrollTo(section);
|
||||||
Sidebar.State = ExpandedState.Contracted;
|
Sidebar.Expanded.Value = false;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Caching;
|
using osu.Framework.Caching;
|
||||||
using osu.Framework.Extensions.EnumExtensions;
|
using osu.Framework.Extensions.EnumExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -11,6 +12,7 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Layout;
|
using osu.Framework.Layout;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -18,7 +20,7 @@ using osuTK.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public abstract class SettingsToolboxGroup : Container
|
public class SettingsToolboxGroup : Container, IExpandable
|
||||||
{
|
{
|
||||||
private const float transition_duration = 250;
|
private const float transition_duration = 250;
|
||||||
private const int container_width = 270;
|
private const int container_width = 270;
|
||||||
@ -34,30 +36,7 @@ namespace osu.Game.Overlays
|
|||||||
private readonly FillFlowContainer content;
|
private readonly FillFlowContainer content;
|
||||||
private readonly IconButton button;
|
private readonly IconButton button;
|
||||||
|
|
||||||
private bool expanded = true;
|
public BindableBool Expanded { get; } = new BindableBool(true);
|
||||||
|
|
||||||
public bool Expanded
|
|
||||||
{
|
|
||||||
get => expanded;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (expanded == value) return;
|
|
||||||
|
|
||||||
expanded = value;
|
|
||||||
|
|
||||||
content.ClearTransforms();
|
|
||||||
|
|
||||||
if (expanded)
|
|
||||||
content.AutoSizeAxes = Axes.Y;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
content.AutoSizeAxes = Axes.None;
|
|
||||||
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateExpanded();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Color4 expandedColour;
|
private Color4 expandedColour;
|
||||||
|
|
||||||
@ -67,7 +46,7 @@ namespace osu.Game.Overlays
|
|||||||
/// Create a new instance.
|
/// Create a new instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="title">The title to be displayed in the header of this group.</param>
|
/// <param name="title">The title to be displayed in the header of this group.</param>
|
||||||
protected SettingsToolboxGroup(string title)
|
public SettingsToolboxGroup(string title)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
Width = container_width;
|
Width = container_width;
|
||||||
@ -115,7 +94,7 @@ namespace osu.Game.Overlays
|
|||||||
Position = new Vector2(-15, 0),
|
Position = new Vector2(-15, 0),
|
||||||
Icon = FontAwesome.Solid.Bars,
|
Icon = FontAwesome.Solid.Bars,
|
||||||
Scale = new Vector2(0.75f),
|
Scale = new Vector2(0.75f),
|
||||||
Action = () => Expanded = !Expanded,
|
Action = () => Expanded.Toggle(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -155,23 +134,58 @@ namespace osu.Game.Overlays
|
|||||||
headerText.FadeTo(headerText.DrawWidth < DrawWidth ? 1 : 0, 150, Easing.OutQuint);
|
headerText.FadeTo(headerText.DrawWidth < DrawWidth ? 1 : 0, 150, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Resolved(canBeNull: true)]
|
||||||
|
private IExpandingContainer expandingContainer { get; set; }
|
||||||
|
|
||||||
|
private bool expandedByContainer;
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
this.Delay(600).FadeTo(inactive_alpha, fade_duration, Easing.OutQuint);
|
expandingContainer?.Expanded.BindValueChanged(containerExpanded =>
|
||||||
updateExpanded();
|
{
|
||||||
|
if (containerExpanded.NewValue && !Expanded.Value)
|
||||||
|
{
|
||||||
|
Expanded.Value = true;
|
||||||
|
expandedByContainer = true;
|
||||||
|
}
|
||||||
|
else if (!containerExpanded.NewValue && expandedByContainer)
|
||||||
|
{
|
||||||
|
Expanded.Value = false;
|
||||||
|
expandedByContainer = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateActiveState();
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
Expanded.BindValueChanged(v =>
|
||||||
|
{
|
||||||
|
content.ClearTransforms();
|
||||||
|
|
||||||
|
if (v.NewValue)
|
||||||
|
content.AutoSizeAxes = Axes.Y;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
content.AutoSizeAxes = Axes.None;
|
||||||
|
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
|
button.FadeColour(Expanded.Value ? expandedColour : Color4.White, 200, Easing.InOutQuint);
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
this.Delay(600).Schedule(updateActiveState);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
{
|
{
|
||||||
this.FadeIn(fade_duration, Easing.OutQuint);
|
updateActiveState();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
{
|
{
|
||||||
this.FadeTo(inactive_alpha, fade_duration, Easing.OutQuint);
|
updateActiveState();
|
||||||
base.OnHoverLost(e);
|
base.OnHoverLost(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +195,10 @@ namespace osu.Game.Overlays
|
|||||||
expandedColour = colours.Yellow;
|
expandedColour = colours.Yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateExpanded() => button.FadeColour(expanded ? expandedColour : Color4.White, 200, Easing.InOutQuint);
|
private void updateActiveState()
|
||||||
|
{
|
||||||
|
this.FadeTo(IsHovered || expandingContainer?.Expanded.Value == true ? 1 : inactive_alpha, fade_duration, Easing.OutQuint);
|
||||||
|
}
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
|
@ -79,13 +79,13 @@ namespace osu.Game.Overlays.Volume
|
|||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
{
|
{
|
||||||
Content.TransformTo<Container<Drawable>, SRGBColour>("BorderColour", hoveredColour, 500, Easing.OutQuint);
|
Content.TransformTo<Container<Drawable>, ColourInfo>("BorderColour", hoveredColour, 500, Easing.OutQuint);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
{
|
{
|
||||||
Content.TransformTo<Container<Drawable>, SRGBColour>("BorderColour", unhoveredColour, 500, Easing.OutQuint);
|
Content.TransformTo<Container<Drawable>, ColourInfo>("BorderColour", unhoveredColour, 500, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ using osu.Framework.Input;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Rulesets.Configuration;
|
using osu.Game.Rulesets.Configuration;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(ArtistTextBox.Current.Value))
|
if (string.IsNullOrEmpty(ArtistTextBox.Current.Value))
|
||||||
GetContainingInputManager().ChangeFocus(ArtistTextBox);
|
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(ArtistTextBox));
|
||||||
|
|
||||||
ArtistTextBox.Current.BindValueChanged(artist => transferIfRomanised(artist.NewValue, RomanisedArtistTextBox));
|
ArtistTextBox.Current.BindValueChanged(artist => transferIfRomanised(artist.NewValue, RomanisedArtistTextBox));
|
||||||
TitleTextBox.Current.BindValueChanged(title => transferIfRomanised(title.NewValue, RomanisedTitleTextBox));
|
TitleTextBox.Current.BindValueChanged(title => transferIfRomanised(title.NewValue, RomanisedTitleTextBox));
|
||||||
|
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Beatmaps.Drawables;
|
using osu.Game.Beatmaps.Drawables;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Components
|
namespace osu.Game.Screens.OnlinePlay.Components
|
||||||
@ -15,6 +16,9 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
private const float height = 28;
|
private const float height = 28;
|
||||||
private const float transition_duration = 100;
|
private const float transition_duration = 100;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private RulesetStore rulesets { get; set; }
|
||||||
|
|
||||||
private Container drawableRuleset;
|
private Container drawableRuleset;
|
||||||
|
|
||||||
public ModeTypeInfo()
|
public ModeTypeInfo()
|
||||||
@ -56,11 +60,14 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
private void updateBeatmap()
|
private void updateBeatmap()
|
||||||
{
|
{
|
||||||
var item = Playlist.FirstOrDefault();
|
var item = Playlist.FirstOrDefault();
|
||||||
|
var ruleset = item == null ? null : rulesets.GetRuleset(item.RulesetID)?.CreateInstance();
|
||||||
|
|
||||||
if (item?.Beatmap != null)
|
if (item?.Beatmap != null && ruleset != null)
|
||||||
{
|
{
|
||||||
|
var mods = item.RequiredMods.Select(m => m.ToMod(ruleset)).ToArray();
|
||||||
|
|
||||||
drawableRuleset.FadeIn(transition_duration);
|
drawableRuleset.FadeIn(transition_duration);
|
||||||
drawableRuleset.Child = new DifficultyIcon(item.Beatmap.Value, item.Ruleset.Value, item.RequiredMods) { Size = new Vector2(height) };
|
drawableRuleset.Child = new DifficultyIcon(item.Beatmap.Value, ruleset.RulesetInfo, mods) { Size = new Vector2(height) };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
drawableRuleset.FadeOut(transition_duration);
|
drawableRuleset.FadeOut(transition_duration);
|
||||||
|
@ -12,7 +12,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Components
|
namespace osu.Game.Screens.OnlinePlay.Components
|
||||||
{
|
{
|
||||||
@ -27,9 +26,6 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
protected IBindable<Room> JoinedRoom => joinedRoom;
|
protected IBindable<Room> JoinedRoom => joinedRoom;
|
||||||
private readonly Bindable<Room> joinedRoom = new Bindable<Room>();
|
private readonly Bindable<Room> joinedRoom = new Bindable<Room>();
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private IRulesetStore rulesets { get; set; }
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
@ -117,7 +113,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach (var pi in room.Playlist)
|
foreach (var pi in room.Playlist)
|
||||||
pi.MapObjects(rulesets);
|
pi.MapObjects();
|
||||||
|
|
||||||
var existing = rooms.FirstOrDefault(e => e.RoomID.Value == room.RoomID.Value);
|
var existing = rooms.FirstOrDefault(e => e.RoomID.Value == room.RoomID.Value);
|
||||||
if (existing == null)
|
if (existing == null)
|
||||||
|
@ -69,8 +69,9 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
private readonly DelayedLoadWrapper onScreenLoader = new DelayedLoadWrapper(Empty) { RelativeSizeAxes = Axes.Both };
|
private readonly DelayedLoadWrapper onScreenLoader = new DelayedLoadWrapper(Empty) { RelativeSizeAxes = Axes.Both };
|
||||||
private readonly IBindable<bool> valid = new Bindable<bool>();
|
private readonly IBindable<bool> valid = new Bindable<bool>();
|
||||||
private readonly Bindable<IBeatmapInfo> beatmap = new Bindable<IBeatmapInfo>();
|
private readonly Bindable<IBeatmapInfo> beatmap = new Bindable<IBeatmapInfo>();
|
||||||
private readonly Bindable<IRulesetInfo> ruleset = new Bindable<IRulesetInfo>();
|
|
||||||
private readonly BindableList<Mod> requiredMods = new BindableList<Mod>();
|
private IRulesetInfo ruleset;
|
||||||
|
private Mod[] requiredMods;
|
||||||
|
|
||||||
private Container maskingContainer;
|
private Container maskingContainer;
|
||||||
private Container difficultyIconContainer;
|
private Container difficultyIconContainer;
|
||||||
@ -86,6 +87,9 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
private PanelBackground panelBackground;
|
private PanelBackground panelBackground;
|
||||||
private FillFlowContainer mainFillFlow;
|
private FillFlowContainer mainFillFlow;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private RulesetStore rulesets { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuColour colours { get; set; }
|
private OsuColour colours { get; set; }
|
||||||
|
|
||||||
@ -108,8 +112,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
beatmap.BindTo(item.Beatmap);
|
beatmap.BindTo(item.Beatmap);
|
||||||
valid.BindTo(item.Valid);
|
valid.BindTo(item.Valid);
|
||||||
ruleset.BindTo(item.Ruleset);
|
|
||||||
requiredMods.BindTo(item.RequiredMods);
|
|
||||||
|
|
||||||
if (item.Expired)
|
if (item.Expired)
|
||||||
Colour = OsuColour.Gray(0.5f);
|
Colour = OsuColour.Gray(0.5f);
|
||||||
@ -119,6 +121,11 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
maskingContainer.BorderColour = colours.Yellow;
|
maskingContainer.BorderColour = colours.Yellow;
|
||||||
|
|
||||||
|
ruleset = rulesets.GetRuleset(Item.RulesetID);
|
||||||
|
var rulesetInstance = ruleset?.CreateInstance();
|
||||||
|
|
||||||
|
requiredMods = Item.RequiredMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -145,9 +152,7 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
beatmap.BindValueChanged(_ => Scheduler.AddOnce(refresh));
|
beatmap.BindValueChanged(_ => Scheduler.AddOnce(refresh));
|
||||||
ruleset.BindValueChanged(_ => Scheduler.AddOnce(refresh));
|
|
||||||
valid.BindValueChanged(_ => Scheduler.AddOnce(refresh));
|
valid.BindValueChanged(_ => Scheduler.AddOnce(refresh));
|
||||||
requiredMods.CollectionChanged += (_, __) => Scheduler.AddOnce(refresh);
|
|
||||||
|
|
||||||
onScreenLoader.DelayedLoadStarted += _ =>
|
onScreenLoader.DelayedLoadStarted += _ =>
|
||||||
{
|
{
|
||||||
@ -276,7 +281,7 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Item.Beatmap.Value != null)
|
if (Item.Beatmap.Value != null)
|
||||||
difficultyIconContainer.Child = new DifficultyIcon(Item.Beatmap.Value, ruleset.Value, requiredMods, performBackgroundDifficultyLookup: false) { Size = new Vector2(icon_height) };
|
difficultyIconContainer.Child = new DifficultyIcon(Item.Beatmap.Value, ruleset, requiredMods, performBackgroundDifficultyLookup: false) { Size = new Vector2(icon_height) };
|
||||||
else
|
else
|
||||||
difficultyIconContainer.Clear();
|
difficultyIconContainer.Clear();
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Extensions;
|
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
@ -78,7 +77,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
{
|
{
|
||||||
bool matchingFilter = true;
|
bool matchingFilter = true;
|
||||||
|
|
||||||
matchingFilter &= r.Room.Playlist.Count == 0 || criteria.Ruleset == null || r.Room.Playlist.Any(i => i.Ruleset.Value.MatchesOnlineID(criteria.Ruleset));
|
matchingFilter &= r.Room.Playlist.Count == 0 || criteria.Ruleset == null || r.Room.Playlist.Any(i => i.RulesetID == criteria.Ruleset.OnlineID);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(criteria.SearchString))
|
if (!string.IsNullOrEmpty(criteria.SearchString))
|
||||||
matchingFilter &= r.FilterTerms.Any(term => term.Contains(criteria.SearchString, StringComparison.InvariantCultureIgnoreCase));
|
matchingFilter &= r.FilterTerms.Any(term => term.Contains(criteria.SearchString, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
@ -246,7 +246,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
Schedule(() => GetContainingInputManager().ChangeFocus(passwordTextBox));
|
ScheduleAfterChildren(() => GetContainingInputManager().ChangeFocus(passwordTextBox));
|
||||||
passwordTextBox.OnCommit += (_, __) => performJoin();
|
passwordTextBox.OnCommit += (_, __) => performJoin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -350,10 +351,12 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
if (selected == null)
|
if (selected == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
var rulesetInstance = rulesets.GetRuleset(SelectedItem.Value.RulesetID)?.CreateInstance();
|
||||||
|
Debug.Assert(rulesetInstance != null);
|
||||||
|
var allowedMods = SelectedItem.Value.AllowedMods.Select(m => m.ToMod(rulesetInstance));
|
||||||
|
|
||||||
// Remove any user mods that are no longer allowed.
|
// Remove any user mods that are no longer allowed.
|
||||||
UserMods.Value = UserMods.Value
|
UserMods.Value = UserMods.Value.Where(m => allowedMods.Any(a => m.GetType() == a.GetType())).ToList();
|
||||||
.Where(m => selected.AllowedMods.Any(a => m.GetType() == a.GetType()))
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
UpdateMods();
|
UpdateMods();
|
||||||
updateRuleset();
|
updateRuleset();
|
||||||
@ -367,7 +370,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
UserModsSection?.Show();
|
UserModsSection?.Show();
|
||||||
userModsSelectOverlay.IsValidMod = m => selected.AllowedMods.Any(a => a.GetType() == m.GetType());
|
userModsSelectOverlay.IsValidMod = m => allowedMods.Any(a => a.GetType() == m.GetType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,7 +389,9 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
if (SelectedItem.Value == null || !this.IsCurrentScreen())
|
if (SelectedItem.Value == null || !this.IsCurrentScreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Mods.Value = UserMods.Value.Concat(SelectedItem.Value.RequiredMods).ToList();
|
var rulesetInstance = rulesets.GetRuleset(SelectedItem.Value.RulesetID)?.CreateInstance();
|
||||||
|
Debug.Assert(rulesetInstance != null);
|
||||||
|
Mods.Value = UserMods.Value.Concat(SelectedItem.Value.RequiredMods.Select(m => m.ToMod(rulesetInstance))).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateRuleset()
|
private void updateRuleset()
|
||||||
|
@ -11,7 +11,6 @@ using osu.Framework.Logging;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.API;
|
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
@ -71,8 +70,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
BeatmapID = item.BeatmapID,
|
BeatmapID = item.BeatmapID,
|
||||||
BeatmapChecksum = item.Beatmap.Value.MD5Hash,
|
BeatmapChecksum = item.Beatmap.Value.MD5Hash,
|
||||||
RulesetID = item.RulesetID,
|
RulesetID = item.RulesetID,
|
||||||
RequiredMods = item.RequiredMods.Select(m => new APIMod(m)).ToArray(),
|
RequiredMods = item.RequiredMods.ToArray(),
|
||||||
AllowedMods = item.AllowedMods.Select(m => new APIMod(m)).ToArray()
|
AllowedMods = item.AllowedMods.ToArray()
|
||||||
};
|
};
|
||||||
|
|
||||||
Task task = itemToEdit != null ? client.EditPlaylistItem(multiplayerItem) : client.AddPlaylistItem(multiplayerItem);
|
Task task = itemToEdit != null ? client.EditPlaylistItem(multiplayerItem) : client.AddPlaylistItem(multiplayerItem);
|
||||||
|
@ -247,7 +247,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
// update local mods based on room's reported status for the local user (omitting the base call implementation).
|
// update local mods based on room's reported status for the local user (omitting the base call implementation).
|
||||||
// this makes the server authoritative, and avoids the local user potentially setting mods that the server is not aware of (ie. if the match was started during the selection being changed).
|
// this makes the server authoritative, and avoids the local user potentially setting mods that the server is not aware of (ie. if the match was started during the selection being changed).
|
||||||
var ruleset = Ruleset.Value.CreateInstance();
|
var ruleset = Ruleset.Value.CreateInstance();
|
||||||
Mods.Value = client.LocalUser.Mods.Select(m => m.ToMod(ruleset)).Concat(SelectedItem.Value.RequiredMods).ToList();
|
Mods.Value = client.LocalUser.Mods.Select(m => m.ToMod(ruleset)).Concat(SelectedItem.Value.RequiredMods.Select(m => m.ToMod(ruleset))).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
|
@ -12,6 +12,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Overlays.Mods;
|
using osu.Game.Overlays.Mods;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
@ -37,6 +38,9 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
protected IBindable<PlaylistItem> SelectedItem { get; private set; }
|
protected IBindable<PlaylistItem> SelectedItem { get; private set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private RulesetStore rulesets { get; set; }
|
||||||
|
|
||||||
protected override UserActivity InitialActivity => new UserActivity.InLobby(room);
|
protected override UserActivity InitialActivity => new UserActivity.InLobby(room);
|
||||||
|
|
||||||
protected readonly Bindable<IReadOnlyList<Mod>> FreeMods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
protected readonly Bindable<IReadOnlyList<Mod>> FreeMods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
||||||
@ -78,10 +82,15 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
// At this point, Mods contains both the required and allowed mods. For selection purposes, it should only contain the required mods.
|
var rulesetInstance = SelectedItem?.Value?.RulesetID == null ? null : rulesets.GetRuleset(SelectedItem.Value.RulesetID)?.CreateInstance();
|
||||||
// Similarly, freeMods is currently empty but should only contain the allowed mods.
|
|
||||||
Mods.Value = SelectedItem?.Value?.RequiredMods.Select(m => m.DeepClone()).ToArray() ?? Array.Empty<Mod>();
|
if (rulesetInstance != null)
|
||||||
FreeMods.Value = SelectedItem?.Value?.AllowedMods.Select(m => m.DeepClone()).ToArray() ?? Array.Empty<Mod>();
|
{
|
||||||
|
// At this point, Mods contains both the required and allowed mods. For selection purposes, it should only contain the required mods.
|
||||||
|
// Similarly, freeMods is currently empty but should only contain the allowed mods.
|
||||||
|
Mods.Value = SelectedItem.Value.RequiredMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||||
|
FreeMods.Value = SelectedItem.Value.AllowedMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
Mods.BindValueChanged(onModsChanged);
|
Mods.BindValueChanged(onModsChanged);
|
||||||
Ruleset.BindValueChanged(onRulesetChanged);
|
Ruleset.BindValueChanged(onRulesetChanged);
|
||||||
@ -110,15 +119,11 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
{
|
{
|
||||||
Value = Beatmap.Value.BeatmapInfo
|
Value = Beatmap.Value.BeatmapInfo
|
||||||
},
|
},
|
||||||
Ruleset =
|
RulesetID = Ruleset.Value.OnlineID,
|
||||||
{
|
RequiredMods = Mods.Value.Select(m => new APIMod(m)).ToArray(),
|
||||||
Value = Ruleset.Value
|
AllowedMods = FreeMods.Value.Select(m => new APIMod(m)).ToArray()
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
item.RequiredMods.AddRange(Mods.Value.Select(m => m.DeepClone()));
|
|
||||||
item.AllowedMods.AddRange(FreeMods.Value.Select(m => m.DeepClone()));
|
|
||||||
|
|
||||||
SelectItem(item);
|
SelectItem(item);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
@ -36,10 +37,11 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
if (!Beatmap.Value.BeatmapInfo.MatchesOnlineID(PlaylistItem.Beatmap.Value))
|
if (!Beatmap.Value.BeatmapInfo.MatchesOnlineID(PlaylistItem.Beatmap.Value))
|
||||||
throw new InvalidOperationException("Current Beatmap does not match PlaylistItem's Beatmap");
|
throw new InvalidOperationException("Current Beatmap does not match PlaylistItem's Beatmap");
|
||||||
|
|
||||||
if (!ruleset.Value.MatchesOnlineID(PlaylistItem.Ruleset.Value))
|
if (ruleset.Value.OnlineID != PlaylistItem.RulesetID)
|
||||||
throw new InvalidOperationException("Current Ruleset does not match PlaylistItem's Ruleset");
|
throw new InvalidOperationException("Current Ruleset does not match PlaylistItem's Ruleset");
|
||||||
|
|
||||||
if (!PlaylistItem.RequiredMods.All(m => Mods.Value.Any(m.Equals)))
|
var localMods = Mods.Value.Select(m => new APIMod(m)).ToArray();
|
||||||
|
if (!PlaylistItem.RequiredMods.All(m => localMods.Any(m.Equals)))
|
||||||
throw new InvalidOperationException("Current Mods do not match PlaylistItem's RequiredMods");
|
throw new InvalidOperationException("Current Mods do not match PlaylistItem's RequiredMods");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay.Components;
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
@ -30,7 +31,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
populateItemFromCurrent(Playlist.Single());
|
Playlist.Clear();
|
||||||
|
createNewItem();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,24 +43,14 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
{
|
{
|
||||||
PlaylistItem item = new PlaylistItem
|
PlaylistItem item = new PlaylistItem
|
||||||
{
|
{
|
||||||
ID = Playlist.Count == 0 ? 0 : Playlist.Max(p => p.ID) + 1
|
ID = Playlist.Count == 0 ? 0 : Playlist.Max(p => p.ID) + 1,
|
||||||
|
Beatmap = { Value = Beatmap.Value.BeatmapInfo },
|
||||||
|
RulesetID = Ruleset.Value.OnlineID,
|
||||||
|
RequiredMods = Mods.Value.Select(m => new APIMod(m)).ToArray(),
|
||||||
|
AllowedMods = FreeMods.Value.Select(m => new APIMod(m)).ToArray()
|
||||||
};
|
};
|
||||||
|
|
||||||
populateItemFromCurrent(item);
|
|
||||||
|
|
||||||
Playlist.Add(item);
|
Playlist.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateItemFromCurrent(PlaylistItem item)
|
|
||||||
{
|
|
||||||
item.Beatmap.Value = Beatmap.Value.BeatmapInfo;
|
|
||||||
item.Ruleset.Value = Ruleset.Value;
|
|
||||||
|
|
||||||
item.RequiredMods.Clear();
|
|
||||||
item.RequiredMods.AddRange(Mods.Value.Select(m => m.DeepClone()));
|
|
||||||
|
|
||||||
item.AllowedMods.Clear();
|
|
||||||
item.AllowedMods.AddRange(FreeMods.Value.Select(m => m.DeepClone()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
//CollectionSettings = new CollectionSettings(),
|
//CollectionSettings = new CollectionSettings(),
|
||||||
//DiscussionSettings = new DiscussionSettings(),
|
//DiscussionSettings = new DiscussionSettings(),
|
||||||
PlaybackSettings = new PlaybackSettings(),
|
PlaybackSettings = new PlaybackSettings(),
|
||||||
VisualSettings = new VisualSettings { Expanded = false }
|
VisualSettings = new VisualSettings { Expanded = { Value = false } }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
new PlaylistItem
|
new PlaylistItem
|
||||||
{
|
{
|
||||||
Beatmap = { Value = new TestBeatmap(Ruleset.Value).BeatmapInfo },
|
Beatmap = { Value = new TestBeatmap(Ruleset.Value).BeatmapInfo },
|
||||||
Ruleset = { Value = Ruleset.Value }
|
RulesetID = Ruleset.Value.OnlineID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
|||||||
{
|
{
|
||||||
room.Playlist.Add(new PlaylistItem
|
room.Playlist.Add(new PlaylistItem
|
||||||
{
|
{
|
||||||
Ruleset = { Value = ruleset },
|
RulesetID = ruleset.OnlineID,
|
||||||
Beatmap =
|
Beatmap =
|
||||||
{
|
{
|
||||||
Value = new BeatmapInfo
|
Value = new BeatmapInfo
|
||||||
|
@ -18,27 +18,27 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="AutoMapper" Version="11.0.0" />
|
<PackageReference Include="AutoMapper" Version="11.0.1" />
|
||||||
<PackageReference Include="DiffPlex" Version="1.7.0" />
|
<PackageReference Include="DiffPlex" Version="1.7.0" />
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.40" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.11.42" />
|
||||||
<PackageReference Include="Humanizer" Version="2.13.14" />
|
<PackageReference Include="Humanizer" Version="2.14.1" />
|
||||||
<PackageReference Include="MessagePack" Version="2.3.85" />
|
<PackageReference Include="MessagePack" Version="2.3.85" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.11" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="5.0.11" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="5.0.11" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="6.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.14" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.14" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.1.0" />
|
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.1.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="ppy.LocalisationAnalyser" Version="2021.1210.0">
|
<PackageReference Include="ppy.LocalisationAnalyser" Version="2021.1210.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="10.8.0" />
|
<PackageReference Include="Realm" Version="10.9.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2022.204.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2022.214.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
|
||||||
<PackageReference Include="Sentry" Version="3.13.0" />
|
<PackageReference Include="Sentry" Version="3.14.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.30.1" />
|
<PackageReference Include="SharpCompress" Version="0.30.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
|
@ -60,10 +60,10 @@
|
|||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.204.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.214.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net5.0 / net6.0) -->
|
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net6.0) -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NoWarn>$(NoWarn);NU1605</NoWarn>
|
<NoWarn>$(NoWarn);NU1605</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@ -79,15 +79,15 @@
|
|||||||
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
|
<!-- Xamarin.iOS does not automatically handle transitive dependencies from NuGet packages. -->
|
||||||
<ItemGroup Label="Transitive Dependencies">
|
<ItemGroup Label="Transitive Dependencies">
|
||||||
<PackageReference Include="DiffPlex" Version="1.7.0" />
|
<PackageReference Include="DiffPlex" Version="1.7.0" />
|
||||||
<PackageReference Include="Humanizer" Version="2.13.14" />
|
<PackageReference Include="Humanizer" Version="2.14.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.14" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.14" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2022.204.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2022.214.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.30.0" />
|
<PackageReference Include="SharpCompress" Version="0.30.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2021.805.0" ExcludeAssets="all" />
|
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2021.1221.0" ExcludeAssets="all" />
|
||||||
<PackageReference Include="Realm" Version="10.8.0" />
|
<PackageReference Include="Realm" Version="10.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user