using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using GameNetcodeStuff;
using HarmonyLib;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FullBright_byOndyDev")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FullBright_byOndyDev")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ac55e1e8-f95e-49fb-8b10-182b0cf3a319")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace FullBright_byOndyDev.Patches;
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerControllerBPatch
{
[HarmonyPatch("Start")]
[HarmonyPostfix]
private static void texturePatch(ref Light ___nightVision)
{
___nightVision.type = (LightType)2;
___nightVision.intensity = 44444f;
___nightVision.range = 99999f;
___nightVision.shadowStrength = 0f;
___nightVision.bounceIntensity = 5555f;
___nightVision.innerSpotAngle = 999f;
___nightVision.spotAngle = 9999f;
}
[HarmonyPatch("Update")]
[HarmonyPostfix]
private static void keyPress(ref Light ___nightVision)
{
bool flag = ((Component)___nightVision).gameObject.activeSelf;
if (((ButtonControl)Keyboard.current[(Key)20]).wasPressedThisFrame)
{
if (((Component)___nightVision).gameObject.activeSelf)
{
flag = false;
}
if (!((Component)___nightVision).gameObject.activeSelf)
{
flag = true;
}
}
if (!flag)
{
((Component)___nightVision).gameObject.SetActive(false);
}
if (flag)
{
((Component)___nightVision).gameObject.SetActive(true);
}
}
}
[BepInPlugin("OndyDev.FullBright", "FullBright", "1.0.0.0")]
public class plugin : BaseUnityPlugin
{
private const string modGUID = "OndyDev.FullBright";
private const string modName = "FullBright";
private const string modVersion = "1.0.0.0";
private readonly Harmony harmony = new Harmony("OndyDev.FullBright");
private static plugin Instance;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
harmony.PatchAll(typeof(plugin));
harmony.PatchAll(typeof(PlayerControllerBPatch));
}
}