mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into replay
# Conflicts: # osu.Game/Modes/Mod.cs
This commit is contained in:
@ -9,7 +9,6 @@ using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
@ -111,14 +110,7 @@ namespace osu.Game.Overlays.Mods
|
||||
if (mod == value) return;
|
||||
mod = value;
|
||||
|
||||
if (mod is MultiMod)
|
||||
{
|
||||
Mods = ((MultiMod)mod).Mods;
|
||||
}
|
||||
else
|
||||
{
|
||||
Mods = new[] { mod };
|
||||
}
|
||||
Mods = (mod as MultiMod)?.Mods ?? new[] { mod };
|
||||
|
||||
createIcons();
|
||||
if (Mods.Length > 0)
|
||||
@ -185,7 +177,7 @@ namespace osu.Game.Overlays.Mods
|
||||
private void displayMod(Mod mod)
|
||||
{
|
||||
displayIcon.Icon = mod.Icon;
|
||||
text.Text = mod.Name.GetDescription();
|
||||
text.Text = mod.Name;
|
||||
}
|
||||
|
||||
private void displaySelectedMod()
|
||||
|
@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Mods
|
||||
}
|
||||
}
|
||||
|
||||
public void DeselectMod(Modes.Mods modName)
|
||||
public void DeselectType(Type modType)
|
||||
{
|
||||
foreach (ModSection section in modSectionsContainer.Children)
|
||||
{
|
||||
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
foreach (Mod mod in button.Mods)
|
||||
{
|
||||
if (mod.Name == modName)
|
||||
if (modType.IsInstanceOfType(mod))
|
||||
{
|
||||
button.Deselect();
|
||||
return;
|
||||
@ -146,10 +146,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
if (selectedMod != null)
|
||||
{
|
||||
foreach (Modes.Mods disableMod in selectedMod.DisablesMods)
|
||||
{
|
||||
DeselectMod(disableMod);
|
||||
}
|
||||
foreach (Type t in selectedMod.IncompatibleMods)
|
||||
DeselectType(t);
|
||||
}
|
||||
|
||||
refreshSelectedMods();
|
||||
|
Reference in New Issue
Block a user