Decompiled source of Worm Movement Tweak v1.0.0

PopyModWormMovementTweak.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using On;
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("PopyModWormDownKey")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PopyModWormDownKey")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("b41a8c10-6b29-4f8e-801a-b9f9a4254717")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}
namespace PopyModWormMovementTweak
{
	[BepInPlugin("PopyMod.WormMovementTweak", "WormMovementTweak", "1.0.0")]
	public class PopyModWormMovementTweak : BaseUnityPlugin
	{
		private const string modGUID = "PopyMod.WormMovementTweak";

		private const string modName = "WormMovementTweak";

		private const string modVersion = "1.0.0";

		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			Log = Logger.CreateLogSource("PopyMod.WormMovementTweak");
			Log.LogWarning((object)"\r\n    _  \r\n   | |         PopyMod\r\n  _| |_  Worm Movement Tweak\r\n  \\   /     1.0.0  loaded\r\n   \\_/ ");
			WormMovement.Update += new hook_Update(WormDown);
		}

		private void WormDown(orig_Update orig, WormMovement self)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Invalid comparison between Unknown and I4
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (Input.GetKey((KeyCode)306) && (int)self.wormPlayer.wormMovementState == 1)
			{
				self.CalculateMovement();
				self.moveVector = new Vector3(self.moveVector.x, -0.5f, self.moveVector.z);
			}
		}
	}
}