Decompiled source of FasterHermitCrabs v1.0.0

FasterHermitCrabs.dll

Decompiled 8 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using RoR2;
using UnityEngine;

[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 = ".NET Standard 2.0")]
[assembly: AssemblyCompany("FasterHermitCrabs")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FasterHermitCrabs")]
[assembly: AssemblyTitle("FasterHermitCrabs")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace FasterHermitCrabs
{
	[BepInPlugin("com.Saltlords.FasterHermitCrabs", "FasterHermitCrabs", "1.0.0")]
	public class FasterHermitsMod : BaseUnityPlugin
	{
		public GameObject hermitguy;

		private static ConfigFile CustomConfigFile { get; set; }

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

		public static ConfigEntry<float> HermitMoveSpeed { 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
			CustomConfigFile = new ConfigFile(Paths.ConfigPath + "\\FasterHermits.cfg", true);
			EnableConfig = CustomConfigFile.Bind<bool>("Custom Modifiers", "Configurable Speed", false, "Turn this on to enable config options.");
			HermitMoveSpeed = CustomConfigFile.Bind<float>("Modifier", "Movement Speed", 22f, "Makes them faster");
			hermitguy = Resources.Load<GameObject>("Prefabs/CharacterBodies/HermitCrabBody");
			CharacterBody component = hermitguy.GetComponent<CharacterBody>();
			component.baseMoveSpeed = (EnableConfig.Value ? HermitMoveSpeed.Value : 22f);
		}
	}
}