using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
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("jesterGlobalFear")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("jesterGlobalFear")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4c6bc8ae-b7b9-4723-bd61-cf8fff7e80a3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace jesterGlobalFear
{
[BepInPlugin("vy.JesterFearEffects", "JesterFearEffects", "1.0.0")]
public class jesterFearEffects : BaseUnityPlugin
{
private const string modGUID = "vy.JesterFearEffects";
private const string modName = "JesterFearEffects";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("vy.JesterFearEffects");
private static jesterFearEffects Instance;
internal ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("vy.JesterFearEffects");
mls.LogInfo((object)"Loaded JesterFearEffects");
harmony.PatchAll();
}
}
}
namespace jesterFearEffects.Patches
{
[HarmonyPatch(typeof(JesterAI))]
internal class JesterAIPatch
{
[HarmonyPatch("Update")]
[HarmonyPostfix]
private static void fearHandler(ref int ___previousState)
{
if (GameNetworkManager.Instance.localPlayerController.isInsideFactory)
{
switch (___previousState)
{
case 0:
break;
case 1:
GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.68f, true);
break;
case 2:
GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true);
break;
}
}
}
}
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerControllerBPatch
{
}
}