From 073bd63c9e223a58a2e6d8658d19bddea2402dc9 Mon Sep 17 00:00:00 2001 From: Lincoln-LM <73306575+Lincoln-LM@users.noreply.github.com> Date: Sat, 12 Oct 2024 02:30:40 -0600 Subject: [PATCH] Fix Menu Close Fidget Logic (#45) * remove cave MenuCloseTypes & only do fidget rands when not holding a direction * capitalize comment --- SWSH_OWRNG_Generator.Core/Enums/MenuClose.cs | 2 -- SWSH_OWRNG_Generator.Core/MenuClose/Generator.cs | 16 ++++------------ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/SWSH_OWRNG_Generator.Core/Enums/MenuClose.cs b/SWSH_OWRNG_Generator.Core/Enums/MenuClose.cs index 273a507..cf7b6a5 100644 --- a/SWSH_OWRNG_Generator.Core/Enums/MenuClose.cs +++ b/SWSH_OWRNG_Generator.Core/Enums/MenuClose.cs @@ -4,7 +4,5 @@ public enum MenuCloseType { Regular, HoldingDirection, - CaveRegular, - CaveHoldingDirection } } diff --git a/SWSH_OWRNG_Generator.Core/MenuClose/Generator.cs b/SWSH_OWRNG_Generator.Core/MenuClose/Generator.cs index e5a9737..f2942df 100644 --- a/SWSH_OWRNG_Generator.Core/MenuClose/Generator.cs +++ b/SWSH_OWRNG_Generator.Core/MenuClose/Generator.cs @@ -10,19 +10,11 @@ public static ref Xoroshiro128Plus Advance(ref Xoroshiro128Plus rng, uint NPCs, { rng.NextInt(91); } - rng.Next(); - rng.NextInt(60); - if (Mode == (byte)MenuCloseType.HoldingDirection) + if (Mode != (byte)MenuCloseType.HoldingDirection) { - rng.NextInt(360); - } - else if (Mode == (byte)MenuCloseType.CaveRegular) - { - // Not implemented - } - else if (Mode == (byte)MenuCloseType.CaveHoldingDirection) - { - // Not implemented + // These rng calls are not correct in all weathers as player fidget logic can change based on weather + rng.Next(); + rng.NextInt(60); } return ref rng; }