Decompiled source of SpeedyBeetles v2.2.1

SpeedyBeetles.dll

Decompiled 2 weeks ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using RoR2;
using UnityEngine;
using UnityEngine.AddressableAssets;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("SpeedyBeetles")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SpeedyBeetles")]
[assembly: AssemblyTitle("SpeedyBeetles")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Borbo;

[BepInPlugin("com.Borbo.SpeedyBeetles", "SpeedyBeetles", "2.2.1")]
public class SpeedyBeetles : BaseUnityPlugin
{
	public GameObject beetlePrefab;

	private static ConfigFile CustomConfigFile { get; set; }

	public static ConfigEntry<bool> EnableConfig { get; set; }

	public static ConfigEntry<float> BeetleBaseMoveSpeed { get; set; }

	public static ConfigEntry<float> BeetleBaseAtkSpeed { get; set; }

	public void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		CustomConfigFile = new ConfigFile(Paths.ConfigPath + "\\SpeedyBeetles.cfg", true);
		EnableConfig = CustomConfigFile.Bind<bool>("Allow Config", "Allow config", false, "Turn this on to enable config options. Please keep in mind that it was not within my design intentions to play this way. \nIf you have any issues or feedback on my mod balance, please feel free to send in feedback with the contact info in the README or Thunderstore description.");
		BeetleBaseMoveSpeed = CustomConfigFile.Bind<float>("Beetle Buffs", "Beetle base movespeed", 10.5f, "Makes them go FAST!!!!!!!!!");
		BeetleBaseAtkSpeed = CustomConfigFile.Bind<float>("Beetle Buffs", "Beetle base attackspeed", 2f, "Makes them ANGRY");
		beetlePrefab = Addressables.LoadAssetAsync<GameObject>((object)"f2ae1aaca82b21c4e8a55edcf1312bc8").WaitForCompletion();
		CharacterBody component = beetlePrefab.GetComponent<CharacterBody>();
		component.baseMoveSpeed = (EnableConfig.Value ? BeetleBaseMoveSpeed.Value : 10.5f);
		component.baseAttackSpeed = (EnableConfig.Value ? BeetleBaseAtkSpeed.Value : 2f);
	}
}