1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Merge pull request #21735 from nekodex/argon-pro-skin

Add argon "pro" skin
This commit is contained in:
Bartłomiej Dach 2022-12-20 20:25:22 +01:00 committed by GitHub
commit d81a724dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 4 deletions

View File

@ -105,6 +105,7 @@ namespace osu.Game.Overlays.Settings.Sections
dropdownItems.Clear(); dropdownItems.Clear();
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_SKIN).ToLive(realm)); dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_PRO_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.TRIANGLES_SKIN).ToLive(realm)); dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.TRIANGLES_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.CLASSIC_SKIN).ToLive(realm)); dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.CLASSIC_SKIN).ToLive(realm));

View File

@ -0,0 +1,48 @@
// 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 JetBrains.Annotations;
using osu.Framework.Audio.Sample;
using osu.Game.Audio;
using osu.Game.Extensions;
using osu.Game.IO;
namespace osu.Game.Skinning
{
public class ArgonProSkin : ArgonSkin
{
public new static SkinInfo CreateInfo() => new SkinInfo
{
ID = Skinning.SkinInfo.ARGON_PRO_SKIN,
Name = "osu! \"argon\" pro (2022)",
Creator = "team osu!",
Protected = true,
InstantiationInfo = typeof(ArgonProSkin).GetInvariantInstantiationInfo()
};
public override ISample? GetSample(ISampleInfo sampleInfo)
{
foreach (string lookup in sampleInfo.LookupNames)
{
string remappedLookup = lookup.Replace(@"Gameplay/", @"Gameplay/ArgonPro/");
var sample = Samples?.Get(remappedLookup) ?? Resources.AudioManager?.Samples.Get(remappedLookup);
if (sample != null)
return sample;
}
return null;
}
public ArgonProSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources)
{
}
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public ArgonProSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin, resources)
{
}
}
}

View File

@ -30,7 +30,7 @@ namespace osu.Game.Skinning
InstantiationInfo = typeof(ArgonSkin).GetInvariantInstantiationInfo() InstantiationInfo = typeof(ArgonSkin).GetInvariantInstantiationInfo()
}; };
private readonly IStorageResourceProvider resources; protected readonly IStorageResourceProvider Resources;
public ArgonSkin(IStorageResourceProvider resources) public ArgonSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources) : this(CreateInfo(), resources)
@ -41,7 +41,7 @@ namespace osu.Game.Skinning
public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources) public ArgonSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin, resources) : base(skin, resources)
{ {
this.resources = resources; Resources = resources;
Configuration.CustomComboColours = new List<Color4> Configuration.CustomComboColours = new List<Color4>
{ {
@ -72,7 +72,7 @@ namespace osu.Game.Skinning
{ {
foreach (string lookup in sampleInfo.LookupNames) foreach (string lookup in sampleInfo.LookupNames)
{ {
var sample = Samples?.Get(lookup) ?? resources.AudioManager?.Samples.Get(lookup); var sample = Samples?.Get(lookup) ?? Resources.AudioManager?.Samples.Get(lookup);
if (sample != null) if (sample != null)
return sample; return sample;
} }

View File

@ -20,6 +20,7 @@ namespace osu.Game.Skinning
{ {
internal static readonly Guid TRIANGLES_SKIN = new Guid("2991CFD8-2140-469A-BCB9-2EC23FBCE4AD"); internal static readonly Guid TRIANGLES_SKIN = new Guid("2991CFD8-2140-469A-BCB9-2EC23FBCE4AD");
internal static readonly Guid ARGON_SKIN = new Guid("CFFA69DE-B3E3-4DEE-8563-3C4F425C05D0"); internal static readonly Guid ARGON_SKIN = new Guid("CFFA69DE-B3E3-4DEE-8563-3C4F425C05D0");
internal static readonly Guid ARGON_PRO_SKIN = new Guid("9FC9CF5D-0F16-4C71-8256-98868321AC43");
internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187"); internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187");
internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908"); internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908");

View File

@ -84,6 +84,7 @@ namespace osu.Game.Skinning
DefaultClassicSkin = new DefaultLegacySkin(this), DefaultClassicSkin = new DefaultLegacySkin(this),
trianglesSkin = new TrianglesSkin(this), trianglesSkin = new TrianglesSkin(this),
argonSkin = new ArgonSkin(this), argonSkin = new ArgonSkin(this),
new ArgonProSkin(this),
}; };
// Ensure the default entries are present. // Ensure the default entries are present.

View File

@ -111,6 +111,7 @@ namespace osu.Game.Skinning
// Temporarily used to exclude undesirable ISkin implementations // Temporarily used to exclude undesirable ISkin implementations
static bool isUserSkin(ISkin skin) static bool isUserSkin(ISkin skin)
=> skin.GetType() == typeof(TrianglesSkin) => skin.GetType() == typeof(TrianglesSkin)
|| skin.GetType() == typeof(ArgonProSkin)
|| skin.GetType() == typeof(ArgonSkin) || skin.GetType() == typeof(ArgonSkin)
|| skin.GetType() == typeof(DefaultLegacySkin) || skin.GetType() == typeof(DefaultLegacySkin)
|| skin.GetType() == typeof(LegacySkin); || skin.GetType() == typeof(LegacySkin);

View File

@ -36,7 +36,7 @@
</PackageReference> </PackageReference>
<PackageReference Include="Realm" Version="10.18.0" /> <PackageReference Include="Realm" Version="10.18.0" />
<PackageReference Include="ppy.osu.Framework" Version="2022.1219.0" /> <PackageReference Include="ppy.osu.Framework" Version="2022.1219.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1207.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2022.1221.0" />
<PackageReference Include="Sentry" Version="3.23.1" /> <PackageReference Include="Sentry" Version="3.23.1" />
<PackageReference Include="SharpCompress" Version="0.32.2" /> <PackageReference Include="SharpCompress" Version="0.32.2" />
<PackageReference Include="NUnit" Version="3.13.3" /> <PackageReference Include="NUnit" Version="3.13.3" />