mirror of
https://github.com/ppy/osu
synced 2025-01-09 15:49:32 +00:00
Change CopyFrom to always overwrite all settings with incoming values
This commit is contained in:
parent
3133ccacfa
commit
be379e0e3c
@ -134,7 +134,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies mod setting values from <paramref name="source"/> into this instance.
|
||||
/// Copies mod setting values from <paramref name="source"/> into this instance, overwriting all existing settings.
|
||||
/// </summary>
|
||||
/// <param name="source">The mod to copy properties from.</param>
|
||||
public void CopyFrom(Mod source)
|
||||
@ -147,9 +147,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
var targetBindable = (IBindable)prop.GetValue(this);
|
||||
var sourceBindable = (IBindable)prop.GetValue(source);
|
||||
|
||||
// we only care about changes that have been made away from defaults.
|
||||
if (!sourceBindable.IsDefault)
|
||||
CopyAdjustedSetting(targetBindable, sourceBindable);
|
||||
CopyAdjustedSetting(targetBindable, sourceBindable);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user