using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("DisablePostprocessing")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DisablePostprocessing")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9ae26515-5052-481e-a32d-31d2c7f7c06b")]
[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 DisablePostprocessing;
[BepInPlugin("woowz.lethalcompany.disablepostprocessing", "Disable Postprocessing", "0.0.2")]
public class DisablePostprocessingBase : BaseUnityPlugin
{
public const string pluginGuid = "woowz.lethalcompany.disablepostprocessing";
public const string pluginName = "Disable Postprocessing";
public const string pluginVersion = "0.0.2";
private ConfigEntry<bool> Config_DisableOutline;
private ConfigEntry<bool> Config_DisableVolume;
private ConfigEntry<bool> Config_DisableHelmet;
private ConfigEntry<bool> Config_DisableUI;
public void Awake()
{
Config_DisableOutline = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Disable Outline Effect", true, "Выключить обводку");
Config_DisableVolume = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Disable Fog", false, "Выключить туман");
Config_DisableHelmet = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Disable Helmet UI", false, "Выключить UI шлема");
Config_DisableUI = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Disable GUI", false, "Выключить GUI");
}
public void Update()
{
GameObject val = GameObject.Find("Systems");
if ((Object)(object)val != (Object)null)
{
((Component)val.transform.Find("Rendering").Find("CustomPass")).gameObject.SetActive(!Config_DisableOutline.Value);
((Component)val.transform.Find("Rendering").Find("VolumeMain")).gameObject.SetActive(!Config_DisableVolume.Value);
((Component)val.transform.Find("Rendering").Find("PlayerHUDHelmetModel")).gameObject.SetActive(!Config_DisableHelmet.Value);
Transform val2 = val.transform.Find("UI").Find("Canvas").Find("IngamePlayerHUD");
((Component)val2.Find("Inventory")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("TopLeftCorner").Find("SprintMeter")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("TopLeftCorner").Find("Batteries")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("TopLeftCorner").Find("WeightUI")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("TopLeftCorner").Find("Self")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("TopLeftCorner").Find("SelfRed")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("BottomLeftCorner")).gameObject.SetActive(!Config_DisableUI.Value);
((Component)val2.Find("BottomLeftCorner").Find("ProfitQuota")).gameObject.SetActive(!Config_DisableUI.Value);
}
}
}