Convert switch to if

This commit is contained in:
Max Hübner 2020-10-30 16:06:48 +01:00
parent d19dd4eef6
commit 6f6a8e2a8f

View File

@ -106,16 +106,10 @@ namespace osu.Game.Screens.Backgrounds
else
newBackground = new Background(backgroundName);
switch (seasonalBackgroundMode.Value)
if (seasonalBackgroundMode.Value == SeasonalBackgroundMode.Always
|| seasonalBackgroundMode.Value == SeasonalBackgroundMode.Sometimes && seasonalBackgroundLoader.IsInSeason)
{
case SeasonalBackgroundMode.Sometimes:
if (seasonalBackgroundLoader.IsInSeason)
goto case SeasonalBackgroundMode.Always;
break;
case SeasonalBackgroundMode.Always:
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
break;
newBackground = seasonalBackgroundLoader.LoadBackground() ?? newBackground;
}
newBackground.Depth = currentDisplay;