1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:13:34 +08:00

Randomise which menu content is shown on arriving at the menu

This commit is contained in:
Dean Herbert 2024-05-07 17:02:25 +08:00
parent 0ac0d6a11a
commit 0ddd3cbdc5
No known key found for this signature in database

View File

@ -13,6 +13,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Framework.Threading;
using osu.Framework.Utils;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
@ -111,7 +112,9 @@ namespace osu.Game.Screens.Menu
content.AddRange(loaded);
displayIndex = -1;
// Many users don't spend much time at the main menu, so let's randomise where in the
// carousel of available images we start at to give each a fair chance.
displayIndex = RNG.Next(0, images.NewValue.Images.Length) - 1;
showNext();
}, (cancellationTokenSource ??= new CancellationTokenSource()).Token);
}