Decompiled source of SpeedLimiterForNenjay v1.0.0

plugins/SpeedLimiterForNenjay/SpeedLimiterForNenjay.dll

Decompiled 2 months ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Configuration;
using GameplayEntities;
using LLBML;
using LLBML.Math;
using LLBML.States;
using LLBML.Utils;
using LLHandlers;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("SpeedLimiterForNenjay (fr.glomzubuk.plugins.llb.speedlimiterfornenjay)")]
[assembly: AssemblyProduct("SpeedLimiterForNenjay")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SpeedLimiterForNenjay;

[BepInPlugin("fr.glomzubuk.plugins.llb.speedlimiterfornenjay", "SpeedLimiterForNenjay", "1.0.0")]
[BepInProcess("LLBlaze.exe")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class SpeedLimiterForNenjay : BaseUnityPlugin
{
	internal ConfigEntry<int> speedLimit;

	public static SpeedLimiterForNenjay Instance { get; private set; }

	private void Awake()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		Instance = this;
		speedLimit = ((BaseUnityPlugin)this).Config.Bind<int>("Values", "speedLimit", 0, new ConfigDescription("Maximum ball speed.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 500), new object[0]));
	}

	private void Start()
	{
		ModDependenciesUtils.RegisterToModMenu(((BaseUnityPlugin)this).Info, (List<string>)null);
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Invalid comparison between Unknown and I4
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		GameState current = GameStates.GetCurrent();
		if ((int)StateApi.CurrentGameMode == 100 && (EnumWrapper<JOFJHDJHJGI>)(object)current == (EnumWrapper<JOFJHDJHJGI>)(object)GameState.GAME && speedLimit.Value > 0)
		{
			BallEntity[] balls = BallHandler.instance.balls;
			for (int i = 0; i < balls.Length; i++)
			{
				((HitableEntity)balls[i]).maxFlySpeed = Floatf.op_Implicit(Floatf.op_Implicit(speedLimit.Value) * Floatf.op_Implicit(World.FPIXEL60_SIZE));
			}
		}
	}
}
internal static class PluginInfos
{
	public const string PLUGIN_NAME = "SpeedLimiterForNenjay";

	public const string PLUGIN_ID = "fr.glomzubuk.plugins.llb.speedlimiterfornenjay";

	public const string PLUGIN_VERSION = "1.0.0";
}