mirror of
https://github.com/ppy/osu
synced 2025-01-18 12:00:58 +00:00
Apply changes resulting from IBindable interface updates
This commit is contained in:
parent
1ebd9975f6
commit
d1c72f5e13
@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.TypeExtensions;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Configuration;
|
||||
@ -170,7 +171,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
target.UnbindFrom(sourceBindable);
|
||||
}
|
||||
else
|
||||
target.Parse(source);
|
||||
{
|
||||
if (!(target is IParseable parseable))
|
||||
throw new InvalidOperationException($"Bindable type {target.GetType().ReadableName()} is not IParseable.");
|
||||
|
||||
parseable.Parse(source);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Equals(IMod other) => other is Mod them && Equals(them);
|
||||
|
Loading…
Reference in New Issue
Block a user