Allow 10k to be played on a single stage

This commit is contained in:
smoogipoo 2020-04-20 14:08:23 +09:00
parent 70ef6df4fb
commit b881293b98
2 changed files with 48 additions and 21 deletions

View File

@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
{
TargetColumns = (int)Math.Max(1, roundedCircleSize);
if (TargetColumns >= 10)
if (TargetColumns > 10)
{
TargetColumns /= 2;
Dual = true;

View File

@ -250,7 +250,7 @@ namespace osu.Game.Rulesets.Mania
{
get
{
for (int i = 1; i <= 9; i++)
for (int i = 1; i <= 10; i++)
yield return (int)PlayfieldType.Single + i;
for (int i = 2; i <= 18; i += 2)
yield return (int)PlayfieldType.Dual + i;
@ -262,26 +262,53 @@ namespace osu.Game.Rulesets.Mania
switch (getPlayfieldType(variant))
{
case PlayfieldType.Single:
return new VariantMappingGenerator
switch (variant)
{
LeftKeys = new[]
{
InputKey.A,
InputKey.S,
InputKey.D,
InputKey.F
},
RightKeys = new[]
{
InputKey.J,
InputKey.K,
InputKey.L,
InputKey.Semicolon
},
SpecialKey = InputKey.Space,
SpecialAction = ManiaAction.Special1,
NormalActionStart = ManiaAction.Key1,
}.GenerateKeyBindingsFor(variant, out _);
case 10:
// 10K is special because it extents one key towards the centre of the keyboard (V/N), rather than towards the edges of the keyboard.
return new VariantMappingGenerator
{
LeftKeys = new[]
{
InputKey.A,
InputKey.S,
InputKey.D,
InputKey.F,
InputKey.V
},
RightKeys = new[]
{
InputKey.N,
InputKey.J,
InputKey.K,
InputKey.L,
InputKey.Semicolon,
},
NormalActionStart = ManiaAction.Key1,
}.GenerateKeyBindingsFor(variant, out _);
default:
return new VariantMappingGenerator
{
LeftKeys = new[]
{
InputKey.A,
InputKey.S,
InputKey.D,
InputKey.F
},
RightKeys = new[]
{
InputKey.J,
InputKey.K,
InputKey.L,
InputKey.Semicolon
},
SpecialKey = InputKey.Space,
SpecialAction = ManiaAction.Special1,
NormalActionStart = ManiaAction.Key1,
}.GenerateKeyBindingsFor(variant, out _);
}
case PlayfieldType.Dual:
int keys = getDualStageKeyCount(variant);