SHA256
25 lines
945 B
C#
25 lines
945 B
C#
using ADOFAIRenderer.Core;
|
|
using HarmonyLib;
|
|
|
|
namespace ADOFAIRenderer.Patch.Game;
|
|
|
|
[HarmonyPatch(typeof(scrPressToStart))]
|
|
// ReSharper disable once InconsistentNaming
|
|
public class scrPressToStartPatch
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch("ShowText")]
|
|
private static bool PreventShowText()
|
|
{
|
|
if (!RenderManager.Instance || !RenderManager.Instance.skipPressToStart) return true;
|
|
|
|
RenderManager.Instance.skipPressToStart = false;
|
|
|
|
// scrPressToStart.ShowText ends with ShowDifficultyContainer(mode). Skipping ShowText skips that call too,
|
|
// which leaves the difficulty selector active and clickable. DontShow deactivates difficultyContainer
|
|
// and makes the keyboard difficulty shortcuts (difficultyUIMode != DontShow checks) do nothing.
|
|
if (scrUIController.instance)
|
|
scrUIController.instance.ShowDifficultyContainer(DifficultyUIMode.DontShow);
|
|
return false;
|
|
}
|
|
} |