mirror of
https://github.com/osukey/osukey.git
synced 2025-05-09 23:57:18 +09:00
Change name of option "Custom seed" to "Seed" and set its value to the generated seed
This commit is contained in:
parent
a9d5211e81
commit
ac04e8afa2
@ -33,8 +33,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
private const byte border_distance_x = 192;
|
private const byte border_distance_x = 192;
|
||||||
private const byte border_distance_y = 144;
|
private const byte border_distance_y = 144;
|
||||||
|
|
||||||
[SettingSource("Custom seed", "Use a custom seed instead of a random one", SettingControlType = typeof(OsuModRandomSettingsControl))]
|
[SettingSource("Seed", "Use a custom seed instead of a random one", SettingControlType = typeof(OsuModRandomSettingsControl))]
|
||||||
public Bindable<int?> CustomSeed { get; } = new Bindable<int?>
|
public Bindable<int?> Seed { get; } = new Bindable<int?>
|
||||||
{
|
{
|
||||||
Default = null,
|
Default = null,
|
||||||
Value = null
|
Value = null
|
||||||
@ -45,12 +45,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
if (!(beatmap is OsuBeatmap osuBeatmap))
|
if (!(beatmap is OsuBeatmap osuBeatmap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var seed = RNG.Next();
|
Seed.Value ??= RNG.Next();
|
||||||
|
|
||||||
if (CustomSeed.Value != null)
|
var rng = new Random((int)Seed.Value);
|
||||||
seed = (int)CustomSeed.Value;
|
|
||||||
|
|
||||||
var rng = new Random(seed);
|
|
||||||
|
|
||||||
var prevObjectInfo = new HitObjectInfo
|
var prevObjectInfo = new HitObjectInfo
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user