2017-07-18 15:51:34 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-07-19 17:02:11 +08:00
|
|
|
|
using System;
|
2017-07-18 15:51:34 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using osu.Framework.Audio.Track;
|
|
|
|
|
using osu.Framework.Graphics.Textures;
|
2017-07-19 08:59:47 +08:00
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
|
using osu.Game.Rulesets.UI;
|
2017-07-18 15:51:34 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Beatmaps
|
|
|
|
|
{
|
2017-11-21 10:49:42 +08:00
|
|
|
|
public class DummyWorkingBeatmap : WorkingBeatmap
|
2017-07-18 15:51:34 +08:00
|
|
|
|
{
|
2017-07-19 12:32:16 +08:00
|
|
|
|
private readonly OsuGameBase game;
|
2017-07-18 16:59:43 +08:00
|
|
|
|
|
2017-07-19 12:32:16 +08:00
|
|
|
|
public DummyWorkingBeatmap(OsuGameBase game)
|
2017-07-18 15:51:34 +08:00
|
|
|
|
: base(new BeatmapInfo
|
|
|
|
|
{
|
|
|
|
|
Metadata = new BeatmapMetadata
|
|
|
|
|
{
|
|
|
|
|
Artist = "please load a beatmap!",
|
|
|
|
|
Title = "no beatmaps available!",
|
2017-10-13 19:25:27 +08:00
|
|
|
|
AuthorString = "no one",
|
2017-07-18 15:51:34 +08:00
|
|
|
|
},
|
2017-07-18 16:44:45 +08:00
|
|
|
|
BeatmapSet = new BeatmapSetInfo(),
|
2017-10-19 13:05:11 +08:00
|
|
|
|
BaseDifficulty = new BeatmapDifficulty
|
2017-07-19 17:32:11 +08:00
|
|
|
|
{
|
|
|
|
|
DrainRate = 0,
|
|
|
|
|
CircleSize = 0,
|
|
|
|
|
OverallDifficulty = 0,
|
|
|
|
|
ApproachRate = 0,
|
|
|
|
|
SliderMultiplier = 0,
|
|
|
|
|
SliderTickRate = 0,
|
|
|
|
|
},
|
2017-07-19 08:59:47 +08:00
|
|
|
|
Ruleset = new DummyRulesetInfo()
|
2017-07-18 15:51:34 +08:00
|
|
|
|
})
|
|
|
|
|
{
|
2017-07-18 16:59:43 +08:00
|
|
|
|
this.game = game;
|
2017-07-18 15:51:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-09-08 18:04:24 +08:00
|
|
|
|
protected override Beatmap GetBeatmap() => new Beatmap();
|
2017-07-18 15:51:34 +08:00
|
|
|
|
|
2017-07-18 16:59:43 +08:00
|
|
|
|
protected override Texture GetBackground() => game.Textures.Get(@"Backgrounds/bg4");
|
2017-07-18 15:51:34 +08:00
|
|
|
|
|
2017-07-18 16:44:45 +08:00
|
|
|
|
protected override Track GetTrack() => new TrackVirtual();
|
2017-07-19 08:59:47 +08:00
|
|
|
|
|
|
|
|
|
private class DummyRulesetInfo : RulesetInfo
|
|
|
|
|
{
|
2017-08-09 12:04:11 +08:00
|
|
|
|
public override Ruleset CreateInstance() => new DummyRuleset(this);
|
2017-07-19 08:59:47 +08:00
|
|
|
|
|
|
|
|
|
private class DummyRuleset : Ruleset
|
|
|
|
|
{
|
|
|
|
|
public override IEnumerable<Mod> GetModsFor(ModType type) => new Mod[] { };
|
|
|
|
|
|
2017-08-09 12:28:29 +08:00
|
|
|
|
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
2017-07-19 08:59:47 +08:00
|
|
|
|
{
|
2017-07-19 17:02:11 +08:00
|
|
|
|
throw new NotImplementedException();
|
2017-07-19 08:59:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
2017-11-16 19:06:32 +08:00
|
|
|
|
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap, Mod[] mods = null) => null;
|
2017-07-19 08:59:47 +08:00
|
|
|
|
|
|
|
|
|
public override string Description => "dummy";
|
|
|
|
|
|
2017-08-09 12:04:11 +08:00
|
|
|
|
public DummyRuleset(RulesetInfo rulesetInfo)
|
|
|
|
|
: base(rulesetInfo)
|
|
|
|
|
{
|
|
|
|
|
}
|
2017-07-19 08:59:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-07-18 15:51:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|