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

Rewrite comment to hopefully be more informative

This commit is contained in:
Dean Herbert 2021-06-02 11:10:02 +09:00
parent 8a76d97b63
commit 911256603b

View File

@ -51,9 +51,15 @@ namespace osu.Game.Tests.Visual
protected override void PrepareReplay()
{
// Generally, replay generation is handled by whatever is constructing the player.
// This is implemented locally here to ease migration of test scenes that have some executions
// running with autoplay and some not, but are not written in a way that lends to instantiating
// different `Player` types.
//
// Eventually we will want to remove this and update all test usages which rely on autoplay to use
// a `TestReplayPlayer`.
var autoplayMod = Mods.Value.OfType<ModAutoplay>().FirstOrDefault();
// This logic should really not exist (and tests should be instantiating a ReplayPlayer), but a lot of base work is required to make that happen.
if (autoplayMod != null)
{
DrawableRuleset?.SetReplayScore(autoplayMod.CreateReplayScore(GameplayBeatmap.PlayableBeatmap, Mods.Value));