mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Update PresentBeatmap
to support interface types
This commit is contained in:
@ -436,11 +436,15 @@ namespace osu.Game
|
|||||||
/// <item>first beatmap from any ruleset.</item>
|
/// <item>first beatmap from any ruleset.</item>
|
||||||
/// </list>
|
/// </list>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public void PresentBeatmap(BeatmapSetInfo beatmap, Predicate<BeatmapInfo> difficultyCriteria = null)
|
public void PresentBeatmap(IBeatmapSetInfo beatmap, Predicate<BeatmapInfo> difficultyCriteria = null)
|
||||||
{
|
{
|
||||||
var databasedSet = beatmap.OnlineBeatmapSetID != null
|
BeatmapSetInfo databasedSet = null;
|
||||||
? BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID)
|
|
||||||
: BeatmapManager.QueryBeatmapSet(s => s.Hash == beatmap.Hash);
|
if (beatmap.OnlineID > 0)
|
||||||
|
databasedSet = BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineID);
|
||||||
|
|
||||||
|
if (beatmap is BeatmapSetInfo localBeatmap)
|
||||||
|
databasedSet ??= BeatmapManager.QueryBeatmapSet(s => s.Hash == localBeatmap.Hash);
|
||||||
|
|
||||||
if (databasedSet == null)
|
if (databasedSet == null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user