mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 11:12:59 +08:00
Actualize tests
This commit is contained in:
parent
47b80d2474
commit
c6c616f244
@ -56,6 +56,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
beatmaps.Add(new BeatmapInfo
|
beatmaps.Add(new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = rulesets.GetRuleset(i % 4),
|
Ruleset = rulesets.GetRuleset(i % 4),
|
||||||
|
RulesetID = i % 4,
|
||||||
OnlineBeatmapID = beatmapId,
|
OnlineBeatmapID = beatmapId,
|
||||||
Length = length,
|
Length = length,
|
||||||
BPM = bpm,
|
BPM = bpm,
|
||||||
|
@ -186,6 +186,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
Metadata = metadata,
|
Metadata = metadata,
|
||||||
BaseDifficulty = new BeatmapDifficulty(),
|
BaseDifficulty = new BeatmapDifficulty(),
|
||||||
Ruleset = ruleset,
|
Ruleset = ruleset,
|
||||||
|
RulesetID = ruleset.ID.GetValueOrDefault(),
|
||||||
StarDifficulty = difficultyIndex + 1,
|
StarDifficulty = difficultyIndex + 1,
|
||||||
Version = $"SR{difficultyIndex + 1}"
|
Version = $"SR{difficultyIndex + 1}"
|
||||||
}).ToList()
|
}).ToList()
|
||||||
|
@ -911,9 +911,11 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
int length = RNG.Next(30000, 200000);
|
int length = RNG.Next(30000, 200000);
|
||||||
double bpm = RNG.NextSingle(80, 200);
|
double bpm = RNG.NextSingle(80, 200);
|
||||||
|
|
||||||
|
var ruleset = getRuleset();
|
||||||
beatmaps.Add(new BeatmapInfo
|
beatmaps.Add(new BeatmapInfo
|
||||||
{
|
{
|
||||||
Ruleset = getRuleset(),
|
Ruleset = ruleset,
|
||||||
|
RulesetID = ruleset.ID.GetValueOrDefault(),
|
||||||
OnlineBeatmapID = beatmapId,
|
OnlineBeatmapID = beatmapId,
|
||||||
Version = $"{beatmapId} (length {TimeSpan.FromMilliseconds(length):m\\:ss}, bpm {bpm:0.#})",
|
Version = $"{beatmapId} (length {TimeSpan.FromMilliseconds(length):m\\:ss}, bpm {bpm:0.#})",
|
||||||
Length = length,
|
Length = length,
|
||||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Scoring
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
modsJson = null;
|
modsJson = JsonConvert.SerializeObject(value.Select(m => new DeserializedMod { Acronym = m.Acronym }));
|
||||||
mods = value;
|
mods = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,13 +88,7 @@ namespace osu.Game.Scoring
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (modsJson != null)
|
return modsJson;
|
||||||
return modsJson;
|
|
||||||
|
|
||||||
if (mods == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return modsJson = JsonConvert.SerializeObject(mods.Select(m => new DeserializedMod { Acronym = m.Acronym }));
|
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user