PVZFusionTranslation/BepInEx/Patches/GameObjects/MainMenu_Patch.cs
2025-05-11 15:51:58 -04:00

24 lines
No EOL
647 B
C#

using HarmonyLib;
using PvZ_Fusion_Translator__BepInEx_.AssetStore;
using UnityEngine;
namespace PvZ_Fusion_Translator__BepInEx_.Patches.GameObjects
{
[HarmonyPatch(typeof(MainMenu))]
public class MainMenu_Patch
{
private static bool _warningShown = false;
[HarmonyPostfix]
[HarmonyPatch(nameof(MainMenu.FixedUpdate))]
private static void FixedUpdate(MainMenu __instance)
{
if (_warningShown || NoticeMenu.Instance == null)
return;
WarningStore.WarningReload(Utils.Language, NoticeMenu.Instance);
_warningShown = true;
}
}
}