using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
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("JesterTimerFB")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JesterTimerFB")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("90f49b5d-32e2-4d28-8bb2-2cf8221e18ba")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LethalCompanyModTemplate;
[BepInPlugin("inuyamazen.JesterTimerFB", "JesterTimerFB", "1.0.0.0")]
public class JesterPlugin : BaseUnityPlugin
{
public const string modGUID = "inuyamazen.JesterTimerFB";
public const string modName = "JesterTimerFB";
public const string modVersion = "1.0.0.0";
private readonly Harmony harmony = new Harmony("inuyamazen.JesterTimerFB");
public static JesterPlugin instance { get; private set; }
private void Awake()
{
ManualLogSource val = Logger.CreateLogSource("inuyamazen.JesterTimerFB");
val.LogMessage((object)"inuyamazen.JesterTimerFB has loaded succesfully.");
instance = this;
((BaseUnityPlugin)this).Config.Bind<float>("WindupTimer", "Timer", 36.5f, (ConfigDescription)null);
harmony.PatchAll(typeof(JesterAIPatch));
}
}
[HarmonyPatch(typeof(JesterAI))]
internal class JesterAIPatch
{
[HarmonyPatch("SetJesterInitialValues")]
[HarmonyPostfix]
private static void TimerPatch(ref float ___popUpTimer)
{
___popUpTimer = 36.5f;
ConfigEntry<float> val = default(ConfigEntry<float>);
if (((BaseUnityPlugin)JesterPlugin.instance).Config.TryGetEntry<float>("WindupTimer", "Timer", ref val))
{
___popUpTimer = val.Value;
}
Debug.Log((object)"SURELY YOU JEST.");
Debug.Log((object)___popUpTimer);
}
}