Skip to content

Commit

Permalink
Updated to v1.32.5
Browse files Browse the repository at this point in the history
Prevented YOLO seed from setting tourmant flag
  • Loading branch information
Jarno458 committed Jan 1, 2025
1 parent bac01bf commit 0bd6bb9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions TsRandomizer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("694e46c5-fd46-4cc8-8b71-d381e154ccf7")]
[assembly: AssemblyVersion("1.32.4")]
[assembly: AssemblyFileVersion("1.32.4")]
[assembly: AssemblyVersion("1.32.5")]
[assembly: AssemblyFileVersion("1.32.5")]

[assembly: InternalsVisibleTo("TsRandomizer.Tests")]
[assembly: InternalsVisibleTo("TsRandomizerSeedGeneratah")]
5 changes: 2 additions & 3 deletions TsRandomizer/Screens/SeedSelection/SeedSelectionMenuScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,9 @@ internal SeedOptionsCollection GetCurrentOptions()
: new SeedOptionsCollection(seed.Options);
}

internal SeedOptionsCollection GetRandomOptions() =>
new SeedOptionsCollection(new SeedOptions((uint)new Random().Next()));
internal SeedOptionsCollection GetRandomOptions() => new SeedOptionsCollection(SeedOptions.CreateRandom());

string GetHexString()
string GetHexString()
{
var hexString = password;

Expand Down
11 changes: 10 additions & 1 deletion TsRandomizer/SeedOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Globalization;

namespace TsRandomizer
Expand Down Expand Up @@ -87,6 +88,14 @@ public SeedOptions(Dictionary<string, object> slotData)
}
}

public static SeedOptions CreateRandom()
{
var randomValue = (uint)new Random().Next();
randomValue &= ~(1U << 13); //Tournament

return new SeedOptions(randomValue);
}

static bool IsTrue(object o)
{
if (o is bool b) return b;
Expand Down

0 comments on commit 0bd6bb9

Please sign in to comment.