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