mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +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>
|
/// <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>
|
/// </summary>
|
||||||
/// <param name="source">The mod to copy properties from.</param>
|
/// <param name="source">The mod to copy properties from.</param>
|
||||||
public void CopyFrom(Mod source)
|
public void CopyFrom(Mod source)
|
||||||
@ -147,9 +147,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
var targetBindable = (IBindable)prop.GetValue(this);
|
var targetBindable = (IBindable)prop.GetValue(this);
|
||||||
var sourceBindable = (IBindable)prop.GetValue(source);
|
var sourceBindable = (IBindable)prop.GetValue(source);
|
||||||
|
|
||||||
// we only care about changes that have been made away from defaults.
|
CopyAdjustedSetting(targetBindable, sourceBindable);
|
||||||
if (!sourceBindable.IsDefault)
|
|
||||||
CopyAdjustedSetting(targetBindable, sourceBindable);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user