diff --git a/osu.Game.Rulesets.Mania/DualStageVariantGenerator.cs b/osu.Game.Rulesets.Mania/DualStageVariantGenerator.cs index 6a7634da01..345657cc58 100644 --- a/osu.Game.Rulesets.Mania/DualStageVariantGenerator.cs +++ b/osu.Game.Rulesets.Mania/DualStageVariantGenerator.cs @@ -14,6 +14,11 @@ namespace osu.Game.Rulesets.Mania private readonly InputKey[] stage1RightKeys; private readonly InputKey[] stage2LeftKeys; private readonly InputKey[] stage2RightKeys; + private readonly InputKey[] stage1SecondaryLeftKeys; + private readonly InputKey[] stage1SecondaryRightKeys; + private readonly InputKey[] stage2SecondaryLeftKeys; + private readonly InputKey[] stage2SecondaryRightKeys; + public DualStageVariantGenerator(int singleStageVariant) { @@ -27,6 +32,12 @@ namespace osu.Game.Rulesets.Mania stage2LeftKeys = new[] { InputKey.S, InputKey.D, InputKey.F, InputKey.G, InputKey.B }; stage2RightKeys = new[] { InputKey.N, InputKey.J, InputKey.K, InputKey.L, InputKey.Semicolon }; + + stage1SecondaryLeftKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None, InputKey.None }; + stage1SecondaryRightKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None, InputKey.None }; + + stage2SecondaryLeftKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None, InputKey.None }; + stage2SecondaryRightKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None, InputKey.None }; } else { @@ -35,6 +46,12 @@ namespace osu.Game.Rulesets.Mania stage2LeftKeys = new[] { InputKey.S, InputKey.D, InputKey.F, InputKey.G }; stage2RightKeys = new[] { InputKey.J, InputKey.K, InputKey.L, InputKey.Semicolon }; + + stage1SecondaryLeftKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None }; + stage1SecondaryRightKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None }; + + stage2SecondaryLeftKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None }; + stage2SecondaryRightKeys = new[] { InputKey.None, InputKey.None, InputKey.None, InputKey.None }; } } @@ -44,14 +61,20 @@ namespace osu.Game.Rulesets.Mania { LeftKeys = stage1LeftKeys, RightKeys = stage1RightKeys, + SecondaryLeftKeys = stage1SecondaryLeftKeys, + SecondaryRightKeys = stage1SecondaryRightKeys, SpecialKey = InputKey.V, + SecondarySpecialKey = InputKey.Space }.GenerateKeyBindingsFor(singleStageVariant); var stage2Bindings = new VariantMappingGenerator { LeftKeys = stage2LeftKeys, RightKeys = stage2RightKeys, + SecondaryLeftKeys = stage2SecondaryLeftKeys, + SecondaryRightKeys = stage2SecondaryRightKeys, SpecialKey = InputKey.B, + SecondarySpecialKey = InputKey.Enter, ActionStart = (ManiaAction)singleStageVariant, }.GenerateKeyBindingsFor(singleStageVariant); diff --git a/osu.Game.Rulesets.Mania/SingleStageVariantGenerator.cs b/osu.Game.Rulesets.Mania/SingleStageVariantGenerator.cs index c642da6dc4..06b51dca76 100644 --- a/osu.Game.Rulesets.Mania/SingleStageVariantGenerator.cs +++ b/osu.Game.Rulesets.Mania/SingleStageVariantGenerator.cs @@ -10,7 +10,9 @@ namespace osu.Game.Rulesets.Mania { private readonly int variant; private readonly InputKey[] leftKeys; + private readonly InputKey[] secondaryLeftKeys; private readonly InputKey[] rightKeys; + private readonly InputKey[] secondaryRightKeys; public SingleStageVariantGenerator(int variant) { @@ -21,19 +23,26 @@ namespace osu.Game.Rulesets.Mania { leftKeys = new[] { InputKey.A, InputKey.S, InputKey.D, InputKey.F, InputKey.V }; rightKeys = new[] { InputKey.N, InputKey.J, InputKey.K, InputKey.L, InputKey.Semicolon }; + secondaryLeftKeys = new[] { InputKey.Q, InputKey.W, InputKey.E, InputKey.R, InputKey.G }; + secondaryRightKeys = new[] { InputKey.H, InputKey.I, InputKey.O, InputKey.P, InputKey.BracketLeft }; } else { leftKeys = new[] { InputKey.A, InputKey.S, InputKey.D, InputKey.F }; rightKeys = new[] { InputKey.J, InputKey.K, InputKey.L, InputKey.Semicolon }; + secondaryLeftKeys = new[] { InputKey.Q, InputKey.W, InputKey.E, InputKey.R }; + secondaryRightKeys = new[] { InputKey.I, InputKey.O, InputKey.P, InputKey.BracketLeft }; } } public IEnumerable GenerateMappings() => new VariantMappingGenerator { LeftKeys = leftKeys, + SecondaryLeftKeys = secondaryLeftKeys, RightKeys = rightKeys, + SecondaryRightKeys = secondaryRightKeys, SpecialKey = InputKey.Space, + SecondarySpecialKey = InputKey.Enter }.GenerateKeyBindingsFor(variant); } } diff --git a/osu.Game.Rulesets.Mania/VariantMappingGenerator.cs b/osu.Game.Rulesets.Mania/VariantMappingGenerator.cs index 2195c9e1b9..a8146497c1 100644 --- a/osu.Game.Rulesets.Mania/VariantMappingGenerator.cs +++ b/osu.Game.Rulesets.Mania/VariantMappingGenerator.cs @@ -15,16 +15,22 @@ namespace osu.Game.Rulesets.Mania /// public InputKey[] LeftKeys; + public InputKey[] SecondaryLeftKeys; + /// /// All the s available to the right hand. /// public InputKey[] RightKeys; + public InputKey[] SecondaryRightKeys; + /// /// The for the special key. /// public InputKey SpecialKey; + public InputKey SecondarySpecialKey; + /// /// The at which the columns should begin. /// @@ -42,13 +48,22 @@ namespace osu.Game.Rulesets.Mania var bindings = new List(); for (int i = LeftKeys.Length - columns / 2; i < LeftKeys.Length; i++) - bindings.Add(new KeyBinding(LeftKeys[i], currentAction++)); + { + bindings.Add(new KeyBinding(LeftKeys[i], currentAction)); + bindings.Add(new KeyBinding(SecondaryLeftKeys[i], currentAction++)); + } if (columns % 2 == 1) - bindings.Add(new KeyBinding(SpecialKey, currentAction++)); + { + bindings.Add(new KeyBinding(SpecialKey, currentAction)); + bindings.Add(new KeyBinding(SecondarySpecialKey, currentAction++)); + } for (int i = 0; i < columns / 2; i++) - bindings.Add(new KeyBinding(RightKeys[i], currentAction++)); + { + bindings.Add(new KeyBinding(RightKeys[i], currentAction)); + bindings.Add(new KeyBinding(SecondaryRightKeys[i], currentAction++)); + } return bindings; }