1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Add back allowance for tests scenes using empty ShortName

This commit is contained in:
Dean Herbert 2021-11-22 21:41:09 +09:00
parent 377ba2673a
commit 6c36770eb3

View File

@ -49,6 +49,10 @@ namespace osu.Game.Rulesets
{
get
{
// Is the case for many test usages.
if (string.IsNullOrEmpty(ShortName))
return CreateAllMods();
if (!mod_reference_cache.TryGetValue(ShortName, out var mods))
mod_reference_cache[ShortName] = mods = CreateAllMods().Cast<IMod>().ToArray();