using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("TurnOffCheatsOverlay")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TurnOffCheatsOverlay")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("dd8ce204-844c-4965-ab76-aa662478165a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace TurnOffCheatsOverlay;
[BepInPlugin("com.AquaEther.TurnOffCheatsOverlay", "TurnOffCheatsOverlay", "1.0.0")]
public class TurnOffCheatsOverlayPlugin : BaseUnityPlugin
{
public bool cheatSwitch;
public GameObject cheats;
private const string MyGUID = "com.AquaEther.TurnOffCheatsOverlay";
private const string PluginName = "TurnOffCheatsOverlay";
private const string VersionString = "1.0.0";
public static ManualLogSource Log = new ManualLogSource("TurnOffCheatsOverlay");
private static Scene currentScene;
public void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: TurnOffCheatsOverlay, VersionString: 1.0.0 is loaded.");
Log = ((BaseUnityPlugin)this).Logger;
SceneManager.sceneLoaded -= OnSceneLoaded;
SceneManager.sceneLoaded += OnSceneLoaded;
}
public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
currentScene = scene;
if (((Scene)(ref scene)).name == "b3e7f2f8052488a45b35549efb98d902")
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"menu = no cheats");
return;
}
cheats = GameObject.Find("Canvas/Cheat Menu/Cheats Overlay");
if ((Object)(object)cheats == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"null menu");
}
else
{
cheatSwitch = false;
}
}
public void Update()
{
if (((Scene)(ref currentScene)).name != "b3e7f2f8052488a45b35549efb98d902" && ((Scene)(ref currentScene)).name != "Bootstrap" && ((Scene)(ref currentScene)).name != "241a6a8caec7a13438a5ee786040de32" && !cheatSwitch)
{
cheats.SetActive(false);
cheatSwitch = true;
}
}
}