using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using Configure_IronMaiden_Speed.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("Configure_IronMaiden_Speed")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Configure_IronMaiden_Speed")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("73682DE4-1376-45DF-88EB-8C0BDDA1869F")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Configure_IronMaiden_Speed
{
[BepInPlugin("MerQury.IronMaidenSpeed", "IronMaidenSpeed", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
public static PluginConfig config;
private void Awake()
{
config = new PluginConfig(((BaseUnityPlugin)this).Config);
((BaseUnityPlugin)this).Logger.LogInfo((object)"Mod MerQury.IronMaidenSpeed loaded!");
Harmony.CreateAndPatchAll(typeof(WeepingPatch), (string)null);
}
}
public class PluginConfig
{
public ConfigEntry<float> WeepingSpeed { get; private set; }
public PluginConfig(ConfigFile config)
{
WeepingSpeed = config.Bind<float>("General", "Iron Maiden Speed", 0.375f, "The default without the mod is 1");
}
}
}
namespace Configure_IronMaiden_Speed.Patches
{
public class WeepingPatch
{
[HarmonyPatch(typeof(Bot), "RotateThenMove")]
[HarmonyPrefix]
private static bool Bot_RotateThenMove_Transpiler(Bot __instance, Vector3 dir, float rotationSpeed = 3f)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
float num = Vector2.Angle(Vector2.op_Implicit(Vector3Extensions.Flat(dir)), Vector2.op_Implicit(Vector3Extensions.Flat(__instance.syncData.lookDireciton)));
float num2 = 5f;
if (num < num2)
{
__instance.syncData.movementInput = new Vector2(0f, Plugin.config.WeepingSpeed.Value);
}
else
{
__instance.StandStill();
}
__instance.Look(dir, rotationSpeed);
return false;
}
}
}