mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Remove mods from workingbeatmap
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
@ -10,16 +11,26 @@ using osu.Framework.Platform;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class OsuTestCase : TestCase
|
||||
{
|
||||
[Cached(typeof(Bindable<WorkingBeatmap>))]
|
||||
[Cached(typeof(IBindable<WorkingBeatmap>))]
|
||||
private readonly OsuTestBeatmap beatmap = new OsuTestBeatmap(new DummyWorkingBeatmap());
|
||||
|
||||
protected BindableBeatmap Beatmap => beatmap;
|
||||
|
||||
[Cached]
|
||||
[Cached(typeof(IBindable<RulesetInfo>))]
|
||||
protected readonly Bindable<RulesetInfo> Ruleset = new Bindable<RulesetInfo>();
|
||||
|
||||
[Cached]
|
||||
[Cached(Type = typeof(IBindable<IEnumerable<Mod>>))]
|
||||
protected readonly Bindable<IEnumerable<Mod>> SelectedMods = new Bindable<IEnumerable<Mod>>();
|
||||
|
||||
protected DependencyContainer Dependencies { get; private set; }
|
||||
|
||||
private readonly Lazy<Storage> localStorage;
|
||||
@ -32,12 +43,6 @@ namespace osu.Game.Tests.Visual
|
||||
// This is the earliest we can get OsuGameBase, which is used by the dummy working beatmap to find textures
|
||||
beatmap.Default = new DummyWorkingBeatmap(Dependencies.Get<OsuGameBase>());
|
||||
|
||||
Dependencies.CacheAs<Bindable<WorkingBeatmap>>(beatmap);
|
||||
Dependencies.CacheAs<IBindable<WorkingBeatmap>>(beatmap);
|
||||
|
||||
Dependencies.CacheAs(Ruleset);
|
||||
Dependencies.CacheAs<IBindable<RulesetInfo>>(Ruleset);
|
||||
|
||||
return Dependencies;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user