Decompiled source of BumpscosityMod v1.0.0

BumpscosityMod.dll

Decompiled 6 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 Microsoft.CodeAnalysis;
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(".NETFramework,Version=v4.6", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("BumpscosityMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BumpscosityMod")]
[assembly: AssemblyTitle("BumpscosityMod")]
[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 BumpscosityMod
{
	[BepInPlugin("BumpscosityMod", "BumpscosityMod", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public float bumpscosity = 0f;

		public float colorTimer = 0f;

		public Color guiColor;

		public Rect labelPos = new Rect(25f, 50f, 100f, 50f);

		private void Update()
		{
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Abs(Mathf.Sin(colorTimer * 0.4f));
			float num2 = Mathf.Abs(Mathf.Sin(colorTimer * 0.5f));
			float num3 = Mathf.Abs(Mathf.Sin(colorTimer * 0.6f));
			guiColor = new Color(num, num2, num3);
			colorTimer += Time.deltaTime;
		}

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin BumpscosityMod is loaded!");
		}

		private void OnGUI()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			GUI.color = guiColor;
			GUI.Window(0, new Rect(25f, 75f, 150f, 100f), new WindowFunction(BumpscosityWindow), "Bumpscosity Modifier");
		}

		private void BumpscosityWindow(int id)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			GUI.color = guiColor;
			bumpscosity = GUI.HorizontalSlider(new Rect(25f, 25f, 100f, 30f), bumpscosity, 0f, 10f);
			if (bumpscosity == 0f)
			{
				GUI.Label(labelPos, "Bumpscosity: Non-Sigma");
			}
			if (bumpscosity == 10f)
			{
				GUI.Label(labelPos, "Bumpscosity: 100% SIGMA");
			}
			if (bumpscosity > 0f && bumpscosity < 10f)
			{
				GUI.Label(labelPos, "Bumpscosity: " + Math.Floor(bumpscosity));
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "BumpscosityMod";

		public const string PLUGIN_NAME = "BumpscosityMod";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}