Decompiled source of Disable TV Light v1.0.0

BepInEx/plugins/DisableTVLight.dll

Decompiled 5 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DisableTVLight.Patches;
using HarmonyLib;
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("DisableTVLight")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DisableTVLight")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8e70c3ed-bd47-4f53-8fb6-efac72065f95")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace DisableTVLight
{
	[BepInPlugin("LC.DisableTVLight", "Disable TV Light", "1.0.0")]
	public class DisableLightBase : BaseUnityPlugin
	{
		private const string modGUID = "LC.DisableTVLight";

		private const string modName = "Disable TV Light";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("LC.DisableTVLight");

		private static DisableLightBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("LC.DisableTVLight");
			mls.LogInfo((object)"The test mod has awakened");
			harmony.PatchAll(typeof(DisableLightBase));
			harmony.PatchAll(typeof(TVScriptPatch));
		}
	}
}
namespace DisableTVLight.Patches
{
	[HarmonyPatch(typeof(TVScript))]
	internal class TVScriptPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void SetTVScreenMaterialPatch(ref Light ___tvLight)
		{
			((Behaviour)___tvLight).enabled = false;
		}
	}
}