mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 14:47:22 +09:00
Add constant for max stage keys
This commit is contained in:
parent
597bbadb1b
commit
4c689c6ad2
@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
{
|
{
|
||||||
TargetColumns = (int)Math.Max(1, roundedCircleSize);
|
TargetColumns = (int)Math.Max(1, roundedCircleSize);
|
||||||
|
|
||||||
if (TargetColumns > 10)
|
if (TargetColumns > ManiaRuleset.MAX_STAGE_KEYS)
|
||||||
{
|
{
|
||||||
TargetColumns /= 2;
|
TargetColumns /= 2;
|
||||||
Dual = true;
|
Dual = true;
|
||||||
|
@ -35,6 +35,11 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
{
|
{
|
||||||
public class ManiaRuleset : Ruleset, ILegacyRuleset
|
public class ManiaRuleset : Ruleset, ILegacyRuleset
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The maximum number of supported keys in a single stage.
|
||||||
|
/// </summary>
|
||||||
|
public const int MAX_STAGE_KEYS = 10;
|
||||||
|
|
||||||
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableManiaRuleset(this, beatmap, mods);
|
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableManiaRuleset(this, beatmap, mods);
|
||||||
|
|
||||||
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor();
|
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor();
|
||||||
@ -251,9 +256,9 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= 10; i++)
|
for (int i = 1; i <= MAX_STAGE_KEYS; i++)
|
||||||
yield return (int)PlayfieldType.Single + i;
|
yield return (int)PlayfieldType.Single + i;
|
||||||
for (int i = 2; i <= 20; i += 2)
|
for (int i = 2; i <= MAX_STAGE_KEYS * 2; i += 2)
|
||||||
yield return (int)PlayfieldType.Dual + i;
|
yield return (int)PlayfieldType.Dual + i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user