1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 05:32:54 +08:00

Tidy up nesting

This commit is contained in:
Dean Herbert 2021-01-26 19:16:38 +09:00
parent 64a3c712aa
commit 81ab82fafe

View File

@ -32,9 +32,9 @@ namespace osu.Game.Tournament.Components
[BackgroundDependencyLoader]
private void load(TextureStore textures, LadderInfo ladderInfo)
{
var texture = textures.Get($"mods/{modAcronym}");
var customTexture = textures.Get($"mods/{modAcronym}");
if (texture != null)
if (customTexture != null)
{
AddInternal(new Sprite
{
@ -42,11 +42,12 @@ namespace osu.Game.Tournament.Components
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Texture = texture
Texture = customTexture
});
return;
}
else
{
var ruleset = rulesets.GetRuleset(ladderInfo.Ruleset.Value?.ID ?? 0);
var modIcon = ruleset?.CreateInstance().GetAllMods().FirstOrDefault(mod => mod.Acronym == modAcronym);
@ -61,5 +62,4 @@ namespace osu.Game.Tournament.Components
});
}
}
}
}