1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 08:02:55 +08:00

Change name of option "Custom seed" to "Seed" and set its value to the generated seed

This commit is contained in:
Pasi4K5 2021-05-14 01:50:11 +02:00
parent a9d5211e81
commit ac04e8afa2

View File

@ -33,8 +33,8 @@ namespace osu.Game.Rulesets.Osu.Mods
private const byte border_distance_x = 192;
private const byte border_distance_y = 144;
[SettingSource("Custom seed", "Use a custom seed instead of a random one", SettingControlType = typeof(OsuModRandomSettingsControl))]
public Bindable<int?> CustomSeed { get; } = new Bindable<int?>
[SettingSource("Seed", "Use a custom seed instead of a random one", SettingControlType = typeof(OsuModRandomSettingsControl))]
public Bindable<int?> Seed { get; } = new Bindable<int?>
{
Default = null,
Value = null
@ -45,12 +45,9 @@ namespace osu.Game.Rulesets.Osu.Mods
if (!(beatmap is OsuBeatmap osuBeatmap))
return;
var seed = RNG.Next();
Seed.Value ??= RNG.Next();
if (CustomSeed.Value != null)
seed = (int)CustomSeed.Value;
var rng = new Random(seed);
var rng = new Random((int)Seed.Value);
var prevObjectInfo = new HitObjectInfo
{