mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 21:42:58 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
a28c79107c
@ -1,5 +1,5 @@
|
|||||||
#addin "nuget:?package=CodeFileSanity&version=0.0.21"
|
#addin "nuget:?package=CodeFileSanity&version=0.0.21"
|
||||||
#addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2018.2.2"
|
#addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2018.3.4"
|
||||||
#tool "nuget:?package=NVika.MSBuild&version=1.0.1"
|
#tool "nuget:?package=NVika.MSBuild&version=1.0.1"
|
||||||
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
||||||
|
|
||||||
@ -46,7 +46,9 @@ Task("InspectCode")
|
|||||||
OutputFile = "inspectcodereport.xml",
|
OutputFile = "inspectcodereport.xml",
|
||||||
});
|
});
|
||||||
|
|
||||||
StartProcess(nVikaToolPath, @"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors");
|
int returnCode = StartProcess(nVikaToolPath, $@"parsereport ""inspectcodereport.xml"" --treatwarningsaserrors");
|
||||||
|
if (returnCode != 0)
|
||||||
|
throw new Exception($"inspectcode failed with return code {returnCode}");
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("CodeFileSanity")
|
Task("CodeFileSanity")
|
||||||
|
@ -254,6 +254,12 @@ namespace osu.Game
|
|||||||
if (menuScreen.IsCurrentScreen())
|
if (menuScreen.IsCurrentScreen())
|
||||||
menuScreen.LoadToSolo();
|
menuScreen.LoadToSolo();
|
||||||
|
|
||||||
|
// we might even already be at the song
|
||||||
|
if (Beatmap.Value.BeatmapSetInfo.Hash == databasedSet.Hash)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Use first beatmap available for current ruleset, else switch ruleset.
|
// Use first beatmap available for current ruleset, else switch ruleset.
|
||||||
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
@ -168,15 +169,22 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
base.ApplyState();
|
base.ApplyState();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MenuItem[] ContextMenuItems => new MenuItem[]
|
public MenuItem[] ContextMenuItems
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<MenuItem> items = new List<MenuItem>
|
||||||
{
|
{
|
||||||
new OsuMenuItem("Play", MenuItemType.Highlighted, () => startRequested?.Invoke(beatmap)),
|
new OsuMenuItem("Play", MenuItemType.Highlighted, () => startRequested?.Invoke(beatmap)),
|
||||||
new OsuMenuItem("Edit", MenuItemType.Standard, () => editRequested?.Invoke(beatmap)),
|
new OsuMenuItem("Edit", MenuItemType.Standard, () => editRequested?.Invoke(beatmap)),
|
||||||
new OsuMenuItem("Hide", MenuItemType.Destructive, () => hideRequested?.Invoke(beatmap)),
|
new OsuMenuItem("Hide", MenuItemType.Destructive, () => hideRequested?.Invoke(beatmap)),
|
||||||
new OsuMenuItem("Details", MenuItemType.Standard, () =>
|
|
||||||
{
|
|
||||||
if (beatmap.OnlineBeatmapID.HasValue) beatmapOverlay?.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value);
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (beatmap.OnlineBeatmapID.HasValue)
|
||||||
|
items.Add(new OsuMenuItem("Details", MenuItemType.Standard, () => beatmapOverlay?.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value)));
|
||||||
|
|
||||||
|
return items.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user