mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 23:27:38 +09:00
Merge pull request #19175 from frenzibyte/fix-solo-score-info-mod-settings
Fix `SoloScoreInfo` not carrying mod settings in conversion methods
This commit is contained in:
commit
1cfa6676ea
@ -65,8 +65,15 @@ namespace osu.Game.Online.API
|
|||||||
if (!Settings.TryGetValue(property.Name.Underscore(), out object settingValue))
|
if (!Settings.TryGetValue(property.Name.Underscore(), out object settingValue))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
resultMod.CopyAdjustedSetting((IBindable)property.GetValue(resultMod), settingValue);
|
resultMod.CopyAdjustedSetting((IBindable)property.GetValue(resultMod), settingValue);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Failed to copy mod setting value '{settingValue ?? "null"}' to \"{property.Name}\": {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultMod;
|
return resultMod;
|
||||||
|
@ -101,7 +101,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
|
|
||||||
var rulesetInstance = ruleset.CreateInstance();
|
var rulesetInstance = ruleset.CreateInstance();
|
||||||
|
|
||||||
var mods = Mods.Select(apiMod => rulesetInstance.CreateModFromAcronym(apiMod.Acronym)).Where(m => m != null).ToArray();
|
var mods = Mods.Select(apiMod => apiMod.ToMod(rulesetInstance)).ToArray();
|
||||||
|
|
||||||
var scoreInfo = ToScoreInfo(mods);
|
var scoreInfo = ToScoreInfo(mods);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user