1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

Rename parameters for readability

This commit is contained in:
Bartłomiej Dach 2021-01-03 13:25:44 +01:00
parent 2501707d7d
commit a3e29b9154
2 changed files with 10 additions and 10 deletions

View File

@ -148,18 +148,18 @@ namespace osu.Game.Rulesets.Mods
/// When creating copies or clones of a Mod, this method will be called to copy explicitly adjusted user settings.
/// The base implementation will transfer the value via <see cref="Bindable{T}.Parse"/> and should be called unless replaced with custom logic.
/// </summary>
/// <param name="bindable">The target bindable to apply the adjustment.</param>
/// <param name="value">The adjustment to apply.</param>
internal virtual void CopyAdjustedSetting(IBindable bindable, object value)
/// <param name="target">The target bindable to apply the adjustment.</param>
/// <param name="source">The adjustment to apply.</param>
internal virtual void CopyAdjustedSetting(IBindable target, object source)
{
if (value is IBindable incoming)
if (source is IBindable sourceBindable)
{
//copy including transfer of default values.
bindable.BindTo(incoming);
bindable.UnbindFrom(incoming);
target.BindTo(sourceBindable);
target.UnbindFrom(sourceBindable);
}
else
bindable.Parse(value);
target.Parse(source);
}
public bool Equals(IMod other) => GetType() == other?.GetType();

View File

@ -114,10 +114,10 @@ namespace osu.Game.Rulesets.Mods
bindable.ValueChanged += _ => userChangedSettings[bindable] = !bindable.IsDefault;
}
internal override void CopyAdjustedSetting(IBindable bindable, object value)
internal override void CopyAdjustedSetting(IBindable target, object source)
{
userChangedSettings[bindable] = true;
base.CopyAdjustedSetting(bindable, value);
userChangedSettings[target] = true;
base.CopyAdjustedSetting(target, source);
}
/// <summary>