mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Add beatmap parameter to beatmapconverter creation
This commit is contained in:
parent
6f5acaa8f9
commit
4e363664fd
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ITestableBeatmapConverter CreateConverter() => new OsuBeatmapConverter();
|
protected override ITestableBeatmapConverter CreateConverter(Beatmap beatmap) => new OsuBeatmapConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct ConvertValue : IEquatable<ConvertValue>
|
public struct ConvertValue : IEquatable<ConvertValue>
|
||||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
IsStrong = ((TaikoHitObject)hitObject).IsStrong
|
IsStrong = ((TaikoHitObject)hitObject).IsStrong
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override ITestableBeatmapConverter CreateConverter() => new TaikoBeatmapConverter(isForCurrentRuleset);
|
protected override ITestableBeatmapConverter CreateConverter(Beatmap beatmap) => new TaikoBeatmapConverter(isForCurrentRuleset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct ConvertValue : IEquatable<ConvertValue>
|
public struct ConvertValue : IEquatable<ConvertValue>
|
||||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
|
|
||||||
var result = new ConvertResult();
|
var result = new ConvertResult();
|
||||||
|
|
||||||
var converter = CreateConverter();
|
var converter = CreateConverter(beatmap);
|
||||||
converter.ObjectConverted += (orig, converted) =>
|
converter.ObjectConverted += (orig, converted) =>
|
||||||
{
|
{
|
||||||
converted.ForEach(h => h.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty));
|
converted.ForEach(h => h.ApplyDefaults(beatmap.ControlPointInfo, beatmap.BeatmapInfo.BaseDifficulty));
|
||||||
@ -122,7 +122,7 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected abstract TConvertValue CreateConvertValue(HitObject hitObject);
|
protected abstract TConvertValue CreateConvertValue(HitObject hitObject);
|
||||||
protected abstract ITestableBeatmapConverter CreateConverter();
|
protected abstract ITestableBeatmapConverter CreateConverter(Beatmap beatmap);
|
||||||
|
|
||||||
private class ConvertMapping
|
private class ConvertMapping
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user