mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Fix smoke being blocked with "Relax" mod enabled
This commit is contained in:
parent
9bb4c70393
commit
c89a55043e
@ -3,8 +3,10 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
@ -60,17 +62,14 @@ namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
public bool AllowUserPresses = true;
|
||||
|
||||
private static readonly OsuAction[] all_actions = (OsuAction[])Enum.GetValues(typeof(OsuAction));
|
||||
|
||||
protected override IEnumerable<OsuAction> BlockedActions => !AllowUserPresses ? all_actions.Where(a => a != OsuAction.Smoke) : Enumerable.Empty<OsuAction>();
|
||||
|
||||
public OsuKeyBindingContainer(RulesetInfo ruleset, int variant, SimultaneousBindingMode unique)
|
||||
: base(ruleset, variant, unique)
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool Handle(UIEvent e)
|
||||
{
|
||||
if (!AllowUserPresses) return false;
|
||||
|
||||
return base.Handle(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user