mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 11:02:57 +08:00
Rename last action to better represent that it is only captured actions
This commit is contained in:
parent
4d9494d3b3
commit
e2f2d5f794
osu.Game.Rulesets.Osu/Mods
@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
private DrawableRuleset<OsuHitObject> ruleset = null!;
|
||||
|
||||
protected OsuAction? LastActionPressed { get; private set; }
|
||||
protected OsuAction? LastAcceptedAction { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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))
|
||||
{
|
||||
LastActionPressed = null;
|
||||
LastAcceptedAction = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
if (CheckValidNewAction(action))
|
||||
{
|
||||
LastActionPressed = action;
|
||||
LastAcceptedAction = action;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override IconUsage? Icon => FontAwesome.Solid.Keyboard;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override string Description => @"You must only use one key!";
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user