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;
|
2017-07-18 15:51:34 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
2017-07-19 08:59:47 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
using osu.Game.Rulesets.UI;
|
2017-07-18 15:51:34 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Beatmaps
|
|
|
|
|
{
|
|
|
|
|
internal class DummyWorkingBeatmap : WorkingBeatmap
|
|
|
|
|
{
|
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!",
|
|
|
|
|
Author = "no one",
|
|
|
|
|
},
|
2017-07-18 16:44:45 +08:00
|
|
|
|
BeatmapSet = new BeatmapSetInfo(),
|
2017-07-19 17:32:11 +08:00
|
|
|
|
Difficulty = new BeatmapDifficulty
|
|
|
|
|
{
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override Beatmap GetBeatmap() => new Beatmap
|
|
|
|
|
{
|
|
|
|
|
HitObjects = new List<HitObject>(),
|
|
|
|
|
};
|
|
|
|
|
|
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-04 00:25:24 +08:00
|
|
|
|
public override Mod GetAutoplayMod() => new ModAutoplay();
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => null;
|
|
|
|
|
|
|
|
|
|
public override ScoreProcessor CreateScoreProcessor()
|
|
|
|
|
{
|
2017-07-19 17:02:11 +08:00
|
|
|
|
throw new NotImplementedException();
|
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
|
|
|
|
}
|
|
|
|
|
}
|