Remove unnecessary dependency, allow null mods

This commit is contained in:
smoogipoo 2020-04-01 13:31:17 +09:00
parent 1ed38e505c
commit 66486b094c
1 changed files with 2 additions and 6 deletions

View File

@ -10,7 +10,6 @@
using osu.Framework.Bindables;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mods;
using osuTK;
@ -62,10 +61,7 @@ protected Playfield()
hitObjectContainerLazy = new Lazy<HitObjectContainer>(CreateHitObjectContainer);
}
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; }
[Resolved]
[Resolved(CanBeNull = true)]
private IReadOnlyList<Mod> mods { get; set; }
[BackgroundDependencyLoader]
@ -137,7 +133,7 @@ protected override void Update()
{
base.Update();
if (beatmap != null)
if (mods != null)
{
foreach (var mod in mods)
{