1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-07 20:44:47 +08:00

Rename method to better indicate directionality

This commit is contained in:
Bartłomiej Dach
2023-05-04 18:15:12 +02:00
Unverified
parent d1d4b54c64
commit 0d2396c557
3 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -45,12 +45,12 @@ namespace osu.Game.Tests.Mods
var modBool = new TestNonMatchingSettingTypeModBool { TestSetting = { Default = false, Value = true } };
var modInt = new TestNonMatchingSettingTypeModInt { TestSetting = { Value = (int)setting_change / 2 } };
modDouble.CopyCommonSettings(modBool);
modDouble.CopyCommonSettings(modInt);
modBool.CopyCommonSettings(modDouble);
modBool.CopyCommonSettings(modInt);
modInt.CopyCommonSettings(modDouble);
modInt.CopyCommonSettings(modBool);
modDouble.CopyCommonSettingsFrom(modBool);
modDouble.CopyCommonSettingsFrom(modInt);
modBool.CopyCommonSettingsFrom(modDouble);
modBool.CopyCommonSettingsFrom(modInt);
modInt.CopyCommonSettingsFrom(modDouble);
modInt.CopyCommonSettingsFrom(modBool);
Assert.That(modDouble.TestSetting.Value, Is.EqualTo(setting_change));
Assert.That(modBool.TestSetting.Value, Is.EqualTo(!modBool.TestSetting.Default));
@@ -63,7 +63,7 @@ namespace osu.Game.Tests.Mods
var modBoolTrue = new TestNonMatchingSettingTypeModBool { TestSetting = { Default = true, Value = false } };
var modBoolFalse = new TestNonMatchingSettingTypeModBool { TestSetting = { Default = false, Value = true } };
modBoolFalse.CopyCommonSettings(modBoolTrue);
modBoolFalse.CopyCommonSettingsFrom(modBoolTrue);
Assert.That(modBoolFalse.TestSetting.Default, Is.EqualTo(false));
Assert.That(modBoolFalse.TestSetting.Value, Is.EqualTo(modBoolTrue.TestSetting.Value));
+1 -1
View File
@@ -633,7 +633,7 @@ namespace osu.Game
var convertedMods = SelectedMods.Value.Select(mod =>
{
var newMod = instance.CreateModFromAcronym(mod.Acronym);
newMod?.CopyCommonSettings(mod);
newMod?.CopyCommonSettingsFrom(mod);
return newMod;
}).Where(newMod => newMod != null).ToList();
+1 -1
View File
@@ -168,7 +168,7 @@ namespace osu.Game.Rulesets.Mods
/// </summary>
/// <remarks>Copied values are unchanged, even if they have different clamping ranges.</remarks>
/// <param name="source">The mod to extract settings from.</param>
public void CopyCommonSettings(Mod source)
public void CopyCommonSettingsFrom(Mod source)
{
if (source.UsesDefaultConfiguration)
return;