Rename last action to better represent that it is only captured actions

This commit is contained in:
Dean Herbert 2022-07-14 01:40:44 +09:00
parent 4d9494d3b3
commit e2f2d5f794
3 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Mods
private DrawableRuleset<OsuHitObject> ruleset = null!; private DrawableRuleset<OsuHitObject> ruleset = null!;
protected OsuAction? LastActionPressed { get; private set; } protected OsuAction? LastAcceptedAction { get; private set; }
/// <summary> /// <summary>
/// A tracker for periods where alternate should not be forced (i.e. non-gameplay periods). /// A tracker for periods where alternate should not be forced (i.e. non-gameplay periods).
@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Osu.Mods
{ {
if (nonGameplayPeriods.IsInAny(gameplayClock.CurrentTime)) if (nonGameplayPeriods.IsInAny(gameplayClock.CurrentTime))
{ {
LastActionPressed = null; LastAcceptedAction = null;
return true; return true;
} }
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Osu.Mods
if (CheckValidNewAction(action)) if (CheckValidNewAction(action))
{ {
LastActionPressed = action; LastAcceptedAction = action;
return true; return true;
} }

View File

@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Mods
public override IconUsage? Icon => FontAwesome.Solid.Keyboard; public override IconUsage? Icon => FontAwesome.Solid.Keyboard;
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModSingleTap) }).ToArray(); public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModSingleTap) }).ToArray();
protected override bool CheckValidNewAction(OsuAction action) => LastActionPressed != action; protected override bool CheckValidNewAction(OsuAction action) => LastAcceptedAction != action;
} }
} }

View File

@ -13,6 +13,6 @@ namespace osu.Game.Rulesets.Osu.Mods
public override string Description => @"You must only use one key!"; public override string Description => @"You must only use one key!";
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAlternate) }).ToArray(); public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAlternate) }).ToArray();
protected override bool CheckValidNewAction(OsuAction action) => LastActionPressed == null || LastActionPressed == action; protected override bool CheckValidNewAction(OsuAction action) => LastAcceptedAction == null || LastAcceptedAction == action;
} }
} }