Decompiled source of windtool v0.0.1

windtool.dll

Decompiled 7 hours ago
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using OtherLoader;
using UnityEngine;
using UnityEngine.UI;
using visSpace;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace vithamonsta.windtool;

[BepInPlugin("vithamonsta.windtool", "windtool", "0.0.1")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class windtoolPlugin : BaseUnityPlugin
{
	private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

	internal static ManualLogSource Logger;

	private void Awake()
	{
		Logger = ((BaseUnityPlugin)this).Logger;
		LoadAssets();
	}

	private void LoadAssets()
	{
		Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "vithamonsta.windtool");
		OtherLoader.RegisterDirectLoad(BasePath, "vithamonsta.windtool", "", "", "wind_tool", "");
	}
}
public class WindToolScript : MonoBehaviour
{
	[SerializeField]
	private Text windSpeedText;

	private void Start()
	{
	}

	private void Update()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = WindPlugin.WindVector + WindPlugin.ActiveGustVector;
		((Component)this).transform.rotation = Quaternion.LookRotation(val);
		if ((Object)(object)windSpeedText != (Object)null)
		{
			windSpeedText.text = Mathf.Round(((Vector3)(ref val)).magnitude * 100f) / 100f + " m/s";
		}
	}
}