mirror of
https://github.com/ppy/osu
synced 2025-01-10 08:09:40 +00:00
Rename parameters for readability
This commit is contained in:
parent
2501707d7d
commit
a3e29b9154
@ -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.
|
/// 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.
|
/// The base implementation will transfer the value via <see cref="Bindable{T}.Parse"/> and should be called unless replaced with custom logic.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bindable">The target bindable to apply the adjustment.</param>
|
/// <param name="target">The target bindable to apply the adjustment.</param>
|
||||||
/// <param name="value">The adjustment to apply.</param>
|
/// <param name="source">The adjustment to apply.</param>
|
||||||
internal virtual void CopyAdjustedSetting(IBindable bindable, object value)
|
internal virtual void CopyAdjustedSetting(IBindable target, object source)
|
||||||
{
|
{
|
||||||
if (value is IBindable incoming)
|
if (source is IBindable sourceBindable)
|
||||||
{
|
{
|
||||||
//copy including transfer of default values.
|
//copy including transfer of default values.
|
||||||
bindable.BindTo(incoming);
|
target.BindTo(sourceBindable);
|
||||||
bindable.UnbindFrom(incoming);
|
target.UnbindFrom(sourceBindable);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bindable.Parse(value);
|
target.Parse(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Equals(IMod other) => GetType() == other?.GetType();
|
public bool Equals(IMod other) => GetType() == other?.GetType();
|
||||||
|
@ -114,10 +114,10 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
bindable.ValueChanged += _ => userChangedSettings[bindable] = !bindable.IsDefault;
|
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;
|
userChangedSettings[target] = true;
|
||||||
base.CopyAdjustedSetting(bindable, value);
|
base.CopyAdjustedSetting(target, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user